From 1ab31109111f16ff0dcbbbc984c25eecbcd5581d Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Mon, 9 Oct 2023 16:00:59 +0200 Subject: [PATCH 01/11] Add class that test some edge cases of the ephemerons algorithm --- .../VMSpurEphemeronsAlgorithmTest.class.st | 336 ++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st new file mode 100644 index 0000000000..6bc5300168 --- /dev/null +++ b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st @@ -0,0 +1,336 @@ +Class { + #name : #VMSpurEphemeronsAlgorithmTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #instVars : [ + 'ephemeronObjectOopOne', + 'ephemeronObjectOopTwo', + 'nonEphemeronObjectOopOne', + 'nonEphemeronObjectOopTwo' + ], + #category : #'VMMakerTests-MemoryTests' +} + +{ #category : #helper } +VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ + + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopTwo +] + +{ #category : #helper } +VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ + "Force ephemerons to not be collected by putting them in special variables" + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo +] + +{ #category : #helper } +VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ + "In pharo Ephemerons have 3 slots" + + ^ self newOldSpaceObjectWithSlots: 3 + format: memory ephemeronFormat + classIndex: (memory ensureBehaviorHash: ourEphemeronClass) +] + +{ #category : #running } +VMSpurEphemeronsAlgorithmTest >> setUp [ + + super setUp. + memory initializeMournQueue. + self createEphemeronClass +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newZeroSizedObject. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. + nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKey [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. + + memory storePointer: 2 ofObject: ephemeronObjectOopOne withValue: ephemeronObjectOopTwo. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + + "Collect ephemeron 1, ephemeron 2 is in the old space" + memory doScavenge: 1. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyFlushNewSpace [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. + + memory storePointer: 2 ofObject: ephemeronObjectOopOne withValue: ephemeronObjectOopTwo. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + + "Collect ephemeron 1, ephemeron 2 is in the old space" + memory flushNewSpace. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyFlushNewSpaceNoRefenceBetweenEphemerons [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + + "Collect both non ephemeron objects" + memory flushNewSpace. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNoRefenceBetweenEphemerons [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + + "Collect ephemeron 1, ephemeron 2 is in the old space" + memory doScavenge: 1. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newZeroSizedObject. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge: 1. "TenureByAge" + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopOne. + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoungInverse [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newZeroSizedObject. + nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge: 1. "TenureByAge" + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopOne. + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo +] From c9eb905d6725e47c16aae79a742ab90fb2ebc9f5 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Thu, 26 Oct 2023 11:34:17 +0200 Subject: [PATCH 02/11] Added more tests exposing when the algorithm fails --- .../VMSpurEphemeronsAlgorithmTest.class.st | 89 ++++++++++++------- 1 file changed, 57 insertions(+), 32 deletions(-) diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st index 6bc5300168..4ef25b734b 100644 --- a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st @@ -142,14 +142,12 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ ] { #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKey [ +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObject. nonEphemeronObjectOopOne := self newZeroSizedObject. - memory storePointer: 2 ofObject: ephemeronObjectOopOne withValue: ephemeronObjectOopTwo. - "Both ephemerons share the same key" memory storePointer: 0 ofObject: ephemeronObjectOopOne @@ -158,24 +156,23 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKey [ ofObject: ephemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect ephemeron 1, ephemeron 2 is in the old space" + "Collect ephemerons" memory doScavenge: 1. - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyFlushNewSpace [ +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObject. nonEphemeronObjectOopOne := self newZeroSizedObject. - memory storePointer: 2 ofObject: ephemeronObjectOopOne withValue: ephemeronObjectOopTwo. - "Both ephemerons share the same key" memory storePointer: 0 ofObject: ephemeronObjectOopOne @@ -184,21 +181,22 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyFlushNewSpace [ ofObject: ephemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect ephemeron 1, ephemeron 2 is in the old space" + "Collect both non ephemeron objects" memory flushNewSpace. - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyFlushNewSpaceNoRefenceBetweenEphemerons [ +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newZeroSizedObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. "Both ephemerons share the same key" memory storePointer: 0 @@ -208,19 +206,45 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyFlushNewSpaceNoRefence ofObject: ephemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect both non ephemeron objects" - memory flushNewSpace. + "Collect ephemerons" + memory fullGC. + + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect ephemerons" + memory fullGC. + + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNoRefenceBetweenEphemerons [ +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ - ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. nonEphemeronObjectOopOne := self newZeroSizedObject. @@ -232,13 +256,14 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNoRefenceBetweenEpheme ofObject: ephemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect ephemeron 1, ephemeron 2 is in the old space" - memory doScavenge: 1. - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne + "Collect ephemerons" + memory fullGC. + + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - finalization - algorithm' } From ba5d1c414cdae8bd1755de9df8266f66915365ed Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Thu, 26 Oct 2023 11:40:35 +0200 Subject: [PATCH 03/11] Code reformatting --- .../VMSpurEphemeronsAlgorithmTest.class.st | 172 +++++++++--------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st index 4ef25b734b..400872c055 100644 --- a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st @@ -143,127 +143,127 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ { #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newZeroSizedObject. "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory doScavenge: 1. - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) + "Collect ephemerons" + memory doScavenge: 1. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newZeroSizedObject. "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect both non ephemeron objects" - memory flushNewSpace. - - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) + + "Collect both non ephemeron objects" + memory flushNewSpace. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) + "Collect ephemerons" + memory fullGC. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) + "Collect ephemerons" + memory fullGC. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newZeroSizedObject. + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ( { ephemeronObjectOopOne . ephemeronObjectOopTwo } includes: memory dequeueMourner) + "Collect ephemerons" + memory fullGC. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] { #category : #'tests - finalization - algorithm' } From 771436315e03641e984f5f420a0affb4512cc28b Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Thu, 22 Aug 2024 16:52:09 +0200 Subject: [PATCH 04/11] updated comment --- smalltalksrc/VMMakerTests/Array.extension.st | 6 +- .../VMMakerTests/ByteSymbol.extension.st | 6 +- .../VMMakerTests/Character.extension.st | 6 +- smalltalksrc/VMMakerTests/Cogit.extension.st | 12 +- .../VMMakerTests/CompiledBlock.extension.st | 4 +- .../VMMakerTests/DummyProcessor.class.st | 56 +- .../VMMakerTests/ExitInterpreter.class.st | 9 +- .../VMMakerTests/LiteralVariable.extension.st | 4 +- .../ManifestVMMakerTests.class.st | 14 +- .../VMMakerTests/MethodBuilderTest.class.st | 30 +- .../MockVMStructWithReservedWords.class.st | 13 +- ...ckVMStructWithoutTypeDeclarations.class.st | 9 +- .../ParametrizedTestMatrix.extension.st | 4 +- .../VMMakerTests/ProcessorSimulator.class.st | 258 +++---- .../VMMakerTests/RegisterDescriptor.class.st | 33 +- .../VMMakerTests/SmallInteger.extension.st | 4 +- .../SpurMemoryManager.extension.st | 4 +- .../VMMakerTests/StackBuilderTest.class.st | 76 +- .../StackToRegisterMappingCogit.extension.st | 4 +- .../VMMakerTests/UndefinedObject.extension.st | 4 +- .../UnicornARMv5Simulator.class.st | 136 ++-- .../UnicornARMv8Simulator.class.st | 212 +++--- .../UnicornI386Simulator.class.st | 106 +-- .../UnicornInvalidMemoryAccess.class.st | 28 +- .../VMMakerTests/UnicornProcessor.class.st | 160 ++-- .../UnicornRISCVSimulator.class.st | 264 +++---- .../UnicornRegisterDescriptor.class.st | 30 +- .../UnicornSimulationTrap.class.st | 26 +- .../VMMakerTests/UnicornSimulator.class.st | 28 +- .../VMMakerTests/UnicornTimeout.class.st | 12 +- .../VMMakerTests/UnicornX64Simulator.class.st | 162 ++-- .../VMARMStackAlignmentTest.class.st | 24 +- .../VMARMV8SIMDEncodingTest.class.st | 38 +- .../VMARMV8SpecificEncodingTest.class.st | 72 +- .../VMMakerTests/VMAbstractBuilder.class.st | 18 +- .../VMMakerTests/VMAbstractFFITest.class.st | 23 +- .../VMAbstractImageFormatTest.class.st | 22 +- .../VMAbstractPrimitiveTest.class.st | 19 +- .../VMMakerTests/VMBlockTest.class.st | 40 +- .../VMMakerTests/VMByteCodesTest.class.st | 136 ++-- .../VMMakerTests/VMBytecodeMethod.class.st | 32 +- .../VMCodeCompactionTest.class.st | 38 +- .../VMMakerTests/VMCogitHelpersTest.class.st | 28 +- .../VMCompiledCodeBuilder.class.st | 72 +- smalltalksrc/VMMakerTests/VMContext.class.st | 28 +- .../VMMakerTests/VMContextAccessTest.class.st | 22 +- .../VMDivisionInstructionTest.class.st | 28 +- .../VMFFIArgumentMarshallingTest.class.st | 95 +-- .../VMMakerTests/VMFFICallbacksTest.class.st | 17 +- .../VMMakerTests/VMFFIHelpersTest.class.st | 31 +- .../VMFFIReturnMarshallingTest.class.st | 47 +- ...SameThreadArgumentMarshallingTest.class.st | 13 +- .../VMFFISameThreadCalloutTest.class.st | 11 +- ...FISameThreadReturnMarshallingTest.class.st | 11 +- ...MFFIWorkerArgumentMarshallingTest.class.st | 19 +- .../VMFFIWorkerCalloutTest.class.st | 27 +- .../VMFFIWorkerReturnMarshallingTest.class.st | 13 +- ...ForwardLiteralInMachineMethodTest.class.st | 14 +- .../VMMakerTests/VMFrameBuilder.class.st | 92 +-- .../VMImageHeaderWritingTest.class.st | 50 +- .../VMMakerTests/VMImageReadingTest.class.st | 32 +- .../VMMakerTests/VMInterpreterTests.class.st | 14 +- .../VMJITPrimitiveCallingTest.class.st | 82 ++- .../VMJITVMPrimitiveTest.class.st | 20 +- .../VMJistMethodTestObject.class.st | 10 +- .../VMMakerTests/VMJitMethodTest.class.st | 30 +- .../VMJitMethodWithImmutabilityTest.class.st | 16 +- .../VMMakerTests/VMJitSimdBytecode.class.st | 26 +- .../VMJittedBoxFloatPrimitivesTest.class.st | 14 +- ...ittedByteArrayAccessPrimitiveTest.class.st | 112 +-- ...xternalAddressAccessPrimitiveTest.class.st | 12 +- .../VMJittedGeneralPrimitiveTest.class.st | 306 ++++---- .../VMMakerTests/VMJittedLookupTest.class.st | 22 +- .../VMJittedPrimitiveAtPutTest.class.st | 14 +- .../VMJittedPrimitiveAtTest.class.st | 74 +- .../VMJittedPrimitiveSizeTest.class.st | 32 +- .../VMJittedPrimitivesTest.class.st | 20 +- .../VMJittedSmallFloatPrimitiveTest.class.st | 52 +- .../VMMakerTests/VMLiterRulesTest.class.st | 13 +- .../VMMakerTests/VMLookUpTest.class.st | 62 +- .../VMMASTTranslationTest.class.st | 87 +-- .../VMMachineCodeFrameBuilderForTest.class.st | 41 +- .../VMMakerTests/VMMachineCodeMethod.class.st | 20 +- .../VMMachineSimulatorTest.class.st | 42 +- .../VMMakerTests/VMMockCodeGenerator.class.st | 26 +- ...MObjectAccessorIdentificationTest.class.st | 10 +- .../VMMakerTests/VMObjectLayoutTests.class.st | 60 +- .../VMMakerTests/VMObjectStackTest.class.st | 38 +- .../VMPermanentSpaceImageReadingTest.class.st | 14 +- .../VMPermanentSpaceMemoryTest.class.st | 90 +-- .../VMPermanentSpacePrimitiveTest.class.st | 30 +- .../VMMakerTests/VMPinnedObjectTest.class.st | 36 +- .../VMPrimitiveCallAbstractTest.class.st | 44 +- .../VMPrimitiveCallingTest.class.st | 16 +- .../VMMakerTests/VMPrimitiveTest.class.st | 696 +++++++++--------- .../VMPushThisContextRoutineTest.class.st | 32 +- .../VMSegmentsImageFormatTest.class.st | 18 +- ...lectorIndexDereferenceRoutineTest.class.st | 16 +- .../VMMakerTests/VMSessionIdTest.class.st | 10 +- ...SimpleStackBasedCogitAbstractTest.class.st | 164 +++-- ...SimpleStackBasedCogitBytecodeTest.class.st | 312 ++++---- ...impleStackBasedCogitCoggedMethods.class.st | 16 +- ...StackBasedCogitMegamorphicPICTest.class.st | 40 +- ...StackBasedCogitMonomorphicPICTest.class.st | 14 +- ...StackBasedCogitPolymorphicPICTest.class.st | 52 +- ...eStackBasedCogitRememberedSetTest.class.st | 20 +- .../VMSimulatedEnvironmentBuilder.class.st | 48 +- .../VMMakerTests/VMSimulationTest.class.st | 12 +- .../VMSistaSuperSendsTest.class.st | 12 +- .../VMSistaTrampolineTest.class.st | 12 +- .../VMSpecialSendArithmethicTest.class.st | 80 +- .../VMSpurEphemeronsAlgorithmTest.class.st | 46 +- .../VMSpurInitializedOldSpaceTest.class.st | 48 +- .../VMSpurMemoryManagerTest.class.st | 154 ++-- .../VMSpurNewSpaceStructureTest.class.st | 46 +- .../VMSpurObjectAllocationTest.class.st | 12 +- .../VMSpurOldSpaceBootstrapTest.class.st | 20 +- ...MSpurOldSpaceGarbageCollectorTest.class.st | 78 +- .../VMSpurOldSpaceStructureTest.class.st | 14 +- .../VMMakerTests/VMSpurOldSpaceTest.class.st | 140 ++-- .../VMSpurRememberedSetTest.class.st | 46 +- .../VMSpurScavengeEphemeronTest.class.st | 48 +- .../VMSpurScavengeWeakTest.class.st | 18 +- .../VMMakerTests/VMSpurScavengerTest.class.st | 96 +-- ...llocationStrategyForLargeTreeTest.class.st | 56 +- ...llocationStrategyForSmallTreeTest.class.st | 76 +- ...purTreeAllocationWithBigNodesTest.class.st | 20 +- .../VMMakerTests/VMStackBuilder.class.st | 54 +- .../VMMakerTests/VMStackFrame.class.st | 50 +- .../VMStackInterpreterTest.class.st | 18 +- .../VMMakerTests/VMStackMappingTest.class.st | 38 +- ...VMStackToRegisterMappingCogitTest.class.st | 48 +- .../VMStackToRegisterMappingTest.class.st | 34 +- .../VMTestMockInterpreter.class.st | 23 +- .../VMMakerTests/VMTrampolineTest.class.st | 46 +- .../VMX64InstructionTest.class.st | 26 +- smalltalksrc/VMMakerTests/package.st | 2 +- 137 files changed, 3679 insertions(+), 3449 deletions(-) diff --git a/smalltalksrc/VMMakerTests/Array.extension.st b/smalltalksrc/VMMakerTests/Array.extension.st index ef74d1b24b..a4a387884a 100644 --- a/smalltalksrc/VMMakerTests/Array.extension.st +++ b/smalltalksrc/VMMakerTests/Array.extension.st @@ -1,13 +1,13 @@ -Extension { #name : #Array } +Extension { #name : 'Array' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Array >> forMemory: aMemory inMethod: anObject [ ^ aMemory newArrayWith: (self collect: [ :anElement | anElement forMemory: aMemory inMethod: nil ]) ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Array >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st index e9a6595a9d..3fde704597 100644 --- a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st +++ b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ByteSymbol } +Extension { #name : 'ByteSymbol' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ByteSymbol >> forMemory: aMemory inMethod: anObject [ | vmString instSpec numSlots | @@ -27,7 +27,7 @@ ByteSymbol >> forMemory: aMemory inMethod: anObject [ ^ vmString ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ByteSymbol >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Character.extension.st b/smalltalksrc/VMMakerTests/Character.extension.st index 26f22ec3fe..79a30d41b3 100644 --- a/smalltalksrc/VMMakerTests/Character.extension.st +++ b/smalltalksrc/VMMakerTests/Character.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #Character } +Extension { #name : 'Character' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Character >> forMemory: memory [ ^ memory characterObjectOf: self codePoint ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Character >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Cogit.extension.st b/smalltalksrc/VMMakerTests/Cogit.extension.st index 3b587c4699..c8d411581d 100644 --- a/smalltalksrc/VMMakerTests/Cogit.extension.st +++ b/smalltalksrc/VMMakerTests/Cogit.extension.st @@ -1,28 +1,28 @@ -Extension { #name : #Cogit } +Extension { #name : 'Cogit' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> byte0: anInteger [ byte0 := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> inBlock: anInteger [ inBlock := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> methodOrBlockNumArgs: anInteger [ methodOrBlockNumArgs := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> needsFrame [ ^ true ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> needsFrame: aFalse [ needsFrame := aFalse ] diff --git a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st index 436740ae7f..87094e4db8 100644 --- a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st +++ b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #CompiledBlock } +Extension { #name : 'CompiledBlock' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } CompiledBlock >> forMemory: memory inMethod: aMethodBuilder [ | methodBuilder | diff --git a/smalltalksrc/VMMakerTests/DummyProcessor.class.st b/smalltalksrc/VMMakerTests/DummyProcessor.class.st index 7779177d07..3c4e14ea5a 100644 --- a/smalltalksrc/VMMakerTests/DummyProcessor.class.st +++ b/smalltalksrc/VMMakerTests/DummyProcessor.class.st @@ -1,6 +1,6 @@ Class { - #name : #DummyProcessor, - #superclass : #Object, + #name : 'DummyProcessor', + #superclass : 'Object', #instVars : [ 'stackPointer', 'framePointer', @@ -10,149 +10,151 @@ Class { 'linkRegisterValue', 'receiverRegisterValue' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> baseRegisterValue: anInteger [ baseRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> cResultRegister [ ^ nil ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> disassembler [ ^ LLVMDisassembler aarch64 ] -{ #category : #operations } +{ #category : 'operations' } DummyProcessor >> flushICacheFrom: anInteger to: anInteger2 [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> fp [ ^ framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> fp: anInteger [ framePointer := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> framePointerRegisterValue: anInteger [ framePointer := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> hasLinkRegister [ ^ true ] -{ #category : #initialization } +{ #category : 'initialization' } DummyProcessor >> initializeStackFor: aSimpleStackBasedCogit [ "We are dummy...." ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> instructionPointerRegisterValue [ ^ programCounter ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> integerRegisterState [ ^ #() ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> linkRegisterValue: anInteger [ linkRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> machineSimulator [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> memoryAt: anInteger write: aCollection size: anInteger3 [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> pc [ ^ programCounter ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> pc: anInteger [ programCounter := anInteger ] -{ #category : #operations } +{ #category : 'operations' } DummyProcessor >> pushWord: anInteger [ stackPointer := stackPointer - 8 ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> receiverRegisterValue: anInteger [ receiverRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> runUntil: anInteger [ programCounter := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> setFramePointer: aFPValue stackPointer: aSPValue [ stackPointer := aSPValue. framePointer := aFPValue ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> simulateLeafCallOf: anInteger nextpc: anInteger2 memory: anUndefinedObject [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> smalltalkStackPointerRegisterValue [ ^ smalltalkStackPointerRegisterValue ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> smalltalkStackPointerRegisterValue: anInteger [ smalltalkStackPointerRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> sp [ ^ stackPointer diff --git a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st index 86c280b059..4aff38ec53 100644 --- a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st @@ -1,13 +1,14 @@ Class { - #name : #ExitInterpreter, - #superclass : #Error, + #name : 'ExitInterpreter', + #superclass : 'Error', #instVars : [ 'returnValue' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } ExitInterpreter >> returnValue: anInteger [ returnValue := anInteger diff --git a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st index 6579fb7e3b..02d3f47f5a 100644 --- a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st +++ b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #LiteralVariable } +Extension { #name : 'LiteralVariable' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } LiteralVariable >> forMemory: aMemory inMethod: anObject [ | aVariable | diff --git a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st index 84a27ad5d5..267b338feb 100644 --- a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st +++ b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st @@ -2,26 +2,28 @@ I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser " Class { - #name : #ManifestVMMakerTests, - #superclass : #PackageManifest, - #category : #'VMMakerTests-Manifest' + #name : 'ManifestVMMakerTests', + #superclass : 'PackageManifest', + #category : 'VMMakerTests-Manifest', + #package : 'VMMakerTests', + #tag : 'Manifest' } -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> ruleBadMessageRule2V1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#UnicornARMv8Simulator #smashCallerSavedRegistersWithValuesFrom:by:in: #false)) #'2023-05-12T09:19:16.384586+02:00') #(#(#RGMethodDefinition #(#UnicornARMv8Simulator #postCallArgumentsNumArgs:in: #false)) #'2023-05-12T09:20:41.357283+02:00') #(#(#RGMethodDefinition #(#ProcessorSimulator #smashRegistersWithValuesFrom:by: #false)) #'2023-05-12T09:25:17.137958+02:00') ) ] -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> rulePrecedenceRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2023-05-12T09:19:42.605517+02:00') ) ] -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> ruleUncommonMessageSendRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2020-07-24T12:05:44.86595+02:00') ) ] diff --git a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st index fada9181db..882ae1c75a 100644 --- a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #MethodBuilderTest, - #superclass : #VMInterpreterTests, + #name : 'MethodBuilderTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'literals', 'numberOfArguments', @@ -11,17 +11,19 @@ Class { 'methodHeader', 'method' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testAddingBytecodesDoesntOverrideHeader [ method := methodBuilder newMethod buildMethod. self assert: methodBuilder buildMethodHeader equals: (memory integerValueOf: (memory fetchPointer: 0 ofObject: method)). ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ method := methodBuilder newMethod; buildMethod. @@ -33,14 +35,14 @@ MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ self shouldnt:[ methodBuilder newMethod; buildMethod ] raise: AssertionFailure ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBuildEmptyMethodIsCompiledMethod [ "checking the format" method := methodBuilder newMethod; buildMethod. self assert: (memory isCompiledMethod: method) ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ | bytecodeAddress | literals := { }. @@ -54,7 +56,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | @@ -69,7 +71,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ | bytecodeAddress | @@ -84,13 +86,13 @@ MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testClassOfCompiledMethodIsCompiledMethod [ self assert: (memory fetchClassOf: methodBuilder newMethod buildMethod) equals: (memory splObj: 16). ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testGeneratingCompiledMethod [ method := methodBuilder newMethod @@ -99,7 +101,7 @@ MethodBuilderTest >> testGeneratingCompiledMethod [ self assert: (memory isCompiledMethod: method) ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ | numberOfByteCode | @@ -114,7 +116,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ | numberOfByteCode | @@ -129,7 +131,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testSecondBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st index 92814927f5..1ffa0754bb 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st @@ -1,27 +1,28 @@ Class { - #name : #MockVMStructWithReservedWords, - #superclass : #VMStructType, + #name : 'MockVMStructWithReservedWords', + #superclass : 'VMStructType', #instVars : [ 'foo', 'case' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #enumerating } +{ #category : 'enumerating' } MockVMStructWithReservedWords class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ aBinaryBlock value: 'foo' value: 'char *'. aBinaryBlock value: 'case' value: 'char *' ] -{ #category : #accessing } +{ #category : 'accessing' } MockVMStructWithReservedWords >> case [ ^ case ] -{ #category : #accessing } +{ #category : 'accessing' } MockVMStructWithReservedWords >> case: anObject [ case := anObject diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st index 15627d4255..077e789b01 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st @@ -1,14 +1,15 @@ Class { - #name : #MockVMStructWithoutTypeDeclarations, - #superclass : #VMStructType, + #name : 'MockVMStructWithoutTypeDeclarations', + #superclass : 'VMStructType', #instVars : [ 'foo', 'bar' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #enumerating } +{ #category : 'enumerating' } MockVMStructWithoutTypeDeclarations class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ "Missing the bar type declaration" diff --git a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st index f5910338a6..b9250409cb 100644 --- a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st +++ b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ParametrizedTestMatrix } +Extension { #name : 'ParametrizedTestMatrix' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ParametrizedTestMatrix >> + aParametrizedTestMatrix [ | newMatrix | diff --git a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st index 37e4e7c26c..a61f9c0b74 100644 --- a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st +++ b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st @@ -1,46 +1,48 @@ Class { - #name : #ProcessorSimulator, - #superclass : #Object, + #name : 'ProcessorSimulator', + #superclass : 'Object', #instVars : [ 'simulator', 'registerAliases', 'registerSmalltalkAliases', 'memory' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> ARMv5 [ ^ UnicornARMv5Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> ARMv8 [ ^ UnicornARMv8Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> IA32 [ ^ UnicornI386Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> X64 [ ^ UnicornX64Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> aarch64 [ ^ UnicornARMv8Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> riscv64 [ "TODO: Add riscv32 and possibly two subclasses for the RISCV simulator" @@ -48,203 +50,203 @@ ProcessorSimulator class >> riscv64 [ "^ SpikeRISCVSimulator new" ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> simulatorFor: isa [ ^ (self subclasses detect: [ :each | each supportsISA: isa ]) perform: isa asSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> aliasForRegister: aRegisterName [ ^ registerAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> aliasSmalltalkForRegister: aRegisterName [ ^ registerSmalltalkAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0Register [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue [ ^ self readRegister: self arg0Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue: aValue [ ^ self writeRegister: self arg0Register value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1Register [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue [ ^ self readRegister: self arg1Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue: aValue [ ^ self writeRegister: self arg1Register value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue [ ^ self readRegister: self baseRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue: aValue [ ^ self writeRegister: self baseRegister value: aValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegister [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegisterValue [ ^ self readRegister: self cResultRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegisterValue: aValue [ self writeRegister: self cResultRegister value: aValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg0RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0RegisterValue [ ^ self readRegister: self carg0Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg1RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1RegisterValue [ ^ self readRegister: self carg1Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg2RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2RegisterValue [ ^ self readRegister: self carg2Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg3RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3RegisterValue [ ^ self readRegister: self carg3Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue [ ^ self readRegister: self classRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue: aValue [ ^ self writeRegister: self classRegister value: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> cogit [ ^ memory interpreter cogit ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleCurrentInstruction [ ^ (self disassembleFrom: self instructionPointerRegisterValue opcodes: 1) first ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ self disassembler @@ -255,7 +257,7 @@ ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ pc: self instructionPointerRegisterValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleFrom: start to: stop [ ^ self disassembler @@ -266,114 +268,114 @@ ProcessorSimulator >> disassembleFrom: start to: stop [ pc: self instructionPointerRegisterValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembler [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister0 value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister1 value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister2 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister2 value: aValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ ^ self subclassResponsibility ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> finishMappingMemory [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> flushICacheFrom: startAddress to: endAddress [ simulator removeInstructionCacheFrom: startAddress to: endAddress ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> fp [ ^ self framePointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> fp: aValue [ ^ self framePointerRegisterValue: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue [ ^ self readRegister: self framePointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue: aValue [ self writeRegister: self framePointerRegister value: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> getLastAddress: abstractInstructions [ | last | @@ -381,13 +383,13 @@ ProcessorSimulator >> getLastAddress: abstractInstructions [ ^ last address + last machineCodeSize ] -{ #category : #testing } +{ #category : 'testing' } ProcessorSimulator >> hasLinkRegister [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initialize [ super initialize. @@ -397,91 +399,91 @@ ProcessorSimulator >> initialize [ self initializeRegisterSmalltalkAliases. ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initializeRegisterAliases [ "Hook for subclasses" ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initializeRegisterSmalltalkAliases [ "Hook for subclasses" ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue [ ^ self readRegister: self instructionPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue: aValue [ ^ self writeRegister: self instructionPointerRegister value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> integerRegisterState [ ^ { } ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastExecutedInstructionAddress [ ^ simulator lastExecutedInstructionAddress ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastExecutedInstructionSize [ ^ simulator lastExecutedInstructionSize ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastInstructionCount [ ^ simulator lastInstructionCount ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue [ ^ self readRegister: self linkRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue: aValue [ ^ self writeRegister: self linkRegister value: aValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> lr [ ^ self linkRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> lr: aValue [ ^ self linkRegisterValue: aValue ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> mapMemory: aMemory at: anAddress [ simulator @@ -490,7 +492,7 @@ ProcessorSimulator >> mapMemory: aMemory at: anAddress [ withPermissions: UnicornConstants permissionAll. ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ aSlangMemoryManager regionsDo: [ :startAddress :region | @@ -500,42 +502,42 @@ ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ self finishMappingMemory. ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> memory [ ^ memory ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> memory: aSpur64BitMMLECoSimulator [ memory := aSpur64BitMMLECoSimulator ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> memoryAt: address readNext: byteSize [ ^ simulator memoryAt: address readNext: byteSize ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> memoryAt: address write: bytes size: size [ simulator memoryAt: address write: bytes size: size ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> pc [ ^ self instructionPointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> pc: aValue [ ^ self instructionPointerRegisterValue: aValue ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> peek [ | stackAddressIntegerValue peekedByteArray | @@ -549,13 +551,13 @@ ProcessorSimulator >> peek [ ^ peekedByteArray ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> peekAddress [ ^ self peek integerAt: 1 size: self wordSize signed: false ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> popBytes [ | stackAddressIntegerValue aByteArray | @@ -572,7 +574,7 @@ ProcessorSimulator >> popBytes [ ^ aByteArray ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> popWord [ | aByteArray | @@ -580,7 +582,7 @@ ProcessorSimulator >> popWord [ ^ aByteArray integerAt: 1 size: self wordSize signed: false. ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> pushBytes: aByteArray [ | stackAddressIntegerValue | @@ -601,7 +603,7 @@ ProcessorSimulator >> pushBytes: aByteArray [ ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> pushWord: anInteger [ | aByteArray | @@ -610,7 +612,7 @@ ProcessorSimulator >> pushWord: anInteger [ self pushBytes: aByteArray ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readFloat64Register: aRegisterID [ | registerValue | @@ -620,7 +622,7 @@ ProcessorSimulator >> readFloat64Register: aRegisterID [ ^ registerValue doubleAt: 1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ | registerValue | @@ -629,7 +631,7 @@ ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ ^ registerValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readRegister: aRegisterID [ | registerValue size | @@ -638,37 +640,37 @@ ProcessorSimulator >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: size signed: false ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue [ ^ self readRegister: self receiverRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue: anInteger [ self writeRegister: self receiverRegister value: anInteger ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> register: anIndex readInto: aByteArray [ simulator register: anIndex readInto: aByteArray ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerAliases [ ^ registerAliases ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerDescriptors [ ^ self registerList collect: [ :reg | @@ -680,98 +682,98 @@ ProcessorSimulator >> registerDescriptors [ yourself ] ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerList [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue [ ^ self readRegister: self sendNumberOfArgumentsRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue: aValue [ ^ self writeRegister: self sendNumberOfArgumentsRegister value: aValue ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegister [ "By default they are the same" ^ self stackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue [ ^ self readRegister: self smalltalkStackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue: aValue [ self writeRegister: self smalltalkStackPointerRegister value: aValue ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> smashRegisterAccessors [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smashRegistersWithValuesFrom: base by: step [ self smashRegisterAccessors withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> sp [ ^ self stackPointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> sp: aValue [ ^ self stackPointerRegisterValue: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue [ ^ self readRegister: self stackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue: aValue [ self writeRegister: self stackPointerRegister value: aValue ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> stackValueAt: anInteger [ "Get a value from the stack at a 0-base position" @@ -780,7 +782,7 @@ ProcessorSimulator >> stackValueAt: anInteger [ ^ aByteArray integerAt: 1 size: self wordSize signed: false ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> stackValueBytesAt: position [ "Get the bytes from the stack at a 0-base position" @@ -798,7 +800,7 @@ ProcessorSimulator >> stackValueBytesAt: position [ ^ aByteArray ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> stackValues [ | initialValue | @@ -809,14 +811,14 @@ ProcessorSimulator >> stackValues [ ] ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> startAt: begin until: until timeout: timeout count: count [ self subclassResponsibility ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> step [ self @@ -826,36 +828,36 @@ ProcessorSimulator >> step [ count: 1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue [ ^ self readRegister: self temporaryRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue: anInteger [ ^ self writeRegister: self temporaryRegister value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> wordAt: anInteger [ ^ memory longAt: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> wordSize [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ | value | @@ -865,7 +867,7 @@ ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st index 7f3419228e..f4b6a25c2b 100644 --- a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st @@ -1,49 +1,50 @@ Class { - #name : #RegisterDescriptor, - #superclass : #Object, + #name : 'RegisterDescriptor', + #superclass : 'Object', #instVars : [ 'simulator', 'name', 'alias', 'smalltalkAlias' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> alias [ ^ alias ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -53,35 +54,35 @@ RegisterDescriptor >> printOn: aStream [ ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> smalltalkAlias [ ^ smalltalkAlias ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> smalltalkAlias: aString [ smalltalkAlias := aString ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/SmallInteger.extension.st b/smalltalksrc/VMMakerTests/SmallInteger.extension.st index f6dcb4fca2..d5f6ef6f2a 100644 --- a/smalltalksrc/VMMakerTests/SmallInteger.extension.st +++ b/smalltalksrc/VMMakerTests/SmallInteger.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SmallInteger } +Extension { #name : 'SmallInteger' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } SmallInteger >> forMemory: aMemory inMethod: anObject [ (self > aMemory maxSmallInteger or: [ self < aMemory minSmallInteger ]) ifTrue: [ self halt ]. diff --git a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st index e75c5e91a4..b5d4de558f 100644 --- a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st +++ b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SpurMemoryManager } +Extension { #name : 'SpurMemoryManager' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } SpurMemoryManager >> hiddenRootsObject: anInteger [ hiddenRootsObj := anInteger diff --git a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st index 8fce0dcfbe..aec69a0f71 100644 --- a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st @@ -15,8 +15,8 @@ temp2 method " Class { - #name : #StackBuilderTest, - #superclass : #VMInterpreterTests, + #name : 'StackBuilderTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'stackElement1', 'stackElement2', @@ -32,10 +32,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> addFullFrame [ | frame | @@ -69,78 +71,78 @@ StackBuilderTest >> addFullFrame [ ^ frame ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument1 [ ^ self offsetArgument2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument1FromBaseFP [ ^ self offsetArgument2FromBaseFP + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument2 [ "we skip the frame pointer" ^ self offsetMethod + 2 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument2FromBaseFP [ ^ 2 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetCallerFP [ ^ self offsetMethod + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetContext [ ^ self offsetFlags + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetFlags [ ^ self offsetReceiver + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetInstructionPointer [ ^ 0 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetMethod [ ^ self offsetContext + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetReceiver [ ^ self offsetTemp1 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetStackElement1 [ ^ self offsetStackElement2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetStackElement2 [ ^ self offsetInstructionPointer + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetTemp1 [ ^ self offsetTemp2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetTemp2 [ ^ self offsetStackElement1 + 1 ] -{ #category : #running } +{ #category : 'running' } StackBuilderTest >> setUp [ super setUp. @@ -155,14 +157,14 @@ StackBuilderTest >> setUp [ ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testCallerFrameOfTopFrameShouldBeSecondFrameBuilderObject [ "For debug purpose, we added a link to the caller frame in the current frame." self assert: (stackBuilder topFrame callerFrame) equals: (stackBuilder frames nextToLast) ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -170,7 +172,7 @@ StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ equals: stackBuilder frames second instructionPointer. ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ | frame | @@ -185,7 +187,7 @@ StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ | frame | @@ -200,7 +202,7 @@ StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -208,7 +210,7 @@ StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ "We have 3 frames. The caller of the top frame should be the middle one" @@ -216,7 +218,7 @@ StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPushed [ method := methodBuilder newMethod buildMethod. @@ -228,7 +230,7 @@ StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPu equals: (methodBuilder bytecodeAt: 0 forMethod: method) ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ | frame argNum | @@ -247,7 +249,7 @@ StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ self assert: frame argumentSize equals: argNum ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ | frame tempNum | @@ -268,37 +270,37 @@ StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ equals: (OrderedCollection new: tempNum withAll: memory nilObject) ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderArgument1InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument1FromBaseFP * memory bytesPerOop)) equals: argument1 ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderArgument2InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument2FromBaseFP * memory bytesPerOop)) equals: argument2 ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderContext [ self assert: (interpreter stackValue: self offsetContext) equals: context ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderMethod [ self assert: (interpreter stackValue: self offsetMethod) equals: method ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderReceiver [ self assert: (interpreter stackValue: self offsetReceiver) equals: receiver ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderStackElementIsReversed [ self assert: (interpreter stackValue: self offsetStackElement1) equals: stackElement1. @@ -306,7 +308,7 @@ StackBuilderTest >> testOrderStackElementIsReversed [ equals: stackElement2. ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ "When a process is suspended, the Instruction Pointer is pushed on the stack of the frame. It should be the last thing pushed, and therefore, be at the top. " @@ -314,7 +316,7 @@ StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ equals: instructionPointer. ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderTempIsReversed [ self assert: (interpreter stackValue: self offsetTemp1) equals: temp1. @@ -322,7 +324,7 @@ StackBuilderTest >> testOrderTempIsReversed [ equals: temp2. ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testPageHeadFPIsLastFrameFP [ "The FramePointer of the interpreter should be the FramePointer of the current process last pushed frame." self assert: interpreter framePointer diff --git a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st index 1ad516b356..f2768e954f 100644 --- a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st +++ b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #StackToRegisterMappingCogit } +Extension { #name : 'StackToRegisterMappingCogit' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } StackToRegisterMappingCogit >> methodOrBlockNumTemps: anInteger [ methodOrBlockNumTemps := anInteger diff --git a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st index bbe289597b..6d460c8943 100644 --- a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st +++ b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #UndefinedObject } +Extension { #name : 'UndefinedObject' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } UndefinedObject >> forMemory: aMemory inMethod: anObject [ ^ aMemory nilObject diff --git a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st index f2ff996e16..386b5360a0 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st @@ -1,64 +1,66 @@ Class { - #name : #UnicornARMv5Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornARMv5Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> arg0Register [ ^ UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> arg1Register [ ^ UcARMRegisters r4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> baseRegister [ ^ UcARMRegisters r10 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> cResultRegister [ ^ UcARMRegisters r0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg0Register [ ^ UcARMRegisters r0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg1Register [ ^ UcARMRegisters r1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg2Register [ ^ UcARMRegisters r2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg3Register [ ^ UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> classRegister [ ^ UcARMRegisters r8 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ anInteger < 0 ifFalse: [ ^ anInteger ]. @@ -66,7 +68,7 @@ UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ ^ 16rFFFFFFFF - anInteger abs + 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ (aTwoComplementNumber bitAnd: 1 << 31) = 0 ifTrue: [ @@ -75,7 +77,7 @@ UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ ^ aTwoComplementNumber - 16rFFFFFFFF - 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> createUnicorn [ "Enable Floating Point... @@ -112,13 +114,13 @@ UnicornARMv5Simulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv5Simulator >> disassembler [ ^ LLVMARMDisassembler armv7 ] -{ #category : #executing } +{ #category : 'executing' } UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | actualCount result error startTime remainingTimeout currentTime | @@ -174,25 +176,25 @@ UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout c self instructionPointerRegisterValue = until ifTrue: [ ^ result ]] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARMRegisters d0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARMRegisters d1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARMRegisters d2 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -203,42 +205,42 @@ UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> framePointerRegister [ ^ UcARMRegisters fp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornARMv5Simulator >> hasLinkRegister [ ^ true ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> instructionPointerRegister [ ^ UcARMRegisters pc ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> integerRegisterState [ ^ #() ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> linkRegister [ ^ UcARMRegisters lr ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -253,177 +255,177 @@ UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r0 [ ^ self readRegister: UcARMRegisters r0 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r0: anInteger [ ^ self writeRegister: UcARMRegisters r0 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r1 [ ^ self readRegister: UcARMRegisters r1 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r10 [ ^ self readRegister: UcARMRegisters r10 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r10: anInteger [ ^ self writeRegister: UcARMRegisters r10 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r11: anInteger [ ^ self writeRegister: UcARMRegisters r11 value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> r12 [ ^ self readRegister: UcARMRegisters r12 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r12: anInteger [ self writeRegister: UcARMRegisters r12 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r1: anInteger [ ^ self writeRegister: UcARMRegisters r1 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r2 [ ^ self readRegister: UcARMRegisters r2 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r2: anInteger [ ^ self writeRegister: UcARMRegisters r2 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r3 [ ^ self readRegister: UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r3: anInteger [ ^ self writeRegister: UcARMRegisters r3 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r4 [ ^ self readRegister: UcARMRegisters r4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r4: anInteger [ ^ self writeRegister: UcARMRegisters r4 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r5 [ ^ self readRegister: UcARMRegisters r5 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r5: anInteger [ ^ self writeRegister: UcARMRegisters r5 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r6 [ ^ self readRegister: UcARMRegisters r6 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r6: anInteger [ ^ self writeRegister: UcARMRegisters r6 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r7 [ ^ self readRegister: UcARMRegisters r7 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r7: anInteger [ ^ self writeRegister: UcARMRegisters r7 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r8 [ ^ self readRegister: UcARMRegisters r8 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r8: anInteger [ ^ self writeRegister: UcARMRegisters r8 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r9 [ ^ self readRegister: UcARMRegisters r9 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r9: anInteger [ ^ self writeRegister: UcARMRegisters r9 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> receiverRegister [ ^ UcARMRegisters r5 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> registerList [ ^ #(lr pc sp fp r0 r1 r2 r3 r4 r5 r6 r7 r8 r9) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> registerStateGetters [ ^#(r0 r1 r2 r3 r4) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> retpcIn: aMemory [ "The return address is on the stack, having been pushed by either simulateCallOf:nextpc:memory: or simulateJumpCallOf:memory:" ^memory longAt: self fp + 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> sendNumberOfArgumentsRegister [ ^ UcARMRegisters r6 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -438,40 +440,40 @@ UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ self pc: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self fp: self popWord. self pc: self popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(r0: r1: r2: r3: r9: r12: lr:) withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> smashRegisterAccessors [ ^ #(r0: r1: r2: r3:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> stackPointerRegister [ ^ UcARMRegisters sp ] -{ #category : #executing } +{ #category : 'executing' } UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: count [ begin == until ifTrue: [ ^ self ]. @@ -479,13 +481,13 @@ UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: cou ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> temporaryRegister [ ^ UcARMRegisters r2 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> wordSize [ ^ 4 ] diff --git a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st index bdda0e9ccd..50b83cf1f2 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st @@ -1,94 +1,96 @@ Class { - #name : #UnicornARMv8Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornARMv8Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg0Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg1Register [ ^ UcARM64Registers x1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg2Register [ ^ UcARM64Registers x2 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg3Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> baseRegister [ ^ UcARM64Registers x24 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> cResultRegister [ ^ UcARM64Registers x0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg0Register [ ^ UcARM64Registers x0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg1Register [ ^ UcARM64Registers x1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg2Register [ ^ UcARM64Registers x2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg3Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> carry [ ^ (self nzcv bitAnd: (1<<29))~= 0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> classRegister [ ^ UcARM64Registers x22 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1 [ ^ self readRegister: UcARM64Registers cpacr_el1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1: anInteger [ self writeRegister: UcARM64Registers cpacr_el1 value: anInteger ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornARMv8Simulator >> createUnicorn [ simulator := Unicorn arm64. @@ -97,31 +99,31 @@ UnicornARMv8Simulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv8Simulator >> disassembler [ ^ LLVMARMDisassembler aarch64 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARM64Registers d0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARM64Registers d1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARM64Registers d2 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -132,24 +134,24 @@ UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> framePointerRegister [ ^ UcARM64Registers fp ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornARMv8Simulator >> hasLinkRegister [ ^ true ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornARMv8Simulator >> initializeRegisterAliases [ registerAliases @@ -162,37 +164,37 @@ UnicornARMv8Simulator >> initializeRegisterAliases [ at: #x30 put: #linkRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> instructionPointerRegister [ ^ UcARM64Registers pc ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> linkRegister [ ^ UcARM64Registers x30 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> negative [ ^ (self nzcv bitAnd: (1<<31))~= 0 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> nzcv [ ^ self readRegister: UcARM64Registers nzcv ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> overflow [ ^ (self nzcv bitAnd: (1<<28)) ~= 0 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemory [ "" "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -206,37 +208,37 @@ UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemo ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> receiverRegister [ ^ UcARM64Registers x23 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv8Simulator >> registerList [ ^ #(lr pc sp fp x28 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x16 x19 x20 x22 x23 x24 x25 zero negative carry overflow v0 v1 v2) ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> registerStateGetters [ ^#( x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x12 sp lr pc) ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> retpcIn: aMemory [ ^ memory longAt: self fp + 8 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> sendNumberOfArgumentsRegister [ ^ UcARM64Registers x25 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -253,14 +255,14 @@ UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ self instructionPointerRegisterValue: address ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self framePointerRegisterValue: self popWord. @@ -270,13 +272,13 @@ UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> smalltalkStackPointerRegister [ "Internally to execute Smalltalk code we use X28 as the stack pointer register" ^ UcARM64Registers x28 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(x0: x1: x2: x3: x4: x5: lr:) withIndexDo: @@ -284,373 +286,373 @@ UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step self perform: accessor with: index - 1 * step + base] ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x0: x1: x2: x3: x4: x5: x6: x7: x8: x9: x10: x11: x12: ) ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> stackPointerRegister [ ^ UcARM64Registers sp ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> temporaryRegister [ ^ UcARM64Registers x1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v0 [ ^ self readRawRegister: UcARM64Registers v0 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v1 [ ^ self readRawRegister: UcARM64Registers v1 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v2 [ ^ self readRawRegister: UcARM64Registers v2 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcARM64Registers v0 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister1Value [ ^ simulator readRegisterId: UcARM64Registers v1 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister2Value [ ^ simulator readRegisterId: UcARM64Registers v2 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> w25: anInteger [ self writeRegister: UcARM64Registers w25 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> w6: anInteger [ self writeRegister: UcARM64Registers w6 value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv8Simulator >> wordSize [ ^ 8 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x0 [ ^ self readRegister: UcARM64Registers x0 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x0: anInteger [ self writeRegister: UcARM64Registers x0 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x1 [ ^ self readRegister: UcARM64Registers x1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x10 [ ^ self readRegister: UcARM64Registers x10 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x10: anInteger [ ^ self writeRegister: UcARM64Registers x10 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x11 [ ^ self readRegister: UcARM64Registers x11 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x11: anInteger [ ^ self writeRegister: UcARM64Registers x11 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x12 [ ^ self readRegister: UcARM64Registers x12 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x12: anInteger [ ^ self writeRegister: UcARM64Registers x12 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x13: anInteger [ self writeRegister: UcARM64Registers x13 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x14: anInteger [ self writeRegister: UcARM64Registers x14 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x15: anInteger [ self writeRegister: UcARM64Registers x15 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x16 [ ^ self readRegister: UcARM64Registers x16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x16: anInteger [ self writeRegister: UcARM64Registers x16 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x17: anInteger [ self writeRegister: UcARM64Registers x17 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x18: anInteger [ self writeRegister: UcARM64Registers x18 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x19 [ ^ self readRegister: UcARM64Registers x19 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x19: anInteger [ self writeRegister: UcARM64Registers x19 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x1: anInteger [ ^ self writeRegister: UcARM64Registers x1 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x2 [ ^ self readRegister: UcARM64Registers x2 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x20 [ ^ self readRegister: UcARM64Registers x20 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x22 [ ^ self readRegister: UcARM64Registers x22 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x23 [ ^ self readRegister: UcARM64Registers x23 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x23: anInteger [ self writeRegister: UcARM64Registers x23 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x24 [ ^ self readRegister: UcARM64Registers x24 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x24: anInteger [ self writeRegister: UcARM64Registers x24 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x25 [ ^ self readRegister: UcARM64Registers x25 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x25: anInteger [ self writeRegister: UcARM64Registers x25 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x28 [ ^ self readRegister: UcARM64Registers x28 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x28: anInteger [ self writeRegister: UcARM64Registers x28 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x29: anInteger [ ^ self writeRegister: UcARM64Registers x29 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x2: anInteger [ ^ self writeRegister: UcARM64Registers x2 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x3 [ ^ self readRegister: UcARM64Registers x3 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x30: anInteger [ self writeRegister: UcARM64Registers x30 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x3: anInteger [ ^ self writeRegister: UcARM64Registers x3 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x4 [ ^ self readRegister: UcARM64Registers x4 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x4: anInteger [ ^ self writeRegister: UcARM64Registers x4 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x5 [ ^ self readRegister: UcARM64Registers x5 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x5: anInteger [ ^ self writeRegister: UcARM64Registers x5 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x6 [ ^ self readRegister: UcARM64Registers x6 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x6: anInteger [ ^ self writeRegister: UcARM64Registers x6 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x7 [ ^ self readRegister: UcARM64Registers x7 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x7: anInteger [ ^ self writeRegister: UcARM64Registers x7 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x8 [ ^ self readRegister: UcARM64Registers x8 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x8: anInteger [ ^ self writeRegister: UcARM64Registers x8 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x9 [ ^ self readRegister: UcARM64Registers x9 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x9: anInteger [ ^ self writeRegister: UcARM64Registers x9 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> xzr [ ^ self readRegister: UcARM64Registers xzr ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> xzr: anInteger [ ^ self writeRegister: UcARM64Registers xzr value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> zero [ ^ (self nzcv bitAnd: (1<<30)) ~= 0 diff --git a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st index 3130e440a5..539e97b80e 100644 --- a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st @@ -1,191 +1,193 @@ Class { - #name : #UnicornI386Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornI386Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> arg0Register [ ^ UcX86Registers esi ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> baseRegister [ ^ UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> cResultRegister [ ^ UcX86Registers eax ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg0 [ "Stack value 0 is return address" ^ self stackValueAt: 1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg1 [ "Stack value 0 is return address" ^ self stackValueAt: 2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg2 [ "Stack value 0 is return address" ^ self stackValueAt: 3 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg3 [ "Stack value 0 is return address" ^ self stackValueAt: 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> classRegister [ ^ UcX86Registers ecx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> createUnicorn [ ^ Unicorn x86 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornI386Simulator >> disassembler [ ^ LLVMDisassembler i386 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> eax [ ^ self readRegister: UcX86Registers eax ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eax: anInteger [ self writeRegister: UcX86Registers eax value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ebp [ ^ self readRegister: UcX86Registers ebp ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ebp: anInteger [ self framePointerRegisterValue: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ebx [ ^ self readRegister: UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ebx: anInteger [ self writeRegister: UcX86Registers ebx value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ecx [ ^ self readRegister: UcX86Registers ecx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ecx: anInteger [ self writeRegister: UcX86Registers ecx value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> edi [ ^ self readRegister: UcX86Registers edi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> edi: anInteger [ self writeRegister: UcX86Registers edi value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> edx [ ^ self readRegister: UcX86Registers edx ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> edx: anInteger [ ^ self writeRegister: UcX86Registers edx value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eflags [ ^ self readRegister: UcX86Registers eflags ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> eip [ ^ self readRegister: UcX86Registers eip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eip: anInteger [ self writeRegister: UcX86Registers eip value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> esi [ ^ self readRegister: UcX86Registers esi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> esi: anInteger [ self writeRegister: UcX86Registers esi value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> esp [ ^ self readRegister: UcX86Registers esp ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> esp: anInteger [ self stackPointerRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -195,38 +197,38 @@ UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> framePointerRegister [ ^ UcX86Registers ebp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> hasLinkRegister [ ^ false ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> instructionPointerRegister [ ^ UcX86Registers eip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> integerRegisterState [ ^{ self eax. self ebx. self ecx. self edx. self esp. self ebp. self esi. self edi. self eip. self eflags } ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. On IA32 this typically means accessing stacked arguments @@ -237,31 +239,31 @@ UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ memory longAt: self ebp + i ] ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> receiverRegister [ ^ UcX86Registers edx ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> registerList [ ^ #(eip eax ebx ecx edx esp ebp esi edi) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> retpcIn: aMemory [ ^ memory longAt: self ebp + 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -273,21 +275,21 @@ UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ self eip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self eip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateReturnIn: aMemory [ self ebp: self popWord. self eip: self popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(eax: ecx: edx:) withIndexDo: @@ -295,26 +297,26 @@ UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step i self perform: accessor with: index - 1 * step + base] ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> smashRegisterAccessors [ ^#(eax: ebx: ecx: edx: esi: edi:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> stackPointerRegister [ ^ UcX86Registers esp ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> temporaryRegister [ "Assume SysV" ^ UcX86Registers eax ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> wordSize [ ^ 4 diff --git a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st index 8931a8e659..be91859d3a 100644 --- a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st +++ b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st @@ -1,63 +1,65 @@ Class { - #name : #UnicornInvalidMemoryAccess, - #superclass : #Error, + #name : 'UnicornInvalidMemoryAccess', + #superclass : 'Error', #instVars : [ 'type', 'address', 'size', 'value' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> address [ ^ address ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> address: anObject [ address := anObject ] -{ #category : #testing } +{ #category : 'testing' } UnicornInvalidMemoryAccess >> isFetch [ ^ self type value anyMask: UcMemoryAccessType UC_MEM_FETCH value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> messageText [ ^ type item asString, ' at ', address hex ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> size [ ^ size ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> size: anObject [ size := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> type [ ^ type ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> type: anObject [ type := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> value [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> value: anObject [ value := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st index 474a23f736..43e7716bc9 100644 --- a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st @@ -1,104 +1,106 @@ Class { - #name : #UnicornProcessor, - #superclass : #Object, + #name : 'UnicornProcessor', + #superclass : 'Object', #instVars : [ 'machineSimulator' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> cResultRegister [ ^ machineSimulator cResultRegisterValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> cResultRegister: anInteger [ machineSimulator cResultRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> convertIntegerToInternal: anInteger [ ^ machineSimulator convertIntegerToInternal: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> convertInternalToInteger: anInteger [ ^ machineSimulator convertInternalToInteger: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> eax: anInteger [ machineSimulator eax: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ebp: anInteger [ machineSimulator ebp: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ebx: anInteger [ machineSimulator ebx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ecx: anInteger [ machineSimulator ecx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> edi: anInteger [ machineSimulator edi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> edx: anInteger [ ^ machineSimulator edx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> esp: anInteger [ machineSimulator esp: anInteger ] -{ #category : #caching } +{ #category : 'caching' } UnicornProcessor >> flushICacheFrom: startAddress to: endAddress [ "Do nothing for now..." machineSimulator flushICacheFrom: startAddress to: endAddress ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> fp [ ^ machineSimulator framePointerRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> fp: aValue [ ^ machineSimulator framePointerRegisterValue: aValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> hasLinkRegister [ ^ machineSimulator hasLinkRegister ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> initializeStackFor: aCompiler [ "Initialize the machine code simulator" @@ -109,192 +111,192 @@ UnicornProcessor >> initializeStackFor: aCompiler [ aCompiler backend configureStackAlignment ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> integerRegisterState [ ^ machineSimulator integerRegisterState ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> linkRegisterValue [ ^ machineSimulator linkRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> lr: anInteger [ machineSimulator lr: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> machineSimulator [ ^ machineSimulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> machineSimulator: aMachineSimulator [ machineSimulator := aMachineSimulator ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> pc [ ^ machineSimulator instructionPointerRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> pc: anInteger [ ^ machineSimulator instructionPointerRegisterValue: anInteger ] -{ #category : #'stack-management' } +{ #category : 'stack-management' } UnicornProcessor >> popWord [ ^ machineSimulator popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory [ ^ machineSimulator postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory ] -{ #category : #'stack-management' } +{ #category : 'stack-management' } UnicornProcessor >> pushWord: anInteger [ machineSimulator pushWord: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r0: anInteger [ ^ machineSimulator r0: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r10: anInteger [ machineSimulator r10: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r11: anInteger [ machineSimulator r11: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r1: anInteger [ ^ machineSimulator r1: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r2: anInteger [ machineSimulator r2: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r3: anInteger [ machineSimulator r3: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r4: anInteger [ machineSimulator r4: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r5: anInteger [ machineSimulator r5: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r6: anInteger [ machineSimulator r6: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r8 [ ^ machineSimulator r8 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r8: anInteger [ machineSimulator r8: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r9: anInteger [ machineSimulator r9: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r9b: anInteger [ machineSimulator r9b: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rax: anInteger [ machineSimulator rax: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rbp: anInteger [ machineSimulator rbp: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rcx: anInteger [ machineSimulator rcx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> rdi: anInteger [ machineSimulator rdi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rdx: anInteger [ machineSimulator rdx: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> retpcIn: aSpurSimulatedMemory [ ^ machineSimulator retpcIn: aSpurSimulatedMemory ] -{ #category : #'accessing registers' } +{ #category : 'accessing registers' } UnicornProcessor >> rsi: anInteger [ ^ machineSimulator rsi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rsp: anInteger [ machineSimulator rsp: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnlyBelow: minimumWritableAddress [ @@ -304,7 +306,7 @@ UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnly count: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> runUntil: anAddress [ ^ machineSimulator startAt: machineSimulator instructionPointerRegisterValue @@ -313,165 +315,165 @@ UnicornProcessor >> runUntil: anAddress [ count: 0 ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornProcessor >> setFramePointer: framePointer stackPointer: stackPointer [ machineSimulator framePointerRegisterValue: framePointer. machineSimulator stackPointerRegisterValue: stackPointer ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory [ machineSimulator simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ machineSimulator simulateLeafCallOf: address nextpc: nextpc memory: aMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateReturnIn: aSpurSimulatedMemory [ ^ machineSimulator simulateReturnIn: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory [ machineSimulator smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> smashRegistersWithValuesFrom: base by: step [ machineSimulator smashRegistersWithValuesFrom: base by: step ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> sp [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> sp: anInteger [ machineSimulator stackPointerRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> w25: anInteger [ machineSimulator w25: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> w6: anInteger [ machineSimulator w6: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x12: anInteger [ machineSimulator x12: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x16: anInteger [ machineSimulator x16: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x19: anInteger [ machineSimulator x19: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x1: anInteger [ machineSimulator x1: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x23: anInteger [ machineSimulator x23: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x24: anInteger [ machineSimulator x24: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x25: anInteger [ machineSimulator x25: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x28: anInteger [ machineSimulator x28: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x29: anInteger [ machineSimulator x29: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x30: anInteger [ machineSimulator x30: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x3: anInteger [ machineSimulator x3: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x4: anInteger [ machineSimulator x4: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x5: anInteger [ machineSimulator x5: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x6: anInteger [ machineSimulator x6: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x7: anInteger [ machineSimulator x7: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> xzr [ ^ machineSimulator xzr ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> xzr: anInteger [ machineSimulator xzr: anInteger diff --git a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st index c65b477cae..2895ec60c8 100644 --- a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st @@ -1,64 +1,66 @@ Class { - #name : #UnicornRISCVSimulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornRISCVSimulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> arg0Register [ ^ UcRISCVRegisters x10 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> arg1Register [ ^ UcRISCVRegisters x11 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> baseRegister [ ^ UcRISCVRegisters x26 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> cResultRegister [ ^ UcRISCVRegisters x12 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg0Register [ ^ UcRISCVRegisters x12 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg1Register [ ^ UcRISCVRegisters x13 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg2Register [ ^ UcRISCVRegisters x14 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg3Register [ ^ UcRISCVRegisters x15 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> classRegister [ ^ UcRISCVRegisters x23 ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornRISCVSimulator >> createUnicorn [ simulator := Unicorn riscv64. @@ -67,290 +69,290 @@ UnicornRISCVSimulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> disassembler [ ^ LLVMRV64Disassembler riscv64 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister0 [ ^ UcRISCVRegisters f0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister1 [ ^ UcRISCVRegisters f1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister2 [ ^ UcRISCVRegisters f2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f0 [ ^ self readRegister: UcRISCVRegisters f0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f1 [ ^ self readRegister: UcRISCVRegisters f1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f10 [ ^ self readRegister: UcRISCVRegisters f10 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f11 [ ^ self readRegister: UcRISCVRegisters f11 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f12 [ ^ self readRegister: UcRISCVRegisters f12 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f13 [ ^ self readRegister: UcRISCVRegisters f13 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f14 [ ^ self readRegister: UcRISCVRegisters f14 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f15 [ ^ self readRegister: UcRISCVRegisters f15 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f16 [ ^ self readRegister: UcRISCVRegisters f16 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f17 [ ^ self readRegister: UcRISCVRegisters f17 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f18 [ ^ self readRegister: UcRISCVRegisters f18 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f19 [ ^ self readRegister: UcRISCVRegisters f19 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f2 [ ^ self readRegister: UcRISCVRegisters f2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f20 [ ^ self readRegister: UcRISCVRegisters f20 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f21 [ ^ self readRegister: UcRISCVRegisters f21 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f22 [ ^ self readRegister: UcRISCVRegisters f22 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f23 [ ^ self readRegister: UcRISCVRegisters f23 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f24 [ ^ self readRegister: UcRISCVRegisters f24 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f25 [ ^ self readRegister: UcRISCVRegisters f25 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f26 [ ^ self readRegister: UcRISCVRegisters f26 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f27 [ ^ self readRegister: UcRISCVRegisters f27 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f28 [ ^ self readRegister: UcRISCVRegisters f28 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f29 [ ^ self readRegister: UcRISCVRegisters f29 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f3 [ ^ self readRegister: UcRISCVRegisters f3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f30 [ ^ self readRegister: UcRISCVRegisters f30 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f31 [ ^ self readRegister: UcRISCVRegisters f31 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f4 [ ^ self readRegister: UcRISCVRegisters f4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f5 [ ^ self readRegister: UcRISCVRegisters f5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f6 [ ^ self readRegister: UcRISCVRegisters f6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f7 [ ^ self readRegister: UcRISCVRegisters f7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f8 [ ^ self readRegister: UcRISCVRegisters f8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f9 [ ^ self readRegister: UcRISCVRegisters f9 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagCarryRegister [ ^ UcRISCVRegisters x31 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagCarryRegisterValue [ ^ self readRegister: self flagCarryRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegister [ ^ UcRISCVRegisters x30 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegisterValue [ ^ self readRegister: self flagOverflowRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagSignRegister [ ^ UcRISCVRegisters x29 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagSignRegisterValue [ ^ self readRegister: self flagSignRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagZeroRegister [ ^ UcRISCVRegisters x28 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagZeroRegisterValue [ ^ self readRegister: self flagZeroRegister ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> framePointerRegister [ "Frame Pointer" ^ UcRISCVRegisters x8 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornRISCVSimulator >> hasLinkRegister [ ^ true ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> initializeRegisterAliases [ registerAliases @@ -396,7 +398,7 @@ UnicornRISCVSimulator >> initializeRegisterAliases [ at: #f7 put: #ft7 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ registerSmalltalkAliases @@ -425,43 +427,43 @@ UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ at: #x31 put: #carry ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> instructionPointerRegister [ ^ UcRISCVRegisters pc ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> linkRegister [ ^ UcRISCVRegisters x1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatus [ ^ UcRISCVRegisters mstatus ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue [ ^ self readRegister: self mstatus ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue: aValue [ ^ self writeRegister: self mstatus value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> receiverRegister [ ^ UcRISCVRegisters x24 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRISCVSimulator >> registerList [ ^ #(lr pc sp fp @@ -470,375 +472,375 @@ UnicornRISCVSimulator >> registerList [ f0 f1 f2 f3 f4 f5 f6 f7) ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s0 [ ^ self readRegister: UcRISCVRegisters s0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s0: aValue [ ^ self writeRegister: UcRISCVRegisters s0 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s2 [ ^ self readRegister: UcRISCVRegisters s2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s2: aValue [ ^ self writeRegister: UcRISCVRegisters s2 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s7 [ ^ self readRegister: UcRISCVRegisters s7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s7: aValue [ ^ self writeRegister: UcRISCVRegisters s7 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s8 [ ^ self readRegister: UcRISCVRegisters s8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s8: aValue [ ^ self writeRegister: UcRISCVRegisters s8 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s9 [ ^ self readRegister: UcRISCVRegisters s9 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s9: aValue [ ^ self writeRegister: UcRISCVRegisters s9 value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> sendNumberOfArgumentsRegister [ ^ UcRISCVRegisters x25 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> simulateLeafCallOf: destinationAddress nextpc: returnAddress memory: anUndefinedObject [ self linkRegisterValue: returnAddress. self instructionPointerRegisterValue: destinationAddress ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x1: x5: x6: x7: x10: x11: x12: x13: x14: x15: x16: x17: x28: x29: x30: x31:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> stackPointerRegister [ ^ UcRISCVRegisters x2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t0 [ ^ self readRegister: UcRISCVRegisters t0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t0: aValue [ ^ self writeRegister: UcRISCVRegisters t0 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t1 [ ^ self readRegister: UcRISCVRegisters t1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t1: aValue [ ^ self writeRegister: UcRISCVRegisters t1 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t2 [ ^ self readRegister: UcRISCVRegisters t2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t2: aValue [ ^ self writeRegister: UcRISCVRegisters t2 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t3 [ ^ self readRegister: UcRISCVRegisters t3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t3: aValue [ ^ self writeRegister: UcRISCVRegisters t3 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t4 [ ^ self readRegister: UcRISCVRegisters t4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t4: aValue [ ^ self writeRegister: UcRISCVRegisters t4 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t5 [ ^ self readRegister: UcRISCVRegisters t5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t5: aValue [ ^ self writeRegister: UcRISCVRegisters t5 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t6 [ ^ self readRegister: UcRISCVRegisters t6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t6: aValue [ ^ self writeRegister: UcRISCVRegisters t6 value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> temporaryRegister [ ^ UcRISCVRegisters x22 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRISCVSimulator >> wordSize [ ^ 8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x0 [ ^ self readRegister: UcRISCVRegisters x0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x1 [ ^ self readRegister: UcRISCVRegisters x1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x10 [ ^ self readRegister: UcRISCVRegisters x10 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x11 [ ^ self readRegister: UcRISCVRegisters x11 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x12 [ ^ self readRegister: UcRISCVRegisters x12 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x13 [ ^ self readRegister: UcRISCVRegisters x13 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x14 [ ^ self readRegister: UcRISCVRegisters x14 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x15 [ ^ self readRegister: UcRISCVRegisters x15 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x16 [ ^ self readRegister: UcRISCVRegisters x16 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x17 [ ^ self readRegister: UcRISCVRegisters x17 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x18 [ ^ self readRegister: UcRISCVRegisters x18 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x19 [ ^ self readRegister: UcRISCVRegisters x19 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x2 [ ^ self readRegister: UcRISCVRegisters x2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x20 [ ^ self readRegister: UcRISCVRegisters x20 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x21 [ ^ self readRegister: UcRISCVRegisters x21 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x22 [ ^ self readRegister: UcRISCVRegisters x22 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x23 [ ^ self readRegister: UcRISCVRegisters x23 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x24 [ ^ self readRegister: UcRISCVRegisters x24 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x25 [ ^ self readRegister: UcRISCVRegisters x25 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x26 [ ^ self readRegister: UcRISCVRegisters x26 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x27 [ ^ self readRegister: UcRISCVRegisters x27 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x28 [ ^ self readRegister: UcRISCVRegisters x28 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x29 [ ^ self readRegister: UcRISCVRegisters x29 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x3 [ ^ self readRegister: UcRISCVRegisters x3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x30 [ ^ self readRegister: UcRISCVRegisters x30 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x31 [ ^ self readRegister: UcRISCVRegisters x31 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x4 [ ^ self readRegister: UcRISCVRegisters x4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x5 [ ^ self readRegister: UcRISCVRegisters x5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x6 [ ^ self readRegister: UcRISCVRegisters x6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x7 [ ^ self readRegister: UcRISCVRegisters x7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x8 [ ^ self readRegister: UcRISCVRegisters x8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x9 [ ^ self readRegister: UcRISCVRegisters x9 diff --git a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st index 4302fb7c83..401ef8c3e9 100644 --- a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st @@ -1,48 +1,50 @@ Class { - #name : #UnicornRegisterDescriptor, - #superclass : #Object, + #name : 'UnicornRegisterDescriptor', + #superclass : 'Object', #instVars : [ 'simulator', 'name', 'alias' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> alias [ ^ alias ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -52,23 +54,23 @@ UnicornRegisterDescriptor >> printOn: aStream [ ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st index 0b5790d901..cd421437e1 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st @@ -1,14 +1,16 @@ Class { - #name : #UnicornSimulationTrap, - #superclass : #Object, + #name : 'UnicornSimulationTrap', + #superclass : 'Object', #instVars : [ 'unicornInvalidAccess', 'simulator' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemoryAccess [ ^ self new @@ -17,13 +19,13 @@ UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemor yourself ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> address [ ^ unicornInvalidAccess address ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> nextpc [ | instruction | @@ -31,7 +33,7 @@ UnicornSimulationTrap >> nextpc [ ^ self simulator instructionPointerRegisterValue + instruction size ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> registerAccessor [ "Assume this is a read of a value into a register" @@ -44,18 +46,18 @@ UnicornSimulationTrap >> registerAccessor [ ^ (registerName , ':') asSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> type [ unicornInvalidAccess type = UcMemoryAccessType UC_MEM_WRITE_UNMAPPED @@ -68,12 +70,12 @@ UnicornSimulationTrap >> type [ self halt ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> unicornInvalidAccess: anUnicornInvalidMemoryAccess [ unicornInvalidAccess := anUnicornInvalidMemoryAccess ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> writtenValue [ "This is the value that was tried to be written but failed (if this is a failed write)" ^ unicornInvalidAccess value diff --git a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st index c8194d7391..fc5d4a2eff 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st @@ -1,26 +1,28 @@ Class { - #name : #UnicornSimulator, - #superclass : #ProcessorSimulator, + #name : 'UnicornSimulator', + #superclass : 'ProcessorSimulator', #instVars : [ 'stopReason', 'invalidAccessHandler' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } UnicornSimulator class >> supportsISA: isa [ ^ #( #ARMv5 #ARMv8 #IA32 #X64 #aarch64 #riscv64 ) includes: isa ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> createUnicorn [ self subclassResponsibility ] -{ #category : #executing } +{ #category : 'executing' } UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | result error startTime currentTime remainingTimeout remainingCount | @@ -71,13 +73,13 @@ UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: ifTrue: [ ^ result ]] ] -{ #category : #'stack-access' } +{ #category : 'stack-access' } UnicornSimulator >> finishMappingMemory [ "Do nothing in the case of Unicorn, is useful if the simulator used has to map memory by hand" ] -{ #category : #'handling invalid accesses' } +{ #category : 'handling invalid accesses' } UnicornSimulator >> handleInvalidAccess: invalidAccess [ | previousInstructionPointer hasToContinue | @@ -95,7 +97,7 @@ UnicornSimulator >> handleInvalidAccess: invalidAccess [ ^ hasToContinue ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> initialize [ super initialize. @@ -110,7 +112,7 @@ UnicornSimulator >> initialize [ true] ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> initializeUnicorn [ simulator @@ -126,12 +128,12 @@ UnicornSimulator >> initializeUnicorn [ false ] ] -{ #category : #'handling invalid accesses' } +{ #category : 'handling invalid accesses' } UnicornSimulator >> invalidAccessHandler: aFullBlockClosure [ invalidAccessHandler := aFullBlockClosure ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ simulator @@ -140,7 +142,7 @@ UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ address = anAddress ifTrue: [ aBlock value ] ] ] -{ #category : #executing } +{ #category : 'executing' } UnicornSimulator >> startAt: begin until: until timeout: timeout count: count [ ^ self doStartAt: begin until: until timeout: timeout count: count. diff --git a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st index 12be3bf4bf..e070ae5e0a 100644 --- a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st +++ b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st @@ -1,18 +1,20 @@ Class { - #name : #UnicornTimeout, - #superclass : #Error, + #name : 'UnicornTimeout', + #superclass : 'Error', #instVars : [ 'target' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornTimeout >> target [ ^ target ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornTimeout >> target: anObject [ target := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st index d7176e7d9a..4dfd2f5b9d 100644 --- a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st @@ -1,98 +1,100 @@ Class { - #name : #UnicornX64Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornX64Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> arg0Register [ ^ UcX86Registers rdi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> arg1Register [ ^ UcX86Registers rsi ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> baseRegister [ ^ UcX86Registers rbx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> cResultRegister [ ^ UcX86Registers rax ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg0Register [ "Assume SysV" ^ UcX86Registers rdi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg1Register [ "Assume SysV" ^ UcX86Registers rsi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg2Register [ "Assume SysV" ^ UcX86Registers rdx ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg3Register [ "Assume SysV" ^ UcX86Registers rcx ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> classRegister [ ^ UcX86Registers rcx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> createUnicorn [ ^ Unicorn x8664 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornX64Simulator >> disassembler [ ^ LLVMDisassembler amd64 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcX86Registers xmm1 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcX86Registers xmm2 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -102,25 +104,25 @@ UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> framePointerRegister [ ^ UcX86Registers rbp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : #testing } +{ #category : 'testing' } UnicornX64Simulator >> hasLinkRegister [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornX64Simulator >> initializeRegisterAliases [ registerAliases @@ -131,19 +133,19 @@ UnicornX64Simulator >> initializeRegisterAliases [ at: #rbp put: #framePointerRegister ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> instructionPointerRegister [ ^ UcX86Registers rip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> integerRegisterState [ ^ #() ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a Win64 or SysV ABI call. On X64 this simply means accessing register arguments. @@ -158,266 +160,266 @@ UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ self perform: getter] ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r10 [ ^ self readRegister: UcX86Registers r10 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r10: anInteger [ ^ self writeRegister: UcX86Registers r10 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r11 [ ^ self readRegister: UcX86Registers r11 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r11: anInteger [ ^ self writeRegister: UcX86Registers r11 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r12 [ ^ self readRegister: UcX86Registers r12 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r12: anInteger [ ^ self writeRegister: UcX86Registers r12 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r13: anInteger [ self writeRegister: UcX86Registers r13 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r14: anInteger [ self writeRegister: UcX86Registers r14 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r15: anInteger [ self writeRegister: UcX86Registers r15 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r1: anInteger [ ^ self writeRegister: UcX86Registers r1 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r2: anInteger [ ^ self writeRegister: UcX86Registers r2 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r3: anInteger [ ^ self writeRegister: UcX86Registers r3 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r4: anInteger [ ^ self writeRegister: UcX86Registers r4 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r5: anInteger [ ^ self writeRegister: UcX86Registers r5 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r6: anInteger [ ^ self writeRegister: UcX86Registers r6 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r7: anInteger [ ^ self writeRegister: UcX86Registers r7 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r8 [ ^ self readRegister: UcX86Registers r8 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r8: anInteger [ ^ self writeRegister: UcX86Registers r8 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r9 [ ^ self readRegister: UcX86Registers r9 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r9: anInteger [ ^ self writeRegister: UcX86Registers r9 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r9b: anInteger [ self writeRegister: UcX86Registers r9b value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rax [ ^ self readRegister: UcX86Registers rax ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rax: anInteger [ self writeRegister: UcX86Registers rax value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbp [ ^ self readRegister: UcX86Registers rbp ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbp: anInteger [ ^ self writeRegister: UcX86Registers rbp value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbx [ ^ self readRegister: UcX86Registers rbx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbx: aValue [ ^ self writeRegister: UcX86Registers rbx value: aValue ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rcx [ ^ self readRegister: UcX86Registers rcx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rcx: anInteger [ ^ self writeRegister: UcX86Registers rcx value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdi [ ^ self readRegister: UcX86Registers rdi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rdi: anInteger [ self writeRegister: UcX86Registers rdi value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdx [ ^ self readRegister: UcX86Registers rdx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdx: anInteger [ ^ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> receiverRegister [ ^ UcX86Registers rdx ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> registerList [ ^ #(rip rax rbx rcx rdx rsp rbp r8 r9 r10 r11 r12 rsi rdi) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> retpcIn: aSpurSimulatedMemory [ ^ memory long64At: self rbp + 8 ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rip [ ^ self readRegister: UcX86Registers rip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rip: anInteger [ self writeRegister: UcX86Registers rip value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsi [ ^ self readRegister: UcX86Registers rsi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rsi: anInteger [ self writeRegister: UcX86Registers rsi value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsp [ ^ self readRegister: UcX86Registers rsp ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsp: anInteger [ ^ self writeRegister: UcX86Registers rsp value: anInteger ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers r9 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -437,21 +439,21 @@ UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ self rip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self rip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateReturnIn: aMemory [ self rbp: (self popWord). self rip: (self popWord) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ | volatileRegisters | CogX64Compiler isSysV @@ -469,50 +471,50 @@ UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in self perform: setter with: index - 1 * step + base] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> smashRegisterAccessors [ ^#(rax: rbx: rcx: rdx: rsi: rdi: r8: r9: r10: r11: r12: r13: r14: r15:) ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> stackPointerRegister [ ^ UcX86Registers rsp ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> temporaryRegister [ "Both in System V and Windows" ^ UcX86Registers rax ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> wordSize [ ^ 8 ] -{ #category : #'accessing - registers' } +{ #category : 'accessing - registers' } UnicornX64Simulator >> xmm0 [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> xmm1 [ ^ simulator readRegisterId: UcX86Registers xmm1 size: 16 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> xmm2 [ ^ simulator readRegisterId: UcX86Registers xmm2 size: 16 diff --git a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st index a4cd67ccdf..386f10c484 100644 --- a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMARMStackAlignmentTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMARMStackAlignmentTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'instructions' ], #pools : [ 'CogAbstractRegisters' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMStackAlignmentTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -18,25 +20,25 @@ VMARMStackAlignmentTest class >> wordSizeParameters [ yourself ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> addInstruction: anInstruction [ instructions add: anInstruction ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> disassembleInstructions [ ^ self disassembleFrom: cogInitialAddress opcodes: instructions size ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> runInstructions [ ^ self runFrom: cogInitialAddress until: cogInitialAddress + (instructions size * 4) ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> setUp [ super setUp. @@ -45,7 +47,7 @@ VMARMStackAlignmentTest >> setUp [ machineSimulator stackPointerRegisterValue: interpreter rumpCStackAddress ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ "To start the stack pointer should be aligned" @@ -96,7 +98,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ equals: 'Unhandled CPU exception (UC_ERR_EXCEPTION)' ] ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ "To start the stack pointer should be aligned" @@ -135,7 +137,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> writeInstructions [ cogInitialAddress := cogit methodZone allocate: instructions size * 4 . diff --git a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st index 82faa50100..522508bad7 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMARMV8SIMDEncodingTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMARMV8SIMDEncodingTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMV8SIMDEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -12,7 +14,7 @@ VMARMV8SIMDEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> armInstructionAt: index [ | addr inst | @@ -22,20 +24,20 @@ VMARMV8SIMDEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : #configuration } +{ #category : 'configuration' } VMARMV8SIMDEncodingTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } VMARMV8SIMDEncodingTest >> initializationOptions [ ^ super initializationOptions , { #ProcessorClass . DummyProcessor } ] -{ #category : #accessing } +{ #category : 'accessing' } VMARMV8SIMDEncodingTest >> jitOptions [ ^ super jitOptions @@ -44,7 +46,7 @@ VMARMV8SIMDEncodingTest >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ self compile: [ cogit DupS: 64 R: 3 Vr: 0 ]. @@ -54,7 +56,7 @@ VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ equals: 'dup v0.2d, x3' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ self compile: [ cogit FaddS: 32 Rv: 0 Rv: 1 Rv: 2 ]. @@ -64,7 +66,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ equals: 'fadd v2.4s, v0.4s, v1.4s' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ self compile: [ cogit FaddS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -74,7 +76,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ equals: 'fadd v2.2d, v0.2d, v1.2d' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ self compile: [ cogit FsubS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -84,7 +86,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ equals: 'fsub v2.2d, v0.2d, v1.2d' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -94,7 +96,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.4s }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -104,7 +106,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.2d }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 0 ]. @@ -114,7 +116,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ equals: 'ld1 { v0.2d }, [x1]' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -124,7 +126,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.4s }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -134,7 +136,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.2d }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 0 ]. diff --git a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st index ff35f32f94..50b7051a80 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMARMV8SpecificEncodingTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMARMV8SpecificEncodingTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMV8SpecificEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -12,7 +14,7 @@ VMARMV8SpecificEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> armInstructionAt: index [ | addr inst | @@ -22,7 +24,7 @@ VMARMV8SpecificEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ | expectedAddress expectedValue | @@ -46,7 +48,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ | expectedAddress expectedValue | @@ -70,7 +72,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ | expectedAddress expectedValue | @@ -92,7 +94,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ | constant | @@ -108,7 +110,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ | negativeConstant12Bits | @@ -123,7 +125,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstant [ | negativeConstant12Bits | @@ -138,7 +140,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstant [ | negativeConstant12Bits | @@ -153,7 +155,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ | negativeConstant12Bits | @@ -168,7 +170,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ | positiveConstant12Bits | @@ -183,7 +185,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ | positiveConstant12Bits | @@ -198,7 +200,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstant [ | positiveConstant12Bits | @@ -213,7 +215,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstant [ | positiveConstant12Bits | @@ -228,7 +230,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ @@ -243,7 +245,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ @@ -258,7 +260,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ @@ -275,7 +277,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ self assert: machineSimulator x24 hex equals: completementValue hex ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ self doTestEncodeMoveMbrR: -256. @@ -283,7 +285,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMbrR: -1024. @@ -291,7 +293,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ self doTestEncodeMoveMbrR: 255. @@ -299,7 +301,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMbrR: 1024. @@ -307,35 +309,35 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegative9BitConstant [ self doTestEncodeMoveMwrR: -256 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMwrR: -20056 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositive12BitConstant [ self doTestEncodeMoveMwrR: 16r100 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMwrR: 20056 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ self doTestEncodeMoveRMwr: -256. @@ -346,28 +348,28 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ equals: 'stur x23, [x3, #-256]' ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitButShiftableConstant [ self doTestEncodeMoveRMwr: 512 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitNegativeConstant [ self doTestEncodeMoveRMwr: -61440 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithPositive9BitConstant [ self doTestEncodeMoveRMwr: 256 ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self compile: [ @@ -379,7 +381,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self assert: machineSimulator receiverRegisterValue equals: 16r1FF ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self compile: [ @@ -391,7 +393,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self assert: machineSimulator receiverRegisterValue equals: (67108865 bitOr: 16r100) ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithNonEncodableConstant [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st index e712546ea2..c7defd272a 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMAbstractBuilder, - #superclass : #Object, + #name : 'VMAbstractBuilder', + #superclass : 'Object', #instVars : [ 'interpreter', 'memory' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ "convinience method to put an oop at a specific place No need to take care of the size of the collection, I'm taking care of it!" @@ -20,22 +22,22 @@ VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> interpreter [ ^ interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> interpreter: anObject [ interpreter := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> memory [ ^ memory ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> memory: anObject [ memory := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st index 4b0874a231..afe2f98aa3 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st @@ -1,13 +1,14 @@ Class { - #name : #VMAbstractFFITest, - #superclass : #VMAbstractPrimitiveTest, + #name : 'VMAbstractFFITest', + #superclass : 'VMAbstractPrimitiveTest', #pools : [ 'LibFFIConstants' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argumentTypes withReturnType: returnType [ | functionAddress tfExternalFunction functionExternalAddress tfFunctionDefinition cif cifExternalAddress | @@ -31,7 +32,7 @@ VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argume ^ tfExternalFunction ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ ^ self @@ -40,7 +41,7 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ withReturnType: interpreter libFFI float ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTypes: argumentTypes [ ^ self @@ -49,20 +50,20 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTy withReturnType: interpreter libFFI float ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_FFI . true } ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> interpreterClass [ ^ VMTestMockInterpreter ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> newExternalAddress: anInteger [ | anExternalAddress | @@ -75,7 +76,7 @@ VMAbstractFFITest >> newExternalAddress: anInteger [ ^ anExternalAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> readyProcesses [ | collection | @@ -84,7 +85,7 @@ VMAbstractFFITest >> readyProcesses [ ^ collection ] -{ #category : #initialization } +{ #category : 'initialization' } VMAbstractFFITest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st index 1d8d2fb4e2..9ae991c41c 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st @@ -1,38 +1,40 @@ Class { - #name : #VMAbstractImageFormatTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMAbstractImageFormatTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'imageReader' ], - #category : #'VMMakerTests-ImageFormat' + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractImageFormatTest >> defaultTimeLimit [ ^ 30 seconds ] -{ #category : #tests } +{ #category : 'tests' } VMAbstractImageFormatTest >> imageFileName [ ^ 'lala.image' ] -{ #category : #tests } +{ #category : 'tests' } VMAbstractImageFormatTest >> readHeader [ ^ imageReader readHeaderFromImage: self imageFileName ] -{ #category : #actions } +{ #category : 'actions' } VMAbstractImageFormatTest >> saveImage [ interpreter writeImageFileIO. ] -{ #category : #running } +{ #category : 'running' } VMAbstractImageFormatTest >> setUp [ super setUp. @@ -55,7 +57,7 @@ VMAbstractImageFormatTest >> setUp [ ] -{ #category : #ston } +{ #category : 'ston' } VMAbstractImageFormatTest >> stonPretty: anObject [ ^ String streamContents: [ :s | @@ -66,7 +68,7 @@ VMAbstractImageFormatTest >> stonPretty: anObject [ ] ] -{ #category : #running } +{ #category : 'running' } VMAbstractImageFormatTest >> tearDown [ self imageFileName asFileReference ensureDeleteAll. diff --git a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st index 11812a06b3..9657b0b0bd 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #VMAbstractPrimitiveTest, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMAbstractPrimitiveTest', + #superclass : 'VMSpurMemoryManagerTest', #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMClassIndices', 'VMObjectIndices' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ | aProcess | @@ -23,7 +24,7 @@ VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ ^ aProcess ] -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPriority [ | suspendedContext aProcess | @@ -45,7 +46,7 @@ VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPrior ^ aProcess ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMAbstractPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -56,7 +57,7 @@ VMAbstractPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ ^ methodBuilder @@ -65,7 +66,7 @@ VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ buildMethod ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -114,7 +115,7 @@ VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" diff --git a/smalltalksrc/VMMakerTests/VMBlockTest.class.st b/smalltalksrc/VMMakerTests/VMBlockTest.class.st index b257001c87..8481eab72c 100644 --- a/smalltalksrc/VMMakerTests/VMBlockTest.class.st +++ b/smalltalksrc/VMMakerTests/VMBlockTest.class.st @@ -1,24 +1,26 @@ Class { - #name : #VMBlockTest, - #superclass : #VMInterpreterTests, + #name : 'VMBlockTest', + #superclass : 'VMInterpreterTests', #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> anEmptyMethod [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> evaluatingABlock [ [^1] value ] -{ #category : #helpers } +{ #category : 'helpers' } VMBlockTest >> installFullBlockClosureClass [ | aClass | aClass := self @@ -32,14 +34,14 @@ VMBlockTest >> installFullBlockClosureClass [ withValue: aClass ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodReturningABlock [ ^ [] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ true ifTrue: [ @@ -48,14 +50,14 @@ VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ ^ [ anArgument ] ] ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodReturningABlockWithTwoArguments [ ^ [:a :b] ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodWithLocalReturningABlock [ | a | @@ -63,14 +65,14 @@ VMBlockTest >> methodWithLocalReturningABlock [ ^ [ a ] ] -{ #category : #running } +{ #category : 'running' } VMBlockTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testCreatingABlockCapturesReceiver [ | methodReturning initialMethod | @@ -95,7 +97,7 @@ VMBlockTest >> testCreatingABlockCapturesReceiver [ self assert: (memory fetchPointer: FullClosureReceiverIndex ofObject: interpreter stackTop) equals: memory trueObject ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ | methodReturning initialMethod placeTakenByLiterals closure blockInitialPC compiledBlock | @@ -132,7 +134,7 @@ VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ | methodReturning initialMethod | @@ -159,7 +161,7 @@ VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ assert: (memory fetchPointer: FullClosureFirstCopiedValueIndex ofObject: interpreter stackTop) equals: (memory integerObjectOf: 2) ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ | methodReturning initialMethod | @@ -188,7 +190,7 @@ VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ self assert: (interpreter isWidowedContext: (memory outerContextOf: interpreter stackTop)) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable [ | methodReturning initialMethod | @@ -215,7 +217,7 @@ VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ | methodReturning initialMethod | @@ -242,7 +244,7 @@ VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testEvaluatingABlock [ | methodReturning initialMethod | @@ -274,7 +276,7 @@ VMBlockTest >> testEvaluatingABlock [ equals: (memory classAtIndex: ClassFullBlockClosureCompactIndex) ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testPushClosureBytecodePushesClosure [ | methodReturning initialMethod | diff --git a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st index 1fea546beb..459f61526b 100644 --- a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMByteCodesTest, - #superclass : #VMInterpreterTests, + #name : 'VMByteCodesTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'contextOop', 'context', 'callingFrame', 'topFrame' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -21,7 +23,7 @@ VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ self assert: (interpreter temporary: anIndex in: interpreter framePointer) equals: anOop ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock pushed: anOop [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -33,7 +35,7 @@ VMByteCodesTest >> assert: aBlock pushed: anOop [ ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock returned: anOop [ | callerSP | callerSP := interpreter frameCallerSP: interpreter framePointer. @@ -45,7 +47,7 @@ VMByteCodesTest >> assert: aBlock returned: anOop [ ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assertPopped: aBlock [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -56,24 +58,24 @@ VMByteCodesTest >> assertPopped: aBlock [ ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> firstPushTemporaryVariableBytecode [ "in v3 bytecode table" ^ 16 ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> firstStoreAndPopTemporaryVariableBytecode [ ^ 104 ] -{ #category : #'helper-interpret' } +{ #category : 'helper-interpret' } VMByteCodesTest >> interpret: aBlock [ aBlock value ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> interpretNextBytecode [ | count | @@ -83,7 +85,7 @@ VMByteCodesTest >> interpretNextBytecode [ count = 1 ] ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> interpretWithFrame: aBlock [ callingFrame := stackBuilder addNewFrame method: @@ -95,7 +97,7 @@ VMByteCodesTest >> interpretWithFrame: aBlock [ self interpret: aBlock ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> pushTempTest: index [ stackBuilder addNewFrame tempAt: index put: (memory integerObjectOf: 42). @@ -109,13 +111,13 @@ VMByteCodesTest >> pushTempTest: index [ ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> pushTemporaryVariableBytecodeAt: offset [ ^ self firstPushTemporaryVariableBytecode + offset. ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> pushThisContextTopFrame [ self interpretWithFrame: [ interpreter pushActiveContextBytecode ]. @@ -126,14 +128,14 @@ VMByteCodesTest >> pushThisContextTopFrame [ withInterpreter: interpreter ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> setUp [ super setUp. self installFloat64RegisterClass ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ stackBuilder addNewFrame @@ -149,12 +151,12 @@ VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ intoTemporary: index ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> storeAndPopTemporaryVariableBytecodeAt: anInteger [ ^ self firstStoreAndPopTemporaryVariableBytecode + anInteger ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ | oldMaybeSenderContext newMaybeSenderContext | self interpretWithFrame: [ interpreter pushActiveContextBytecode. ]. @@ -164,7 +166,7 @@ VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ self assert: oldMaybeSenderContext equals: newMaybeSenderContext ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testAddVectorBytecode [ | index v0 v1 result firstTerm size | @@ -191,7 +193,7 @@ VMByteCodesTest >> testAddVectorBytecode [ ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testArraySumUsingVectorBytecode [ | cm x y result simulatedMethod z | @@ -233,7 +235,7 @@ VMByteCodesTest >> testArraySumUsingVectorBytecode [ ] -{ #category : #'tests-complex' } +{ #category : 'tests-complex' } VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMethod [ | class object objectToPutInSlot attemptToAssignMethod attemptToAssignSelector aMethodDictionary | @@ -277,7 +279,7 @@ VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMe self assert: topFrame method equals: attemptToAssignMethod ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ | v0 v1 result method | @@ -304,7 +306,7 @@ VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 6.0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testDuplicateStackTop [ stackBuilder addNewFrame ; buildStack. @@ -321,7 +323,7 @@ VMByteCodesTest >> testDuplicateStackTop [ ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPopStackTopBytecode [ stackBuilder addNewFrame ; buildStack. @@ -337,7 +339,7 @@ VMByteCodesTest >> testPopStackTopBytecode [ ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testPushArrayToRegisterBytecode [ | array index result | @@ -362,7 +364,7 @@ VMByteCodesTest >> testPushArrayToRegisterBytecode [ ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantFalseBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -370,7 +372,7 @@ VMByteCodesTest >> testPushConstantFalseBytecode [ pushed: memory falseObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantMinusOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -378,7 +380,7 @@ VMByteCodesTest >> testPushConstantMinusOneBytecode [ pushed: (memory integerObjectOf: -1) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantNilBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -386,7 +388,7 @@ VMByteCodesTest >> testPushConstantNilBytecode [ pushed: memory nilObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -394,7 +396,7 @@ VMByteCodesTest >> testPushConstantOneBytecode [ pushed: (memory integerObjectOf: 1) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantReceiverBytecode [ | intReceiver | intReceiver := memory integerObjectOf: 42. @@ -407,7 +409,7 @@ VMByteCodesTest >> testPushConstantReceiverBytecode [ pushed: intReceiver ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantTrueBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -415,7 +417,7 @@ VMByteCodesTest >> testPushConstantTrueBytecode [ pushed: memory trueObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantTwoBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -423,7 +425,7 @@ VMByteCodesTest >> testPushConstantTwoBytecode [ pushed: (memory integerObjectOf: 2) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantZeroBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -431,74 +433,74 @@ VMByteCodesTest >> testPushConstantZeroBytecode [ pushed: (memory integerObjectOf: 0) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp0 [ self pushTempTest: 0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp1 [ self pushTempTest: 1 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp10 [ self pushTempTest: 10 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp11 [ self pushTempTest: 11 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp2 [ self pushTempTest: 2 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp3 [ self pushTempTest: 3 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp4 [ self pushTempTest: 4 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp5 [ self pushTempTest: 5 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp6 [ self pushTempTest: 6 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp7 [ self pushTempTest: 7 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp8 [ self pushTempTest: 8 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp9 [ self pushTempTest: 9 ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextIsContext [ self pushThisContextTopFrame. self assert: (memory isContext: interpreter stackTop). ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ self pushThisContextTopFrame. @@ -508,7 +510,7 @@ VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ equals: (interpreter frameCallerFP: interpreter framePointer) ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ self pushThisContextTopFrame. @@ -519,28 +521,28 @@ VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ equals: interpreter framePointer ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidReceiver [ self pushThisContextTopFrame. self assert: topFrame receiver equals: context receiver ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameContext: interpreter framePointer) equals: interpreter stackTop. ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetFlagContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameHasContext: interpreter framePointer). ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ | previousTop newTop | self interpretWithFrame: [ @@ -552,7 +554,7 @@ VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ self assert: newTop equals: previousTop. ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testReturnFalse [ "We need to return to a method. @@ -568,7 +570,7 @@ VMByteCodesTest >> testReturnFalse [ returned: memory falseObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testReturnTrue [ "We need to return to a method. @@ -584,7 +586,7 @@ VMByteCodesTest >> testReturnTrue [ returned: memory trueObject ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ | topFrameContext | self interpretWithFrame: [ @@ -598,7 +600,7 @@ VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ self assert: (interpreter isWidowedContext: topFrameContext) ] -{ #category : #'tests-send' } +{ #category : 'tests-send' } VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ | selectorOop aMethod aMethodToActivate receiver receiverClass aMethodDictionary arg1 arg2 | @@ -645,47 +647,47 @@ VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ self assert: interpreter stackTop equals: receiver ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary0 [ self storeAndPopTemporaryIntoTempTest: 0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary1 [ self storeAndPopTemporaryIntoTempTest: 1 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary2 [ self storeAndPopTemporaryIntoTempTest: 2 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary3 [ self storeAndPopTemporaryIntoTempTest: 3 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary4 [ self storeAndPopTemporaryIntoTempTest: 4 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary5 [ self storeAndPopTemporaryIntoTempTest: 5 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary6 [ self storeAndPopTemporaryIntoTempTest: 6 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary7 [ self storeAndPopTemporaryIntoTempTest: 7 ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ | register index array result | @@ -716,7 +718,7 @@ VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ self assert: (memory fetchFloat64: 3 ofObject: array) equals: 6.0. ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testSubVectorBytecode [ | index vector0 vector1 result | diff --git a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st index 517ef6edc4..1abed9f7a5 100644 --- a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMBytecodeMethod, - #superclass : #Object, + #name : 'VMBytecodeMethod', + #superclass : 'Object', #instVars : [ 'virtualMachine', 'methodOop' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop [ ^ self new @@ -17,13 +19,13 @@ VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> at: index [ ^ virtualMachine objectMemory fetchByte: index - 1 "0 based" ofObject: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> disassemble [ | symbolicBytecodes | symbolicBytecodes := SymbolicBytecodeBuilder decode: self. @@ -31,52 +33,52 @@ VMBytecodeMethod >> disassemble [ ' join: (symbolicBytecodes collect: [ :sbc | sbc description ]) ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> encoderClass [ ^ EncoderForSistaV1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> endPC [ ^ virtualMachine objectMemory bytesInObject: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> initialPC [ "Answer the program counter for the receiver's first bytecode." ^ (self numLiterals + 1) * virtualMachine objectMemory wordSize + 1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> literalAt: anInteger [ ^ 'literal key' -> 'literal?' ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> methodOop [ ^ methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> methodOop: anObject [ methodOop := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> numLiterals [ ^ virtualMachine objectMemory literalCountOf: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st index 05a1565127..800da59986 100644 --- a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMCodeCompactionTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMCodeCompactionTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod [ "Create the root context with a valid method" @@ -32,7 +34,7 @@ VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod ] -{ #category : #utils } +{ #category : 'utils' } VMCodeCompactionTest >> createFillingMethods: anInteger [ | firstMethod | @@ -45,7 +47,7 @@ VMCodeCompactionTest >> createFillingMethods: anInteger [ ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> fillCodeZone [ | aMethod | @@ -61,13 +63,13 @@ VMCodeCompactionTest >> fillCodeZone [ ] -{ #category : #running } +{ #category : 'running' } VMCodeCompactionTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -110,7 +112,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenUsingPrimCallMayCallBackShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -149,7 +151,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToTheBeginning [ | firstMethod compactMethod methodOop | @@ -172,7 +174,7 @@ VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToThe ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ | firstMethod cogMethod methodOop | @@ -206,7 +208,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ | firstMethod cogMethod methodOop | @@ -239,7 +241,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ | firstMethod cogMethod methodOop | @@ -272,7 +274,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ equals: (interpreter cogMethodOf: methodOop) ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ | firstMethod callerMethodOop calleeCogMethod selector callerCogMethod calleeMethodOop | @@ -322,7 +324,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ equals: (interpreter cogMethodOf: calleeMethodOop) asInteger + cogit entryOffset ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -419,7 +421,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ equals: cogit ceCPICMissTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -509,7 +511,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbo equals: cogit cePICAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -583,7 +585,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsi equals: cogit cePICAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testRelocatingAMethodDoesNotAffectTheFrameCreationPushes [ | firstMethod compactMethod methodOop readOnlyObject | diff --git a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st index 8f8e44af1f..1ba5d89ee9 100644 --- a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMCogitHelpersTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMCogitHelpersTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'checkIsSmallInteger', 'checkNotSmallInteger' @@ -9,10 +9,12 @@ Class { 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -22,7 +24,7 @@ VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -32,7 +34,7 @@ VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -42,7 +44,7 @@ VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -52,14 +54,14 @@ VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> runUntilReturnFrom: anAddress [ self prepareCall. super runUntilReturnFrom: anAddress ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> setUp [ super setUp. @@ -90,7 +92,7 @@ VMCogitHelpersTest >> setUp [ ]. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ self assertNotInSmallIntegerRange: memory maxSmallInteger + 1. @@ -101,14 +103,14 @@ VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithValidSmallIntegers [ self denyIsNotInSmallIntegerRange: 0. self denyIsNotInSmallIntegerRange: memory maxSmallInteger. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ self denyIsInSmallIntegerRange: memory maxSmallInteger + 1. @@ -119,7 +121,7 @@ VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithValidSmallIntegers [ self assertIsInSmallIntegerRange: 0. diff --git a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st index 0daae71c73..a12f0e88c7 100644 --- a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMCompiledCodeBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMCompiledCodeBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'slotSize', 'numberOfTemporaries', @@ -15,16 +15,18 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> address [ ^ method ] -{ #category : #deprecated } +{ #category : 'deprecated' } VMCompiledCodeBuilder >> build [ self @@ -34,14 +36,14 @@ VMCompiledCodeBuilder >> build [ ^ self buildMethod ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> buildMethod [ self instantiateMethod. self fillMethod. ^ method ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> buildMethodHeader [ ^ (numberOfArguments bitShift: 24) @@ -51,7 +53,7 @@ VMCompiledCodeBuilder >> buildMethodHeader [ + (isPrimitive asBit << 16) ] -{ #category : #helper } +{ #category : 'helper' } VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ | methodHeader | "1 based" @@ -61,17 +63,17 @@ VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> bytecodes [ ^ bytecodes ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> bytecodes: anObject [ bytecodes := anObject ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> classIndexToUse [ | newClass | memory nilObject = (memory splObj: 16) ifTrue: [ @@ -88,7 +90,7 @@ VMCompiledCodeBuilder >> classIndexToUse [ ^ memory classTagForClass: (memory splObj: 16) ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self newMethod. @@ -99,7 +101,7 @@ VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self fillLiteralsFromPharo: aCompiledMethod allLiterals ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ originalLiterals := pharoLiterals copy. @@ -107,14 +109,14 @@ VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillMethod [ self putHeaderInMethod. self putLiteralInMethod. self putBytecodesInMethod. ] -{ #category : #initialization } +{ #category : 'initialization' } VMCompiledCodeBuilder >> initialize [ bytecodes := #[1 2 3 4 5 6 7 8 9 0]. literals := OrderedCollection new. @@ -129,7 +131,7 @@ VMCompiledCodeBuilder >> initialize [ slotSize := nil. ] -{ #category : #inspecting } +{ #category : 'inspecting' } VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ @@ -157,7 +159,7 @@ VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ yourself ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> instantiateMethod [ slotSize := literals size + (bytecodes size / memory wordSize) ceiling @@ -170,73 +172,73 @@ VMCompiledCodeBuilder >> instantiateMethod [ method ifNotNil: [ memory fillObj: method numSlots: slotSize with: memory nilObject ]. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isPrimitive [ ^ isPrimitive ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isPrimitive: anObject [ isPrimitive := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isSmall [ ^ isSmall ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isSmall: anObject [ isSmall := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literalAt: anIndex put: anOop [ self collection: literals at: anIndex put: anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literals [ ^ literals ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literals: anObject [ literals := anObject. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> method [ ^ method ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> newMethod [ self initialize. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfArguments [ ^ numberOfArguments ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfArguments: anObject [ numberOfArguments := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfTemporaries [ ^ numberOfTemporaries ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfTemporaries: anObject [ numberOfTemporaries := anObject ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putBytecodesInMethod [ bytecodes doWithIndex:[ :aBytecode :anIndex | memory storeByte: @@ -249,7 +251,7 @@ VMCompiledCodeBuilder >> putBytecodesInMethod [ ] ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putHeaderInMethod [ memory storePointer: 0 ofObject: method @@ -257,7 +259,7 @@ VMCompiledCodeBuilder >> putHeaderInMethod [ ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putLiteralInMethod [ originalLiterals doWithIndex: [ :aLiteral :anIndex | @@ -275,7 +277,7 @@ VMCompiledCodeBuilder >> putLiteralInMethod [ memory storePointer: anIndex ofObject: method withValue: aLiteral ] ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ "In the case of CompiledBlocks we need to put the outerCode object (the last literal). @@ -284,7 +286,7 @@ VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ literals at: literals size put: aVMCompiledCodeBuilder address ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> slotSize [ "Do not set by hand !" ^ slotSize diff --git a/smalltalksrc/VMMakerTests/VMContext.class.st b/smalltalksrc/VMMakerTests/VMContext.class.st index af9973c650..4458533aba 100644 --- a/smalltalksrc/VMMakerTests/VMContext.class.st +++ b/smalltalksrc/VMMakerTests/VMContext.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMContext, - #superclass : #Object, + #name : 'VMContext', + #superclass : 'Object', #instVars : [ 'contextOop', 'interpreter' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^ self new contextOop: anInteger; @@ -19,7 +21,7 @@ VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSim yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> caller [ | senderContext | @@ -35,12 +37,12 @@ VMContext >> caller [ ^ VMContext newOnContext: senderContext withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> contextOop: anInteger [ contextOop := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> description [ | homeContextOop method selector | homeContextOop := interpreter findHomeForContext: contextOop. @@ -50,32 +52,32 @@ VMContext >> description [ ^ interpreter stringOf: selector ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> instructionPointer [ ^interpreter objectMemory fetchPointer: InstructionPointerIndex ofObject: contextOop. ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : #testing } +{ #category : 'testing' } VMContext >> isMarried [ ^interpreter isStillMarriedContext: contextOop. ] -{ #category : #testing } +{ #category : 'testing' } VMContext >> isNilObject [ ^interpreter objectMemory nilObject = contextOop. ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> receiver [ ^interpreter objectMemory fetchPointer: ReceiverIndex ofObject: contextOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> sender [ ^interpreter objectMemory fetchPointer: SenderIndex ofObject: contextOop. ] diff --git a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st index a43fdf619d..24c05b336c 100644 --- a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st +++ b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMContextAccessTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMContextAccessTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: anIndex [ | originalPC copiedPC | @@ -17,7 +19,7 @@ VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: a self assert: copiedPC equals: originalPC ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> pushActiveContext [ interpreter pushActiveContextBytecode. @@ -25,7 +27,7 @@ VMContextAccessTest >> pushActiveContext [ ^ interpreter stackTop ] -{ #category : #running } +{ #category : 'running' } VMContextAccessTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -59,7 +61,7 @@ VMContextAccessTest >> setUp [ self initializeOldSpaceForFullGC ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectPC [ | contextOop newContext | @@ -73,7 +75,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPC [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ | contextOop newContext | @@ -91,7 +93,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ | contextOop newContext | @@ -106,7 +108,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectSenderWhenItIsNil [ | contextOop newContext | diff --git a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st index a6cdd6a8b6..052c3aafb4 100644 --- a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMDivisionInstructionTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMDivisionInstructionTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotient remainer: remainer [ | expectedQuotient expectedRemainer | @@ -30,63 +32,63 @@ VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotien self assert: machineSimulator classRegisterValue equals: expectedRemainer ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 7 quotient: -1 remainer: -3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorAndDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -7 quotient: 1 remainer: -3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -7 quotient: -1 remainer: 3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 7 quotient: 1 remainer: 3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 2 quotient: 5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -2 quotient: -5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorAndDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -2 quotient: 5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 2 quotient: -5 remainer: 0. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMDivisionInstructionTest >> twoComplementOf: anInteger [ ^ self wordSize = 8 diff --git a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st index ad4a802dc9..0d7d7a6f1c 100644 --- a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st @@ -1,28 +1,29 @@ Class { - #name : #VMFFIArgumentMarshallingTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIArgumentMarshallingTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #private } +{ #category : 'private' } VMFFIArgumentMarshallingTest class >> isAbstract [ ^ self == VMFFIArgumentMarshallingTest ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self subclassResponsibility ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self subclassResponsibility ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ | newLargeInteger byteSize class | @@ -43,7 +44,7 @@ VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ ^ newLargeInteger ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorrectly [ self @@ -52,7 +53,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorr expectedValue: 17 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrectly [ self @@ -61,7 +62,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrect expectedValue: 17.0 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectly [ self @@ -70,7 +71,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectl expectedValue: 17.0 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrectly [ self @@ -79,7 +80,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrec expectedValue: 17 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -88,7 +89,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -97,7 +98,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesBadArgument [ self @@ -107,7 +108,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesBadArgument [ self @@ -117,7 +118,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue aValueToStore | @@ -134,7 +135,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -149,7 +150,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -158,7 +159,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -167,7 +168,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesBadArgument [ | valueToStore | @@ -183,7 +184,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesBadArgument [ self @@ -193,7 +194,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue | @@ -205,7 +206,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -224,7 +225,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -237,7 +238,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveVa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -246,7 +247,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -255,7 +256,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -264,7 +265,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsM expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -273,7 +274,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsM expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBadArgument [ self @@ -283,7 +284,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBadArgument [ self @@ -293,7 +294,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -310,7 +311,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshall expectedValue: storedValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -327,7 +328,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalled expectedValue: storedValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFails [ self @@ -336,7 +337,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -345,7 +346,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIs expectedValue: 8 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self @@ -354,7 +355,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -369,7 +370,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -384,7 +385,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveVa expectedValue: 16r3FFFFFFF + 2 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFails [ self @@ -393,7 +394,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -402,7 +403,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ | valueToStore | @@ -417,7 +418,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -436,7 +437,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -448,7 +449,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFails [ self @@ -457,7 +458,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -466,7 +467,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFails [ self @@ -475,7 +476,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFail failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -484,7 +485,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsM expectedValue: 8 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self diff --git a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st index be1875a921..b5bcbc2d51 100644 --- a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFICallbacksTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFICallbacksTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ interpreter push: memory nilObject. @@ -16,7 +17,7 @@ VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -51,7 +52,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProc interpreter primitiveSameThreadCallout. ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcessesInReady [ | parametersArray tfExternalFunction callbackContext processBefore | @@ -77,7 +78,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcesse self assertCollection: self readyProcesses hasSameElements: processBefore ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -104,7 +105,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess self assert: interpreter activeProcess equals: oldActiveProcess. ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadReentrantCallbackRestoresCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext numberOfCallbacks innerCallbackContext tfExternalFunction2 | diff --git a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st index 57db1b5e98..8d27531029 100644 --- a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFIHelpersTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIHelpersTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> assertPopInEmptyStackFails [ [ interpreter popSameThreadCalloutSuspendedProcess. @@ -15,7 +16,7 @@ VMFFIHelpersTest >> assertPopInEmptyStackFails [ equals: 'SameThreadCalloutSuspendedProcessStack is empty' ] ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesError [ self assert: (memory splObj: SuspendedProcessInCallout) equals: memory nilObject. @@ -23,7 +24,7 @@ VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesEr self assertPopInEmptyStackFails ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcess [ | aProcess anotherProcess | @@ -41,7 +42,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -59,7 +60,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcess [ | aProcess anotherProcess | @@ -75,7 +76,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -91,7 +92,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresThePassedProcess [ | aProcess | @@ -104,7 +105,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresT ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdatesNextLinkWithNil [ | aProcess | @@ -117,7 +118,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdates ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackFails [ | aProcess | @@ -132,7 +133,7 @@ VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptySt ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsProcessWithNilInNextLink [ | aProcess | @@ -145,7 +146,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsPushedProcess [ | aProcess | @@ -158,7 +159,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testReadAddressReadsTheValidAddressValue [ | anExternalAddress | diff --git a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st index 03182807ca..a3aefe8ff7 100644 --- a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st @@ -1,22 +1,23 @@ Class { - #name : #VMFFIReturnMarshallingTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIReturnMarshallingTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #private } +{ #category : 'private' } VMFFIReturnMarshallingTest class >> isAbstract [ ^ self = VMFFIReturnMarshallingTest ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ self subclassResponsibility ] -{ #category : #utils } +{ #category : 'utils' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedLargeIntegerValue: expectedValue [ self @@ -36,7 +37,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedSmalltalkValue: expectedValue [ self @@ -50,7 +51,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteArray [ | valueToReturn | @@ -72,7 +73,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteAr ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatInStack [ self @@ -84,7 +85,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatI ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatInStack [ self @@ -96,7 +97,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatIn ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExternalAddress [ @@ -110,7 +111,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExtern ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallInteger [ self @@ -119,7 +120,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeInteger [ | value | @@ -131,7 +132,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallInteger [ | value | @@ -145,7 +146,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeInteger [ self @@ -154,7 +155,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallInteger [ self @@ -163,7 +164,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger [ self @@ -172,7 +173,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger expectedSmalltalkValue: INT8_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallInteger [ self @@ -181,7 +182,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeInteger [ | value | @@ -193,7 +194,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallInteger [ | value | @@ -207,7 +208,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeInteger [ self @@ -216,7 +217,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallInteger [ self @@ -225,7 +226,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT8PushSmallInteger [ self diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st index d18e6ecd88..ba96a06ec5 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadArgumentMarshallingTest, - #superclass : #VMFFIArgumentMarshallingTest, - #category : #VMMakerTests + #name : 'VMFFISameThreadArgumentMarshallingTest', + #superclass : 'VMFFIArgumentMarshallingTest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #implementation } +{ #category : 'implementation' } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ | parametersArray tfExternalFunction savedValue | @@ -28,7 +29,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: savedValue equals: expectedValue. ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ | parametersArray tfExternalFunction savedValue | @@ -52,7 +53,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFISameThreadArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ | parametersArray tfExternalFunction functionCalled | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st index 33727d32a7..4a8ee9389a 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadCalloutTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFISameThreadCalloutTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - callouts' } +{ #category : 'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess | @@ -24,7 +25,7 @@ VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProce self assert: interpreter activeProcess equals: oldActiveProcess ] -{ #category : #'tests - callouts' } +{ #category : 'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutShouldKeepTheNewMethodVariable [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st index bccbc9e6b1..71a34defe3 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadReturnMarshallingTest, - #superclass : #VMFFIReturnMarshallingTest, - #category : #VMMakerTests + #name : 'VMFFISameThreadReturnMarshallingTest', + #superclass : 'VMFFIReturnMarshallingTest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ | parametersArray tfExternalFunction | @@ -26,7 +27,7 @@ VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType aBlock value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st index 884e602d1e..177e8e7463 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerArgumentMarshallingTest, - #superclass : #VMFFIArgumentMarshallingTest, + #name : 'VMFFIWorkerArgumentMarshallingTest', + #superclass : 'VMFFIArgumentMarshallingTest', #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -11,10 +11,11 @@ Class { 'task', 'savedValue' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -32,7 +33,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: savedValue equals: expectedValue ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -41,7 +42,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofType: argumentType [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. @@ -77,21 +78,21 @@ VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofTy interpreter primitiveWorkerCallout ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerArgumentMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #running } +{ #category : 'running' } VMFFIWorkerArgumentMarshallingTest >> setUp [ super setUp. interpreter libFFI testWorker clear ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st index 10fc6eeb4f..0cabd48fa0 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerCalloutTest, - #superclass : #VMAbstractFFITest, + #name : 'VMFFIWorkerCalloutTest', + #superclass : 'VMAbstractFFITest', #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -9,16 +9,17 @@ Class { 'workerOop', 'semaphoreIndex' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes [ ^ self doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: interpreter libFFI void ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: returnType [ aFunctionBlock := [ self fail: 'It should enqueue it, not execute it' ]. @@ -49,21 +50,21 @@ VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: ar interpreter primitiveWorkerCallout ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutEnqueuesOnlyOneTask [ self doWorkerCallWithArguments: {} ofTypes: {}. self assert: interpreter libFFI testWorker tasks size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIfPrimitiveFails [ | previous | @@ -86,7 +87,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIf self assert: interpreter allocatedElements size equals: previous. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocateReturnHolder [ self doWorkerCallWithArguments: {} ofTypes: {}. @@ -94,7 +95,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocate self assert: interpreter libFFI testWorker tasks first returnHolderAddress isNil ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgumentHoldersAndReturnHolderInCHeap [ | previous | @@ -116,7 +117,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgum self assert: interpreter allocatedElements size equals: previous + 7. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithReturnAllocateJustOne [ | previous | @@ -127,7 +128,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithRetu self assert: interpreter allocatedElements size equals: previous + 1. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutReturnDoesNotAllocate [ | previous | @@ -138,7 +139,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutR self assert: interpreter allocatedElements size equals: previous. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersHasNilAsParametersPointer [ self doWorkerCallWithArguments: {} ofTypes: {}. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st index 92a15a06fb..d413ef8af6 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerReturnMarshallingTest, - #superclass : #VMFFIReturnMarshallingTest, + #name : 'VMFFIWorkerReturnMarshallingTest', + #superclass : 'VMFFIReturnMarshallingTest', #instVars : [ 'tfExternalFunction', 'returnHolder', @@ -12,10 +12,11 @@ Class { 'worker', 'workerOop' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ tfExternalFunction := self @@ -54,14 +55,14 @@ VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType ret aBlock value. ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st index 52f52916aa..dc8609f7ca 100644 --- a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMForwardLiteralInMachineMethodTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMForwardLiteralInMachineMethodTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMForwardLiteralInMachineMethodTest >> initStack [ self createBaseFrame. @@ -22,13 +24,13 @@ VMForwardLiteralInMachineMethodTest >> initStack [ ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMForwardLiteralInMachineMethodTest >> methodWithGlobal [ ^ Smalltalk ] -{ #category : #tests } +{ #category : 'tests' } VMForwardLiteralInMachineMethodTest >> testForwardLiteralInMethod [ | machineCodeMethod literal methodOop array literalValue selector associationClass valueClass literalKey | diff --git a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st index a0768e8b2c..7716e906f5 100644 --- a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st @@ -42,8 +42,8 @@ Configuring of the frame. When it links them, it gives the last frame the previous caller Frame, for debug purpose. " Class { - #name : #VMFrameBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMFrameBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'method', 'context', @@ -61,10 +61,12 @@ Class { 'methodBuilder', 'isSuspended' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> adaptAddressToMemory: anInteger [ anInteger = memory nilObject ifTrue: [ ^ #nilObject ]. anInteger = memory trueObject ifTrue: [ ^ #trueObject ]. @@ -73,70 +75,70 @@ VMFrameBuilder >> adaptAddressToMemory: anInteger [ "^ memory integerObjectOf: anInteger" ] -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> adaptAddressToMemoryIfInteger: anAssociation [ anAssociation value isInteger ifTrue: [ anAssociation value: (self adaptAddressToMemory: anAssociation value) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> argumentSize [ ^ argumentSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> argumentSize: anObject [ argumentSize := anObject ] -{ #category : #configuring } +{ #category : 'configuring' } VMFrameBuilder >> beSuspended [ isSuspended := true ] -{ #category : #configuring } +{ #category : 'configuring' } VMFrameBuilder >> beSuspendedAt: anInstructionPointer [ instructionPointer := anInstructionPointer. self beSuspended ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> callerFrame [ ^ callerFrame ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> callerFrame: aFrame [ callerFrame := aFrame ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> context [ ^ context ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> context: anObject [ context := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> flags [ ^ flags ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> flags: anObject [ flags := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> framePointer [ ^ myFramePointer ] -{ #category : #initialization } +{ #category : 'initialization' } VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory andMethodBuilder: aMethodBuilder [ memory := aMemory. interpreter := anInterpreter. "allow to not care if it's for a cog or stack interpreter" @@ -153,7 +155,7 @@ VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory an argumentSize := 0. ] -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> inspectFrameIn: aBuilder [ @@ -184,12 +186,12 @@ VMFrameBuilder >> inspectFrameIn: aBuilder [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> instructionPointer [ ^ instructionPointer ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> isMarried [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -198,7 +200,7 @@ VMFrameBuilder >> isMarried [ ifFalse: [ interpreter isStillMarriedContext: contextOop ] ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> isSingle [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -209,43 +211,43 @@ VMFrameBuilder >> isSingle [ interpreter isSingleContext: contextOop ] ] -{ #category : #testing } +{ #category : 'testing' } VMFrameBuilder >> isSuspended [ ^ isSuspended ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> marryToContext [ interpreter ensureFrameIsMarried: myFramePointer SP: myStackPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> method [ ^ method ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> method: anOop [ method := anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> previousFrameArgsSize [ ^ previousFrameArgsSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> previousFrameArgsSize: anObject [ previousFrameArgsSize := anObject ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushCurrentFramesStack [ "push to the stack all objects in the frame stack" stack do: [ :oop | interpreter push: oop ]. ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushFlags [ "Flags: this stack frame is single. I.e., it has no context object. Otherwise GC fails with an assertion looking for it in the heap" @@ -256,14 +258,14 @@ VMFrameBuilder >> pushFlags [ interpreter push: flags ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushFrame [ interpreter push: receiver. temps do: [ :oop | interpreter push: oop ]. ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushYourself [ self setVariablesFromCompiledMethod. @@ -286,17 +288,17 @@ VMFrameBuilder >> pushYourself [ ^ myFramePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> receiver [ ^ receiver ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> receiver: anObject [ receiver := anObject ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setArgsFromMethod [ | argNumber | argNumber := interpreter argumentCountOf: method. @@ -307,7 +309,7 @@ VMFrameBuilder >> setArgsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of arguments from the method oop.' ]] ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ "If possible, setting IP to before the first bytecode, so it is ready for fetchNextBytecode" @@ -317,7 +319,7 @@ VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ interpreter instructionPointer: instructionPointer ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setTempsFromMethod [ | tempNumber | tempNumber := interpreter tempCountOf: method. @@ -328,7 +330,7 @@ VMFrameBuilder >> setTempsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of temporaries from the method oop.' ]] ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setVariablesFromCompiledMethod [ (memory isCompiledMethod: method) ifFalse: [ ^ self ]. @@ -337,43 +339,43 @@ VMFrameBuilder >> setVariablesFromCompiledMethod [ self setArgsFromMethod ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stack [ ^ stack ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stack: anObject [ stack := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stackPointer [ ^ myStackPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> tempAt: anIndex put: anOop [ self collection: temps at: anIndex put: anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> temps [ ^ temps ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> temps: anObject [ temps := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> vmMethodBuilder [ ^ vmMethodBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> vmMethodBuilder: anObject [ vmMethodBuilder := anObject diff --git a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st index c7610209f4..49fbba1248 100644 --- a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMImageHeaderWritingTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-ImageFormat' + #name : 'VMImageHeaderWritingTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #running } +{ #category : 'running' } VMImageHeaderWritingTest >> setUp [ super setUp. @@ -18,7 +20,7 @@ VMImageHeaderWritingTest >> setUp [ self saveImage. ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ | header permanentObject | @@ -35,7 +37,7 @@ VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ + (memory bytesInObject: permanentObject) + 16 "PermSpace has an empty object as first object.". ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ | header | @@ -45,7 +47,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ self assert: header oldBaseAddr equals: memory getMemoryMap oldSpaceStart ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ | header | @@ -55,7 +57,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ self assert: header freeOldSpaceInImage equals: memory bytesLeftInOldSpace ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ | header | @@ -65,7 +67,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ self assert: header hdrCogCodeSize equals: interpreter unknownShortOrCodeSizeInKs ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ | header | @@ -75,7 +77,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ self assert: header dataSize equals: memory imageSizeToWrite ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ | header | @@ -85,7 +87,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ self assert: header hdrEdenBytes equals: interpreter getDesiredEdenBytes ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages [ | header | @@ -95,7 +97,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages self assert: header hdrNumStackPages equals: interpreter getDesiredNumStackPages ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable [ | header | @@ -105,7 +107,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable self assert: header hdrMaxExtSemTabSize equals: (interpreter getMaxExtSemTabSizeSet ifTrue: [interpreter ioGetMaxExtSemTableSize] ifFalse: [0]) ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ | header | @@ -115,7 +117,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ self assert: header extraVMMemory equals: interpreter getExtraVMMemory ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ | header | @@ -125,7 +127,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ self assert: header firstSegSize equals: memory firstSegmentBytes ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ | header | @@ -135,7 +137,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ self assert: header headerFlags equals: interpreter getImageHeaderFlags ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ | header expectedHeaderSize | @@ -147,7 +149,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ self assert: header imageHeaderSize equals: expectedHeaderSize. ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ | header | @@ -157,7 +159,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ self assert: header imageFormat equals: interpreter imageFormatVersion ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ | header | @@ -167,7 +169,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ self assert: header imageVersion equals: interpreter getImageVersion ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ | header | @@ -177,7 +179,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ self assert: header hdrLastHash equals: memory lastHash ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop [ | header | @@ -187,7 +189,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop self assert: header initialSpecialObjectsOop equals: memory specialObjectsOop ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONHeader [ | header readHeader | @@ -201,7 +203,7 @@ VMImageHeaderWritingTest >> testWritingSTONHeader [ self assert: readHeader equals: (self stonPretty: header). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONPermSpace [ | writtenMetadata expectedPermSpaceMetadata | @@ -222,7 +224,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpace [ self assert: writtenMetadata equals: (self stonPretty: expectedPermSpaceMetadata). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ | writtenMetadata | @@ -236,7 +238,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ self assert: writtenMetadata equals: (self stonPretty: ComposedMetadataStruct new). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONSegment [ | header writtenHeader segmentMetadata | diff --git a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st index 3a913332a3..382706b68a 100644 --- a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMImageReadingTest, - #superclass : #VMAbstractImageFormatTest, + #name : 'VMImageReadingTest', + #superclass : 'VMAbstractImageFormatTest', #instVars : [ 'originalNilObjectIdentityHash', 'permanentObject', 'originalPermanentObjectIdentityHash' ], - #category : #'VMMakerTests-ImageFormat' + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #query } +{ #category : 'query' } VMImageReadingTest >> dataFrom: fileName [ ^ self imageFileName asFileReference / fileName ] -{ #category : #accessing } +{ #category : 'accessing' } VMImageReadingTest >> initializationOptions [ ^ super initializationOptions , { #CloneOnGC. false. #CloneOnScavenge. false } ] -{ #category : #utilities } +{ #category : 'utilities' } VMImageReadingTest >> loadImage [ environmentBuilder := VMSimulatedEnvironmentBuilder new. @@ -40,7 +42,7 @@ VMImageReadingTest >> loadImage [ ] -{ #category : #query } +{ #category : 'query' } VMImageReadingTest >> metadataFrom: fileName [ | writtenHeader | @@ -48,7 +50,7 @@ VMImageReadingTest >> metadataFrom: fileName [ ^ STON fromString: writtenHeader ] -{ #category : #utilities } +{ #category : 'utilities' } VMImageReadingTest >> saveImage [ memory garbageCollectForSnapshot. @@ -61,7 +63,7 @@ VMImageReadingTest >> saveImage [ ] -{ #category : #initialization } +{ #category : 'initialization' } VMImageReadingTest >> setUp [ super setUp. @@ -74,7 +76,7 @@ VMImageReadingTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ | obj magicNumber initSegmentSize initPermSpaceSize finalSegmentSize finalPermSpaceSize | @@ -115,7 +117,7 @@ VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ self assert: (self metadataFrom: 'permSpace.ston') dataSize equals: finalPermSpaceSize ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testReadingSTONHeader [ | headerStruct headerFile | @@ -133,7 +135,7 @@ VMImageReadingTest >> testReadingSTONHeader [ self assert: (self stonPretty: headerStruct) equals: headerFile contents. ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self saveImage. @@ -142,7 +144,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self assert: originalNilObjectIdentityHash equals: (memory hashBitsOf: memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ "Only valid in the new format" @@ -158,7 +160,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ | firstNewSegmentSize secondNewSegmentSize obj newObj originalObjHash | @@ -190,7 +192,7 @@ VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ self assert: originalObjHash equals: (memory hashBitsOf: newObj). ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavingPermanentSpaceObjectsInSpurFormatFails [ imageWriterClass = SpurImageWriter ifFalse: [ ^ self skip ]. diff --git a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st index 6837a56522..9ead2ebb76 100644 --- a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st +++ b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMInterpreterTests, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMInterpreterTests', + #superclass : 'VMSpurMemoryManagerTest', #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -23,7 +25,7 @@ VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : #running } +{ #category : 'running' } VMInterpreterTests >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -41,7 +43,7 @@ VMInterpreterTests >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMInterpreterTests >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" diff --git a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st index cdfda82889..c1f9413e77 100644 --- a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJITPrimitiveCallingTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJITPrimitiveCallingTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJITPrimitiveCallingTest >> initStack [ self createBaseFrame. @@ -19,7 +21,7 @@ VMJITPrimitiveCallingTest >> initStack [ ] -{ #category : #running } +{ #category : 'running' } VMJITPrimitiveCallingTest >> setUp [ super setUp. @@ -34,7 +36,7 @@ VMJITPrimitiveCallingTest >> setUp [ self createActiveProcess ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -54,7 +56,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNum ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -74,7 +76,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForT self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -94,7 +96,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidR self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidReceiverRunsFallbackCode [ | callingMethod | @@ -114,7 +116,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidRece ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntegerWillExecuteThePrimitiveAndReturnASmallInteger [ | callingMethod | @@ -134,7 +136,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntege ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntegerReceiverReturnsSmallInteger [ | callingMethod | @@ -154,7 +156,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntege ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -174,7 +176,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersE ] -{ #category : #'tests - without tracing' } +{ #category : 'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValidResult [ | callingMethod | @@ -194,7 +196,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValid self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - without tracing' } +{ #category : 'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -216,7 +218,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidN ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -236,7 +238,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePri self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -256,7 +258,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResult self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - newMethod' } +{ #category : 'tests - newMethod' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ | callingMethod | @@ -278,7 +280,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ ] -{ #category : #'tests - primitiveFunctionPointer' } +{ #category : 'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -300,7 +302,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerW ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -334,7 +336,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwa ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -357,7 +359,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutFo ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -391,7 +393,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithF ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -414,7 +416,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWitho ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -448,7 +450,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -471,7 +473,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -488,7 +490,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : #'tests - newMethod' } +{ #category : 'tests - newMethod' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ | callingMethod | @@ -510,7 +512,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ ] -{ #category : #'tests - primitiveFunctionPointer' } +{ #category : 'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -532,7 +534,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCa ] -{ #category : #'tests - error code' } +{ #category : 'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -571,7 +573,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : #'tests - error code' } +{ #category : 'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -610,7 +612,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: machineSimulator framePointerRegisterValue) equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -646,7 +648,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwarders ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -671,7 +673,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForward ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -707,7 +709,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwar ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -732,7 +734,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutFor ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -768,7 +770,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithFo ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -793,7 +795,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithou ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -810,7 +812,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : #'tests - fail fast' } +{ #category : 'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode [ | callingMethod | @@ -833,7 +835,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode ] -{ #category : #'tests - profile sampling' } +{ #category : 'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSample [ | callingMethod | @@ -859,7 +861,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSa self assert: interpreter nextProfileTick equals: 0 ] -{ #category : #'tests - profile sampling' } +{ #category : 'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoesNotTakeSample [ | callingMethod | @@ -883,7 +885,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoes self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42) ] -{ #category : #'tests - fail fast' } +{ #category : 'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithoutFunctionExecutesFallbackCode [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st index a12c1df861..38e3b8dd38 100644 --- a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMJITVMPrimitiveTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJITVMPrimitiveTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> setUp [ super setUp. @@ -14,7 +16,7 @@ VMJITVMPrimitiveTest >> setUp [ self createBaseFrame ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod [ | methodToXray target | @@ -33,7 +35,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0111) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ | methodToXray target | @@ -52,7 +54,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0001) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ | methodToXray target | @@ -70,7 +72,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ | methodToXray target | @@ -89,7 +91,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0010) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasNotCompiled [ | methodToXray target | diff --git a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st index 0c20ab755d..5e0e973c35 100644 --- a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st +++ b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMJistMethodTestObject, - #superclass : #Object, + #name : 'VMJistMethodTestObject', + #superclass : 'Object', #instVars : [ 'var1', 'var2', @@ -132,10 +132,12 @@ Class { 'var128', 'var129' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #initialization } +{ #category : 'initialization' } VMJistMethodTestObject >> initialize [ super initialize. var1 := Array new. diff --git a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st index 8e27c1cdd4..7f09895aff 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJitMethodTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJitMethodTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ | tmp1 tmp2 | @@ -19,14 +21,14 @@ VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ ^ arg3 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> comparingSmallIntegers: aBitmap [ aBitmap size = 32768 ifTrue: [ ^ 17 ]. ^ 23 ] -{ #category : #helpers } +{ #category : 'helpers' } VMJitMethodTest >> initStack [ self createBaseFrame. @@ -41,13 +43,13 @@ VMJitMethodTest >> initStack [ ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> setUp [ super setUp. @@ -55,7 +57,7 @@ VMJitMethodTest >> setUp [ self installFloat64RegisterClass ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> setUpTrampolines [ super setUpTrampolines. @@ -67,7 +69,7 @@ VMJitMethodTest >> setUpTrampolines [ cogit ceReturnToInterpreterTrampoline: (self compileTrampoline: [ cogit Stop ] named:#ceReturnToInterpreterTrampoline). ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ | callingMethod parameter aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -102,7 +104,7 @@ VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ equals: 17 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ | callingMethod cm x y z | @@ -176,7 +178,7 @@ VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ | callingMethod cm x y z firstTerm size | @@ -248,7 +250,7 @@ VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ self assert: (memory fetchFloat64: 1 ofObject: z) equals: 22.0 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ | callingMethod | @@ -257,7 +259,7 @@ VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ self deny: callingMethod address equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testOnStackReplacementForLongRunningVectorAddMethod [ | callingMethod cm x y z firstTerm size frame | diff --git a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st index 02dd237dfe..b80dc4405f 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st @@ -1,26 +1,28 @@ Class { - #name : #VMJitMethodWithImmutabilityTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJitMethodWithImmutabilityTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMJitMethodWithImmutabilityTest >> initialCodeSize [ ^ 32 * 1024 ] -{ #category : #initialization } +{ #category : 'initialization' } VMJitMethodWithImmutabilityTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : #initialization } +{ #category : 'initialization' } VMJitMethodWithImmutabilityTest >> setUpTrampolines [ super setUpTrampolines. @@ -30,7 +32,7 @@ VMJitMethodWithImmutabilityTest >> setUpTrampolines [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodWithImmutabilityTest >> testCompileMethodWithALotOfAssignmentsToInstanceVariables [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st index 810ddfe30c..97a1aa0b1e 100644 --- a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st +++ b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMJitSimdBytecode, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJitSimdBytecode', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #running } +{ #category : 'running' } VMJitSimdBytecode >> jitOptions [ ^ super jitOptions @@ -18,7 +20,7 @@ VMJitSimdBytecode >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -60,7 +62,7 @@ VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -95,7 +97,7 @@ VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -130,7 +132,7 @@ VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -161,7 +163,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -191,7 +193,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ self assert: (entry registerr) equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegisterContent [ | endInstruction primitiveAddress array | @@ -222,7 +224,7 @@ VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegister self assert: (memory fetchFloat64: 1 ofObject: array) equals: 4.0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testSubVectorStoreResultIntoVectorRegister [ | endInstruction primitiveAddress array register | diff --git a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st index 88d625ab18..beaecb6e12 100644 --- a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMJittedBoxFloatPrimitivesTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedBoxFloatPrimitivesTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> setUp [ super setUp. @@ -22,7 +24,7 @@ VMJittedBoxFloatPrimitivesTest >> setUp [ named: 'ceCheckFeatures') ] ] -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> testAsFloat [ cogit receiverTags: memory smallIntegerTag. @@ -36,7 +38,7 @@ VMJittedBoxFloatPrimitivesTest >> testAsFloat [ equals: 27.0 ] -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> testAsFloatWhenThereIsNotSpaceFailsPrimitive [ | stop | diff --git a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st index 96c2a4c216..9ecec6897e 100644 --- a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedByteArrayAccessPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedByteArrayAccessPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'receiver', 'targetReceiver' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMJittedByteArrayAccessPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: bitSize [ ({ 8. 16. 32. 64 } includes: bitSize) ifFalse: [ self fail ]. @@ -42,7 +44,7 @@ VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: b ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ | endPart | @@ -54,7 +56,7 @@ VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is the same receiver" @@ -68,7 +70,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ targetReceiver := receiver ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: bitSize [ | complementedValue | @@ -90,7 +92,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: memory storeLong64: 0 ofObject: targetReceiver withValue: complementedValue ]. ] -{ #category : #'tests - load booleans' } +{ #category : 'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ | expectedValue | @@ -111,7 +113,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ ] -{ #category : #'tests - load booleans' } +{ #category : 'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ | expectedValue | @@ -132,7 +134,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ | expectedValue | @@ -153,7 +155,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ | expectedValue | @@ -174,7 +176,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ | expectedValue | @@ -195,7 +197,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ | expectedValue | @@ -216,7 +218,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ | expectedValue | @@ -237,7 +239,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ | expectedValue | @@ -258,7 +260,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue [ | expectedValue | @@ -279,7 +281,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue [ | expectedValue | @@ -300,7 +302,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue [ | expectedValue | @@ -321,7 +323,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue [ | expectedValue | @@ -342,7 +344,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue [ | expectedValue | @@ -363,7 +365,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue [ | expectedValue | @@ -384,7 +386,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue [ | expectedValue | @@ -405,7 +407,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue [ | expectedValue | @@ -426,7 +428,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ | expectedValue | @@ -447,7 +449,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ | expectedValue | @@ -468,7 +470,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ | expectedValue | @@ -489,7 +491,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ | expectedValue | @@ -510,7 +512,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ | expectedValue | @@ -531,7 +533,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ ] -{ #category : #'tests - store booleans' } +{ #category : 'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ self genPrimitive: #StoreBoolean8. @@ -547,7 +549,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ ] -{ #category : #'tests - store booleans' } +{ #category : 'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ self genPrimitive: #StoreBoolean8. @@ -563,7 +565,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ | expectedValue | @@ -583,7 +585,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ | expectedValue | @@ -603,7 +605,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ | expectedValue | @@ -623,7 +625,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ | expectedValue | @@ -642,7 +644,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNotOverwriteAfter [ | expectedValue | @@ -661,7 +663,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNo self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloatValue [ | expectedValue | @@ -680,7 +682,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloa ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ | expectedValue | @@ -699,7 +701,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeValue [ | expectedValue | @@ -719,7 +721,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValue [ | expectedValue | @@ -739,7 +741,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -761,7 +763,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeValue [ | expectedValue | @@ -781,7 +783,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValue [ | expectedValue | @@ -801,7 +803,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValueWithoutOverwriting [ | expectedValue | @@ -821,7 +823,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeValue [ | expectedValue | @@ -841,7 +843,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveValue [ | expectedValue | @@ -861,7 +863,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValue [ | expectedValue | @@ -881,7 +883,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValu ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValue [ | expectedValue | @@ -901,7 +903,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -923,7 +925,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ | expectedValue | @@ -943,7 +945,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ | expectedValue | @@ -963,7 +965,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ | expectedValue | @@ -983,7 +985,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ | expectedValue | @@ -1004,7 +1006,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ | expectedValue | @@ -1024,7 +1026,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> trailingName [ ^ 'Bytes' diff --git a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st index 47ffe36324..70c9624404 100644 --- a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMJittedExternalAddressAccessPrimitiveTest, - #superclass : #VMJittedByteArrayAccessPrimitiveTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJittedExternalAddressAccessPrimitiveTest', + #superclass : 'VMJittedByteArrayAccessPrimitiveTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #utils } +{ #category : 'utils' } VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is a byteArray and the receiver to the primitive is an external address pointing to it" @@ -14,7 +16,7 @@ VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedExternalAddressAccessPrimitiveTest >> trailingName [ ^ 'ExternalAddress' diff --git a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st index 4c246543ac..e7ce707f38 100644 --- a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedGeneralPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedGeneralPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ | lastOop | @@ -15,7 +17,7 @@ VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ ^ lastOop ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ "32 bits images does not have SmallFloats" @@ -40,7 +42,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self compile: [ | jump | @@ -60,7 +62,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self compile: [ | jump | @@ -80,7 +82,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self assert: machineSimulator receiverRegisterValue equals: 0 ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self compile: [ | jump | @@ -96,7 +98,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self compile: [ | jump | @@ -112,7 +114,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBoxedFloat [ self compile: [ | jump | @@ -128,7 +130,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBo self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSmallInteger [ self compile: [ | jump | @@ -144,7 +146,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSm self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterBoxedFloat [ self compile: [ | jump | @@ -160,7 +162,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterSmallInteger [ self compile: [ | jump | @@ -176,7 +178,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerBoxedFloat [ self compile: [ | jump | @@ -192,7 +194,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerSmallInteger [ self compile: [ | jump | @@ -208,7 +210,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self compile: [ | jump | @@ -224,7 +226,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self compile: [ | jump | @@ -240,7 +242,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self compile: [ | jump | @@ -256,7 +258,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self compile: [ | jump | @@ -272,7 +274,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat [ self compile: [ | jump | @@ -288,7 +290,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallInteger [ self compile: [ | jump | @@ -304,7 +306,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallIntege self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self compile: [ @@ -317,7 +319,7 @@ VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17). ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self compile: [ | jump | @@ -330,7 +332,7 @@ VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self assert: machineSimulator receiverRegisterValue equals: 17. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self compile: [ | jump | @@ -343,7 +345,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self assert: machineSimulator receiverRegisterValue equals: (memory classIndexOf: memory falseObject) ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self compile: [ @@ -356,7 +358,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self assert: machineSimulator arg0RegisterValue equals: classFloat ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self compile: [ @@ -370,7 +372,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding [ self compile: [ @@ -384,7 +386,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self compile: [ @@ -398,7 +400,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 4 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding [ self compile: [ @@ -412,7 +414,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: (7 * 4 roundUpTo: self wordSize) "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ | desiredSlots | @@ -430,7 +432,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: (desiredSlots * 8 / self wordSize) ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self compile: [ @@ -444,7 +446,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self compile: [ @@ -458,7 +460,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self compile: [ | jump | @@ -473,7 +475,7 @@ VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self assert: machineSimulator doublePrecisionFloatingPointRegister0Value equals: Float fmax. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -486,7 +488,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -503,7 +505,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -520,7 +522,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -537,7 +539,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegativ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -548,7 +550,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -565,7 +567,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 94). ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -583,7 +585,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -265). ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -596,7 +598,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagI self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -609,7 +611,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsS self assert: result equals: 0. "Incomplete Primitive, if the float cannot be allocated, it executes the C code" ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -629,7 +631,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ self assert: self machineSimulator receiverRegisterValue equals: (memory floatObjectOf: 42.0) ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -652,7 +654,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmal equals: 8589934592 asFloat ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerReceiver [ | result | @@ -665,7 +667,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -678,7 +680,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -694,7 +696,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -712,7 +714,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerReceiver [ | result | @@ -725,7 +727,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerRece self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -738,7 +740,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallInteg self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -754,7 +756,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerA self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -772,7 +774,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerReceiver [ | result | @@ -785,7 +787,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerR self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -798,7 +800,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIn self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBiggerThanSmallIntegerBits [ | primitiveAddress endInstruction | @@ -816,7 +818,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBigge self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -832,7 +834,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ | primitiveAddress endInstruction | @@ -850,7 +852,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ | primitiveAddress endInstruction | @@ -872,7 +874,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ equals: (memory integerObjectOf: memory maxSmallInteger >> 1 << 1) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWithShiftRight [ | primitiveAddress endInstruction | @@ -894,7 +896,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWit equals: (memory integerObjectOf: 17) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBiggerThanNumSmallIntegerBits [ | primitiveAddress endInstruction | @@ -916,7 +918,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBi equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ | primitiveAddress endInstruction | @@ -934,7 +936,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 128) ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerReceiver [ | result | @@ -947,7 +949,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -960,7 +962,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -976,7 +978,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -994,7 +996,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ | endInstruction primitiveAddress | @@ -1012,7 +1014,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -1029,7 +1031,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1042,7 +1044,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1059,7 +1061,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1076,7 +1078,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1087,7 +1089,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1104,7 +1106,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1122,7 +1124,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1139,7 +1141,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1152,7 +1154,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIs self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -1169,7 +1171,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1186,7 +1188,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallIn self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1203,7 +1205,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1214,7 +1216,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSm self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1231,7 +1233,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1249,7 +1251,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1266,7 +1268,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1279,7 +1281,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsN self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1296,7 +1298,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInt self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1307,7 +1309,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSma self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1324,7 +1326,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1342,7 +1344,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNum self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1355,7 +1357,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfRecei self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1372,7 +1374,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1383,7 +1385,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceive self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1400,7 +1402,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1418,7 +1420,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNe self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1431,7 +1433,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1448,7 +1450,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1459,7 +1461,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1476,7 +1478,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1494,7 +1496,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveHashMultiply' } +{ #category : 'tests - primitiveHashMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHashMultiply [ | result primitiveAddress | @@ -1511,7 +1513,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHash self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50 hashMultiply). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1524,7 +1526,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1541,7 +1543,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1552,7 +1554,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1569,7 +1571,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1587,7 +1589,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1600,7 +1602,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1617,7 +1619,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1628,7 +1630,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1645,7 +1647,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1663,7 +1665,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1676,7 +1678,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1693,7 +1695,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflows [ | endInstruction primitiveAddress | @@ -1710,7 +1712,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ | endInstruction primitiveAddress | @@ -1729,7 +1731,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ | endInstruction primitiveAddress | @@ -1748,7 +1750,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -1765,7 +1767,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1776,7 +1778,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallInteger [ | endInstruction primitiveAddress | @@ -1793,7 +1795,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallIntege self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -84). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1810,7 +1812,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 84). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1828,7 +1830,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17424). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand [ | endInstruction primitiveAddress | @@ -1846,7 +1848,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop instanceVariableCount | @@ -1872,7 +1874,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ equals: memory nilObject ] ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop arraySize | @@ -1902,7 +1904,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectlyWhenNotAligned [ | endInstruction primitiveAddress class newOop arraySize | @@ -1933,7 +1935,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1946,7 +1948,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1963,7 +1965,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1974,7 +1976,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1991,7 +1993,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2009,7 +2011,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -2027,7 +2029,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -2044,7 +2046,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2057,7 +2059,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2074,7 +2076,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -2091,7 +2093,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2102,7 +2104,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2119,7 +2121,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2137,7 +2139,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -2154,7 +2156,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ @@ -2173,7 +2175,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ @@ -2192,7 +2194,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ @@ -2211,7 +2213,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ @@ -2230,7 +2232,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -1). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ @@ -2248,7 +2250,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2261,7 +2263,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2278,7 +2280,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -2295,7 +2297,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -2312,7 +2314,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2323,7 +2325,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2340,7 +2342,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -10). ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2358,7 +2360,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallIntegers [ | result | @@ -2370,7 +2372,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallI self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentDoesNotReturn [ "If the argument is not an small integer, flow jumps and return does not (yet) happen" @@ -2396,7 +2398,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentD self assert: machineSimulator arg0RegisterValue equals: self memory falseObject. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self compile: [ @@ -2418,7 +2420,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsTrue [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st index 5d37bd7ef3..c78d8ff140 100644 --- a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMJittedLookupTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMJittedLookupTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'methodOop', 'selectorOop', 'receiver', 'receiverClass' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -25,7 +27,7 @@ VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -38,7 +40,7 @@ VMJittedLookupTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -51,7 +53,7 @@ VMJittedLookupTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setUpClassAndMethod [ @@ -63,7 +65,7 @@ VMJittedLookupTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" @@ -90,7 +92,7 @@ VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ | superclass superclassMethodDictionary foundMethod | @@ -123,7 +125,7 @@ VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ self assert: foundMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> testLookUpMNUWithAnyNonMethodObjectShouldNotJItCompile [ | superclass superclassMethodDictionary foundMethod | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st index 7f9a69d72f..76898f93d9 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedPrimitiveAtPutTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveAtPutTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtPutTest >> setUp [ super setUp. @@ -21,7 +23,7 @@ VMJittedPrimitiveAtPutTest >> setUp [ bytecodes: 10. ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtPutTest >> setUpTrampolines [ super setUpTrampolines. @@ -30,7 +32,7 @@ VMJittedPrimitiveAtPutTest >> setUpTrampolines [ ] -{ #category : #tests } +{ #category : 'tests' } VMJittedPrimitiveAtPutTest >> testPrimitiveAtPut32bitIndexableWithLargeNumberShouldStoreValue [ | integerArray offset expectedValue | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st index 18d5ef041c..e36762ff81 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedPrimitiveAtTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveAtTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitiveAtTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMJittedPrimitiveAtTest >> setUp [ bytecodes: 10. ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -41,7 +43,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -57,7 +59,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -73,7 +75,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBounds self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ | integerArray offset | @@ -100,7 +102,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -116,7 +118,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -142,7 +144,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShouldFallThrough [ | integerArray offset | @@ -158,7 +160,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShou self assertFallsThrough ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -174,7 +176,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ | integerArray offset | @@ -199,7 +201,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -228,7 +230,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -244,7 +246,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32BitsShouldFallthrough [ | integerArray offset | @@ -261,7 +263,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32Bits self assertFallsThrough ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldReturnValue [ | integerArray offset | @@ -288,7 +290,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldRe equals: SmallInteger maxVal + 1 ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldReturnValue [ | integerArray offset | @@ -315,7 +317,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldRe equals: (memory integerObjectOf: 17) ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -330,7 +332,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -345,7 +347,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -360,7 +362,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -375,7 +377,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThro self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -390,7 +392,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -405,7 +407,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBounds self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ | integerArray offset | @@ -431,7 +433,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -446,7 +448,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -461,7 +463,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -487,7 +489,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldRetu equals: expectedValue ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ | offset array | @@ -500,7 +502,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ | offset array | @@ -514,7 +516,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShouldFallThrough [ | objectWithInstanceVariables | @@ -531,7 +533,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShould self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShouldFallThrough [ | objectWithNoInstanceVariables | @@ -546,7 +548,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShou self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ machineSimulator receiverRegisterValue: (memory characterObjectOf: $a codePoint). @@ -555,7 +557,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -567,7 +569,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtSmallIntegerShouldFallThrough [ machineSimulator receiverRegisterValue: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st index f1948eec9d..9771567a95 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedPrimitiveSizeTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveSizeTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitiveSizeTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveSizeTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMJittedPrimitiveSizeTest >> setUp [ bytecodes: 10. ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf16bitSlots [ | integerArray | @@ -41,7 +43,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf32bitSlots [ | integerArray | @@ -57,7 +59,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShouldReturnNumberOf32bitSlots [ | integerArray aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -83,7 +85,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShoul equals: 32768 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf64bitSlots [ | integerArray | @@ -99,7 +101,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8bitSlots [ | integerArray | @@ -115,7 +117,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8 equals: 7 ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots [ | array | @@ -129,7 +131,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 7) ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ | objectWithInstanceVariables | @@ -144,7 +146,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThrough [ self prepareStackForSendReceiver: (memory characterObjectOf: $a codePoint). @@ -152,7 +154,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThroug self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -163,7 +165,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateIntegerShouldFallThrough [ self prepareStackForSendReceiver: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st index c306428b27..99c580ac58 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st @@ -1,21 +1,23 @@ Class { - #name : #VMJittedPrimitivesTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMJittedPrimitivesTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'classFloat' ], #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #private } +{ #category : 'private' } VMJittedPrimitivesTest class >> isAbstract [ ^ self == VMJittedPrimitivesTest ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -28,7 +30,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: argumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -41,7 +43,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument ] -{ #category : #utils } +{ #category : 'utils' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: firstArgumentOop and: secondArgumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -54,13 +56,13 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument self runUntilReturn ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st index 94945ee4fb..17c2d6be67 100644 --- a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedSmallFloatPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedSmallFloatPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ "SmallFloats only exist in 64bits systems" @@ -15,7 +17,7 @@ VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -29,7 +31,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFl self assert: machineSimulator receiverRegisterValue equals: (self memory floatObjectOf: 3.0) ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -45,7 +47,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmal equals: 0.5 ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -61,7 +63,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse equals: memory falseObject ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -77,7 +79,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -93,7 +95,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -109,7 +111,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -125,7 +127,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenEqual [ cogit receiverTags: memory smallFloatTag. @@ -141,7 +143,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -157,7 +159,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -173,7 +175,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -189,7 +191,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -205,7 +207,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -221,7 +223,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -237,7 +239,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -253,7 +255,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -269,7 +271,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -285,7 +287,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASm equals: 6.0 ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -301,7 +303,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -317,7 +319,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : #'tests - primitiveSquareRoot' } +{ #category : 'tests - primitiveSquareRoot' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -332,7 +334,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASm equals: 2.0 sqrt ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSubtractTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. diff --git a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st index 63226acbf5..a1b3df39a5 100644 --- a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMLiterRulesTest, - #superclass : #TestCase, - #category : #VMMakerTests + #name : 'VMLiterRulesTest', + #superclass : 'TestCase', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ | ast | @@ -20,7 +21,7 @@ VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ ast pragmas first). ] -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ | ast | @@ -31,7 +32,7 @@ VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ ast pragmas first) ] -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangTypeDeclarationForVariable [ | ast | diff --git a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st index 7094ce4b0e..48bc2548f9 100644 --- a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMLookUpTest, - #superclass : #VMInterpreterTests, + #name : 'VMLookUpTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'methodOop', 'selectorOop', @@ -14,10 +14,12 @@ Class { 'VMBasicConstants', 'VMBytecodeConstants' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest class >> testParameters [ ^ super testParameters * (ParametrizedTestMatrix new @@ -26,7 +28,7 @@ VMLookUpTest class >> testParameters [ yourself) ] -{ #category : #assertions } +{ #category : 'assertions' } VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ | length | @@ -37,19 +39,19 @@ VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ self deny: (memory isForwarded: selector) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMLookUpTest >> linearSearchLimit [ ^ linearSearchLimit ] -{ #category : #accessing } +{ #category : 'accessing' } VMLookUpTest >> linearSearchLimit: anObject [ linearSearchLimit := anObject ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -62,7 +64,7 @@ VMLookUpTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -75,7 +77,7 @@ VMLookUpTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : #running } +{ #category : 'running' } VMLookUpTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -131,7 +133,7 @@ VMLookUpTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setUpClassAndMethod [ @@ -143,7 +145,7 @@ VMLookUpTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ "We set a smallInteger class into the classTable" @@ -153,7 +155,7 @@ VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ equals: receiverClass ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsForwardedMethod [ | aMethodDictionary | @@ -169,7 +171,7 @@ VMLookUpTest >> testLookUpFindsForwardedMethod [ self assert: interpreter newMethod equals: methodOop. ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodInClass [ | aMethodDictionary | @@ -184,7 +186,7 @@ VMLookUpTest >> testLookUpFindsMethodInClass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodInSuperclass [ | superclass superclassMethodDictionary | @@ -209,7 +211,7 @@ VMLookUpTest >> testLookUpFindsMethodInSuperclass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ | aMethodDictionary | @@ -226,7 +228,7 @@ VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ self assertNonForwardedSelectorsIn: aMethodDictionary ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ | aMethodDictionary | @@ -241,7 +243,7 @@ VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -283,7 +285,7 @@ VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -319,7 +321,7 @@ VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ | superclass superclassMethodDictionary | @@ -341,7 +343,7 @@ VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ | nonExistingSelector superclass superclassMethodDictionary dnuMethodOop dnuSelectorOop | @@ -379,7 +381,7 @@ VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ | nonExistingSelector aMethodDictionary | @@ -400,7 +402,7 @@ VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ self should: [interpreter lookupMethodInClass: receiverClass] raise: Error. ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -434,7 +436,7 @@ VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ "There is no superclass, so no cannotInterpret: to call" @@ -456,7 +458,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ self should: [ interpreter lookupMethodInClass: receiverClass ] raise: Error ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUMethod [ "Class has a nil methodDictionary, so `cannotInterpret:` is send. But superclass does not understand it, so `doesNotUnderstand:` is called instead." @@ -502,7 +504,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUM self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -542,7 +544,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ self assert: interpreter newMethod equals: cannotInterpretMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ | aMethodDictionary receiverOop frame | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." @@ -567,7 +569,7 @@ VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformExecutes [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -585,7 +587,7 @@ VMLookUpTest >> testPrimitivePerformExecutes [ self assert: interpreter stackTop equals: receiverOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformFindsMethodOop [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -606,7 +608,7 @@ VMLookUpTest >> testPrimitivePerformFindsMethodOop [ "(1) the Instruction Pointer is set to be just before the bytecode to execute, so fetchNextBytecode will fetch the first bytecode ( #justActivateNewMethod: )" ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformSetsIPBeforeFirstBytecode [ | aMethodDictionary receiverOop | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." diff --git a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st index 245cbd43ed..acd7a0e1c3 100644 --- a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st @@ -1,46 +1,47 @@ Class { - #name : #VMMASTTranslationTest, - #superclass : #TestCase, - #category : #VMMakerTests + #name : 'VMMASTTranslationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> + arg [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> emptyBlockHasSingleNilStatement [ [ ] value ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineMethodWithLoop [ self methodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineSecondLevelMethodWithLoop [ self inlineMethodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineTwiceMethodWithLoop [ self methodWithLoop. self methodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineTwiceSecondLevelMethodWithLoop [ self inlineMethodWithLoop. self inlineMethodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ @@ -50,17 +51,17 @@ VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithArgument: anArgument [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithExpressionInLoopCondition [ 1 to: self something - 10 do: [ :i | self foo: i ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNil [ self something @@ -68,7 +69,7 @@ VMMASTTranslationTest >> methodWithIfNil [ ifNotNil: [ 2 ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNil [ self something @@ -77,7 +78,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNil [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ self something @@ -85,7 +86,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNil [ self something @@ -93,7 +94,7 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNil [ ifNil: [ 2 ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ self something @@ -101,14 +102,14 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ ifNil: [ ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilWithArgument [ self something ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ @@ -117,17 +118,17 @@ VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ self inlinedMethodWithLocalWithSameName. ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithLoop [ 1 to: 10 do: [ :i | self foo: i ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithNoArguments [ ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testArgumentIsNoTemp [ | translation method | @@ -137,7 +138,7 @@ VMMASTTranslationTest >> testArgumentIsNoTemp [ self deny: (translation locals includes: method methodNode arguments first name) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -174,7 +175,7 @@ VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -211,7 +212,7 @@ VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -243,7 +244,7 @@ VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ | translation method codeGenerator block | @@ -259,7 +260,7 @@ VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ self assert: block statements first value equals: nil ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ | translation | @@ -268,7 +269,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ self assert: translation statements first selector equals: #ifTrue:ifFalse: ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ | translation | @@ -288,7 +289,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ | translation | @@ -308,7 +309,7 @@ VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -323,7 +324,7 @@ VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ self assert: (translation locals includesAll: inlinedMethod locals) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -339,7 +340,7 @@ VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVar self assert: translation locals asSet size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -354,7 +355,7 @@ VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVari self assert: translation locals asSet size equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -370,7 +371,7 @@ VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopInd self assert: translation locals asSet size equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ | method codeGenerator methodTranslation inlinedMethod inlinedMethodTranslation | @@ -390,7 +391,7 @@ VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ self assert: (methodTranslation declarations at: #cond2) equals: 'pthread_cond_t cond2' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testKeywordMethodHasArgument [ | translation method | @@ -400,7 +401,7 @@ VMMASTTranslationTest >> testKeywordMethodHasArgument [ self assert: (translation args includes: method methodNode arguments first name) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ | translation method loop | @@ -411,7 +412,7 @@ VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ self assert: loop arguments size equals: 4 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable [ | translation method loop | @@ -422,7 +423,7 @@ VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable self assert: loop arguments size equals: 6 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ | translation method block | @@ -433,7 +434,7 @@ VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ self deny: (translation locals includes: block arguments first) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid [ | translation codeGenerator | @@ -450,7 +451,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid self assert: translation returnType equals: #void ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ | translation codeGenerator | @@ -467,7 +468,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ self assert: translation returnType equals: #void ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ | translation | @@ -476,7 +477,7 @@ VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ self assert: translation selector equals: #+. ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ | translation method | @@ -486,7 +487,7 @@ VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ self assert: translation selector equals: method selector. ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateUnaryMethodHasSameName [ | translation method | diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st index bc7e61b968..74591986af 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMMachineCodeFrameBuilderForTest, - #superclass : #Object, + #name : 'VMMachineCodeFrameBuilderForTest', + #superclass : 'Object', #instVars : [ 'test', 'returnAddress', @@ -10,20 +10,21 @@ Class { 'spouseContext', 'method' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> arguments: anObject [ arguments := anObject ] -{ #category : #building } +{ #category : 'building' } VMMachineCodeFrameBuilderForTest >> buildFrame [ | methodAddress | @@ -54,13 +55,13 @@ VMMachineCodeFrameBuilderForTest >> buildFrame [ test cogit needsFrame: true. ] -{ #category : #testing } +{ #category : 'testing' } VMMachineCodeFrameBuilderForTest >> hasSpouseContext [ ^ spouseContext notNil ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ self test: aTest. @@ -70,63 +71,63 @@ VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ temporaries := #(). ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> method [ ^ method ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> method: anObject [ method := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> receiver [ ^ receiver ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> receiver: anObject [ receiver := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> returnAddress [ ^ returnAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> returnAddress: anObject [ returnAddress := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> spouseContext [ ^ spouseContext ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> spouseContext: aContextOop [ spouseContext := aContextOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> temporaries [ ^ temporaries ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> temporaries: anObject [ temporaries := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> test [ ^ test ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> test: anObject [ test := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st index a4ead00b02..b46584b7c3 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMMachineCodeMethod, - #superclass : #Object, + #name : 'VMMachineCodeMethod', + #superclass : 'Object', #instVars : [ 'virtualMachine', 'cogMethodSurrogate' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogate: aCogMethodSurrogate [ ^ self new @@ -20,17 +22,17 @@ VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogat yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> cogMethodSurrogate [ ^ cogMethodSurrogate ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> cogMethodSurrogate: anObject [ cogMethodSurrogate := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> disassemble [ | methodEntry instructions | methodEntry := cogMethodSurrogate asInteger + virtualMachine cogit entryOffset. @@ -42,12 +44,12 @@ VMMachineCodeMethod >> disassemble [ ' join: (instructions collect: [:i | i assemblyCodeString]) ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st index bedd8c02a5..b0cf51c095 100644 --- a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMMachineSimulatorTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMMachineSimulatorTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogAbstractRegisters' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - instruction exception' } +{ #category : 'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ | label lastInstruction subInstruction breakInstruction | @@ -36,7 +38,7 @@ VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ ] -{ #category : #'tests - instruction exception' } +{ #category : 'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ | label lastInstruction subInstruction breakInstruction | @@ -65,7 +67,7 @@ VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -93,7 +95,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ | label lastInstruction invalidAddressHandled addInstruction jumpInstruction expectedAddress | @@ -137,7 +139,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ equals: expectedAddress ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ | label lastInstruction invalidAddressHandled | @@ -181,7 +183,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ ^ self ] ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespected [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -217,7 +219,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self temporaryRegisterValue equals: 1 ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespectedCorrectInstructionPointer [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -253,7 +255,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self machineSimulator instructionPointerRegisterValue equals: jumpInstruction address ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -280,7 +282,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -306,7 +308,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -333,7 +335,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -359,7 +361,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled exptectedAddress | @@ -395,7 +397,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAd self assert: invalidAddressHandled ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ | label lastInstruction subInstruction | @@ -421,7 +423,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstructionPointer [ | label lastInstruction subInstruction jumpInstruction | @@ -446,7 +448,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstru ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ | label lastInstruction | @@ -468,7 +470,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ self fail. ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPointer [ | label lastInstruction | @@ -492,7 +494,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPoi self fail. ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionUntilAddressIsRespected [ | label lastInstruction | diff --git a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st index be3b8ddce2..15c0afc846 100644 --- a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st +++ b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMMockCodeGenerator, - #superclass : #Object, + #name : 'VMMockCodeGenerator', + #superclass : 'Object', #instVars : [ 'interpreter', 'addedPrimitives' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ ^ self new @@ -16,13 +18,13 @@ VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ yourself ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> accessorDepthCalculator [ ^ self ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> accessorDepthForSelector: aString [ ^ addedPrimitives at: aString @@ -30,31 +32,31 @@ VMMockCodeGenerator >> accessorDepthForSelector: aString [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector [ self addPrimitive: aSelector accessorDepth: -1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector accessorDepth: aDepth [ addedPrimitives at: aSelector put: aDepth ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> exportedPrimitiveNames [ ^ (addedPrimitives keys collect: [ :e | e -> e ]) asDictionary ] -{ #category : #initialization } +{ #category : 'initialization' } VMMockCodeGenerator >> initialize [ addedPrimitives := Dictionary new ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> initializeWithPrimitiveTable [ interpreter primitiveTable @@ -62,7 +64,7 @@ VMMockCodeGenerator >> initializeWithPrimitiveTable [ thenDo: [ :aSelector | self addPrimitive: aSelector ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> interpreter: aCogVMSimulatorLSB [ interpreter := aCogVMSimulatorLSB. diff --git a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st index 42382cc3ae..acfab19b5c 100644 --- a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMObjectAccessorIdentificationTest, - #superclass : #TestCase, - #category : #'VMMakerTests-Simulation' + #name : 'VMObjectAccessorIdentificationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests-Simulation', + #package : 'VMMakerTests', + #tag : 'Simulation' } -{ #category : #tests } +{ #category : 'tests' } VMObjectAccessorIdentificationTest >> testObjectAccessorMessagesAreCorrectlyDetected [ | knownSelectors nonAccessorSelectors | diff --git a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st index 5419d39e53..54dd7eedd7 100644 --- a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st @@ -1,17 +1,19 @@ Class { - #name : #VMObjectLayoutTests, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-ObjectLayoutTests' + #name : 'VMObjectLayoutTests', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-ObjectLayoutTests', + #package : 'VMMakerTests', + #tag : 'ObjectLayoutTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMObjectLayoutTests >> formatFromInstSpec: instSpecInt instSize: instSizeInt [ "A class format is composed by" "<5 bits inst spec><16 bits inst size>" ^ instSpecInt << 16 + instSizeInt ] -{ #category : #helpers } +{ #category : 'helpers' } VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSize: aSizeInt [ | class | class := self @@ -21,7 +23,7 @@ VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSi ^class ] -{ #category : #helper } +{ #category : 'helper' } VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ | objSize | "always have at least one slot for forwarders" @@ -37,7 +39,7 @@ VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testCharacterIsImmediate [ | char | char := memory characterObjectOf: $a asInteger. @@ -45,7 +47,7 @@ VMObjectLayoutTests >> testCharacterIsImmediate [ self assert: (memory fetchClassTagOf: char) equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ | class objOop | 0 to: 254 do: [ :slots | @@ -61,19 +63,19 @@ VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ equals: objSize ] ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesInRange [ self assert: (memory isIntegerValue: memory minSmallInteger) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesNotInRange [ "An integer smaller than the smallest integer is not in a valid range" self deny: (memory isIntegerValue: memory minSmallInteger - 1) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectAlignment [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -84,7 +86,7 @@ VMObjectLayoutTests >> testObjectAlignment [ self assert: objOop2 \\ 8 equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ | class objOop header | 0 to: 254 do: [ :slots | @@ -95,7 +97,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ | class objOop header classIndex | 0 to: 10 do: [ :slots | @@ -108,7 +110,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ | class objOop header classInstSpec | "instSpec: @@ -123,7 +125,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout16Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 12-15 = 16-bit indexable @@ -145,7 +147,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout32Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 10-11 = 32-bit indexable @@ -165,7 +167,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout8Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 16-23 = 8-bit indexable @@ -192,7 +194,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayout [ | class objOop header classInstSpec instSpec | instSpec := 2. "instSpec for indexable objects with no inst vars (Array et al)" @@ -206,7 +208,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayo ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectMinimumSize [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -216,7 +218,7 @@ VMObjectLayoutTests >> testObjectMinimumSize [ self assert: objOop2 - objOop1 equals: 16 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ | class slots obj1oop obj2oop | "objects always are allocated with at least one slots for forwarding" @@ -227,7 +229,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ self assert: obj2oop - obj1oop equals: self objectHeaderSize + memory allocationUnit ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForwarding [ | class slots oop | slots := 0. @@ -236,7 +238,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForw self assert: (memory bytesInObject: oop) equals: self objectHeaderSize + memory allocationUnit. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ | class objOop slots | slots := 255. @@ -251,7 +253,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ | class objOop bigOopHeader mask numSlots | mask := 16rFFFFFFFFFFFFFF. @@ -265,7 +267,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ self assert: numSlots equals: slots ] ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ "Test of the border case when int = 2r000111111... . The highest possible value using usqInt encoding is (2**61) -1 since (2**61) can be confused with a pointer (on a 64 bits machine) Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guarantees the portability @@ -274,25 +276,25 @@ VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ self deny: (memory isIntegerValue: memory maxCInteger >> memory numSmallIntegerTagBits) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase2 [ "Test of the border case when int = 2r111000000 ... . Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guaranties the portability of the test on 32 and 64 bit computer. " self deny: (memory isIntegerValue: (memory maxCInteger >> memory numSmallIntegerTagBits) bitInvert) "<=> isIntegerValue: (0001111) bitInvert" ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesInRange [ self assert: (memory isIntegerValue: memory maxSmallInteger) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesNotInRange [ self deny: (memory isIntegerValue: memory maxSmallInteger + 1) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testSmallIntegerIsImmediate [ | int | int := memory integerObjectOf: 42. @@ -300,7 +302,7 @@ VMObjectLayoutTests >> testSmallIntegerIsImmediate [ self assert: (memory fetchClassTagOf: int) equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testVariableObjectWithInstVarsHasTheRightSize [ | class objOop fixedFieldsSize indexableSize | indexableSize := 12. diff --git a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st index b3400f900f..c780fcb9c2 100644 --- a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMObjectStackTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMObjectStackTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ @@ -12,7 +14,7 @@ VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ self assert: memory mournQueue equals: (memory objStackAt: 4098"MournQueueRootIndex") ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testNewMournQueueIsEmpty [ | objStack | @@ -22,7 +24,7 @@ VMObjectStackTest >> testNewMournQueueIsEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testNewObjectStackIsEmpty [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -33,7 +35,7 @@ VMObjectStackTest >> testNewObjectStackIsEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ | objStack | @@ -46,7 +48,7 @@ VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ ]. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -60,7 +62,7 @@ VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ ]. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopMournQueueReducesSize [ | objStack | @@ -70,7 +72,7 @@ VMObjectStackTest >> testPopMournQueueReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ | objStack | @@ -79,7 +81,7 @@ VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -89,7 +91,7 @@ VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectStackReducesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -100,14 +102,14 @@ VMObjectStackTest >> testPopObjectStackReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjects: n [ "Create an object stack at the position of the mark stack in the class table (4096)" self testPushObjects: n inStackAtIndex: 4096 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ memory ensureRoomOnObjStackAt: objectStackIndex. @@ -119,19 +121,19 @@ VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ self assert: (memory sizeOfObjStack: (memory objStackAt: objectStackIndex)) equals: n ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjectsAboveObjectStackLimit [ self testPushObjects: memory objectStackPageLimit + 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjectsToObjectStackLimit [ self testPushObjects: memory objectStackPageLimit ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushToMournQueueIncreasesSize [ | objStack | @@ -140,7 +142,7 @@ VMObjectStackTest >> testPushToMournQueueIncreasesSize [ self assert: (memory sizeOfObjStack: objStack) equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushToObjectStackIncreasesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st index 71dbc2dd40..996a095879 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPermanentSpaceImageReadingTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-PermSpace' + #name : 'VMPermanentSpaceImageReadingTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #utilities } +{ #category : 'utilities' } VMPermanentSpaceImageReadingTest >> loadImage [ | memoryClass isa | @@ -38,7 +40,7 @@ VMPermanentSpaceImageReadingTest >> loadImage [ ] -{ #category : #initialization } +{ #category : 'initialization' } VMPermanentSpaceImageReadingTest >> setUp [ super setUp. @@ -50,7 +52,7 @@ VMPermanentSpaceImageReadingTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpaceImageReadingTest >> testLoadingImageHasEmptyPermSpaceWhenImageDoesNotHave [ self saveImage. diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st index 49cf813a85..288eaf2d29 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPermanentSpaceMemoryTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-PermSpace' + #name : 'VMPermanentSpaceMemoryTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #running } +{ #category : 'running' } VMPermanentSpaceMemoryTest >> setUp [ super setUp. @@ -12,7 +14,7 @@ VMPermanentSpaceMemoryTest >> setUp [ self createWeakArrayClass ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ | permanentObject allInstances | @@ -25,7 +27,7 @@ VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ self assert: (memory fetchPointer: 0 ofObject: allInstances) equals: permanentObject. ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ | permanentObject oldObject youngReplacement arrFrom arrTo ec | @@ -52,7 +54,7 @@ VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ self deny: ec equals: PrimNoErr ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenModified [ | oldObject1 permanentObject1 | @@ -73,7 +75,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenMoving [ | oldObject1 permanentObject1 | @@ -94,7 +96,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ | permanentObject newObject | @@ -112,7 +114,7 @@ VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ | permanentObject oldObject | @@ -130,7 +132,7 @@ VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ | oldObject youngObject permanentObject | @@ -159,7 +161,7 @@ VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememberedSet [ | permanentObject youngObject rootObject| @@ -175,7 +177,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememb self assert: (memory getFromPermToNewSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRememberedSet [ | permanentObject oldObject rootObject| @@ -192,7 +194,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRemembe self assert: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded [ | permanentObject oldObject rootObject| @@ -215,7 +217,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ | permanentObject oldObject | @@ -230,7 +232,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesArray [ | permanentObject youngObject rootObject anArray| @@ -254,7 +256,7 @@ VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesAr self assert: (memory getMemoryMap isPermanentObject: youngObject). ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ | permanentObject | @@ -264,7 +266,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ self assert: permanentObject equals: memory getMemoryMap permSpaceStart + 16 "There is a zero-slot objects always in the perm space" ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ | permanentObject | @@ -274,7 +276,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ self deny: (memory getMemoryMap isYoungObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ | permanentObject | @@ -284,7 +286,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ self deny: (memory getMemoryMap isOldObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ | permanentObject | @@ -294,7 +296,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ self assert: (memory getMemoryMap isPermanentObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ | permanentObject nextObject | @@ -306,7 +308,7 @@ VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ | oldObject1 permanentObject1 oldObject2 youngObject | @@ -343,7 +345,7 @@ VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRememberedSetAndThenRemoved [ | oldObject1 oldObject2 permObject2 | @@ -367,7 +369,7 @@ VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRemembered self assert: memory getFromPermToNewSpaceRememberedSet rememberedSetSize equals: 0. ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ @@ -385,7 +387,7 @@ VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 array | @@ -406,7 +408,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInReme ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTheRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array youngObject | @@ -438,7 +440,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTh ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array | @@ -461,7 +463,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFro self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -481,7 +483,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -499,7 +501,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememb ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForwarderInOldSpace [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -514,7 +516,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForw self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: oldObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarderInScanvenge [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -531,7 +533,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarde self deny: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderInGC [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -548,7 +550,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderIn self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompactingForSaving [ | oldObject1 permanentObject1 oldObject2 oldObject2Hash | @@ -572,7 +574,7 @@ VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompa self assert: (memory hashBitsOf: (memory fetchPointer: 0 ofObject: permanentObject1)) equals: oldObject2Hash ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ | permanentObject oldObject oldClass oldClassHash found | @@ -598,7 +600,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ self assert: found ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered [ @@ -611,7 +613,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemembered [ @@ -624,7 +626,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ @@ -636,7 +638,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ @@ -649,7 +651,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedWhenPointingToMachineCodeMethod [ @@ -671,7 +673,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedW ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRememberedSet [ @@ -693,7 +695,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRemem ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -719,7 +721,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | @@ -748,7 +750,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNille ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -771,7 +773,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFire ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st index 7393d6f584..5ba4cc63d3 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #VMPermanentSpacePrimitiveTest, - #superclass : #VMAbstractPrimitiveTest, + #name : 'VMPermanentSpacePrimitiveTest', + #superclass : 'VMAbstractPrimitiveTest', #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : #'VMMakerTests-PermSpace' + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #configuring } +{ #category : 'configuring' } VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ super configureEnvironmentBuilder. @@ -17,7 +19,7 @@ VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ environmentBuilder permSpaceSize: 10*1024*1024. ] -{ #category : #initialization } +{ #category : 'initialization' } VMPermanentSpacePrimitiveTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMPermanentSpacePrimitiveTest >> setUp [ self createWeakArrayClass. ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ interpreter push: (memory integerObjectOf: 42). @@ -35,7 +37,7 @@ VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ interpreter push: (self newZeroSizedObject). @@ -45,7 +47,7 @@ VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ interpreter push: (self newOldSpaceObjectWithSlots: 0). @@ -55,7 +57,7 @@ VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ | oldObj permObject | @@ -69,7 +71,7 @@ VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ | oldObject | @@ -84,7 +86,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ | oldObject | @@ -99,7 +101,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ | newObject | @@ -114,7 +116,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ | oldObject | @@ -129,7 +131,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksWithByteArray [ | oldObject | diff --git a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st index 2b4eea4684..f23f44e730 100644 --- a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMPinnedObjectTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMPinnedObjectTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> lastAliveObject [ ^ self keptObjectInVMVariable2 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> lastPinnedObject [ ^ self keptObjectInVMVariable1 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newAliveObject [ | newAliveObject | newAliveObject := self newOldSpaceObjectWithSlots: 1. @@ -23,12 +25,12 @@ VMPinnedObjectTest >> newAliveObject [ ^ newAliveObject ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newDeadObject [ ^ self newOldSpaceObjectWithSlots: 1 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newKeptPinnedObject [ | newPinned | newPinned := self newOldSpaceObjectWithSlots: 1. @@ -38,7 +40,7 @@ VMPinnedObjectTest >> newKeptPinnedObject [ ^ newPinned ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed aliveHash | "D = Dead @@ -68,7 +70,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOld self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPinnedObject [ | aliveObject destination | "D = Dead @@ -96,7 +98,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPi self assert: self lastAliveObject equals: destination. ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -126,7 +128,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStar self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBeforeFirstPinned [ | aliveObject destination | "D = Dead @@ -154,7 +156,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBefore self assert: self lastAliveObject equals: destination. ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -184,7 +186,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfO self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDead [ | destination aliveObject aliveObjectHash | "D = Dead @@ -210,7 +212,7 @@ VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDea self assert: (memory isFreeObject: (memory objectAfter: self lastPinnedObject)). ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ "if we follow the forwarder, the object is in the old space" | obj | @@ -221,7 +223,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ self assert: (memory isInOldSpace: (memory followForwarded: obj)) ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForwarderBehind [ | obj | obj := self newObjectWithSlots: 0. @@ -231,7 +233,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForward self assert: (memory isForwarded: obj) ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinnedObjectShouldNotBeMovedByGC [ | pinned | self newOldSpaceObjectWithSlots: 0. "deadObject, that differenciate the start of the old space to the pin" diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st index 1c7a580223..87474aad24 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #VMPrimitiveCallAbstractTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMPrimitiveCallAbstractTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'baseMethodIP', 'baseFrame', 'baseMethod' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver arguments: arguments returnAddress: returnAddress [ machineSimulator receiverRegisterValue: receiver. @@ -32,19 +34,19 @@ VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver a ] -{ #category : #helpers } +{ #category : 'helpers' } VMPrimitiveCallAbstractTest >> findMethod: aSelector [ ^ self class lookupSelector: aSelector ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> jitOptions [ ^ super jitOptions @@ -52,13 +54,13 @@ VMPrimitiveCallAbstractTest >> jitOptions [ yourself ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodReturningNil [ ^ nil ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ "This method is used to test sends. @@ -66,7 +68,7 @@ VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ ^ self methodWithSend: $7 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ "This method is used to test sends. @@ -74,7 +76,7 @@ VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ ^ self methodWithSend: Object ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ "This method is used to test sends. @@ -82,7 +84,7 @@ VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ ^ self methodWithSend: nil ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ "This method is used to test the invocation of a primitive. @@ -92,7 +94,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ ^ 84 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ "This method is used to test the invocation of a primitive. @@ -102,7 +104,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ ^ 84 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ @@ -110,7 +112,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ "This method is used to test the invocation of a primitive. @@ -120,7 +122,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ "This method is used to test the invocation of a primitive. @@ -130,13 +132,13 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodToCompile1 [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend [ "This method is used to test sends. @@ -144,7 +146,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend [ ^ self send ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend: arg [ "This method is used to test sends. @@ -152,7 +154,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend: arg [ ^ arg send ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveCallAbstractTest >> setUp [ | primitiveAccessorDepthTable | @@ -177,7 +179,7 @@ VMPrimitiveCallAbstractTest >> setUp [ ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveCallAbstractTest >> setUpTrampolines [ super setUpTrampolines. diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st index 384475fb9b..084419c9cc 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPrimitiveCallingTest, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-InterpreterTests' + #name : 'VMPrimitiveCallingTest', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -26,7 +28,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLongStore [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -48,7 +50,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLong self assert: interpreter fetchByte equals: 16rF4 ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -70,7 +72,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: interpreter framePointer) equals: (memory integerObjectOf: -1) ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTempWithInternalActivation [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st index 6ecb274692..a0493b49f3 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMPrimitiveTest, - #superclass : #VMInterpreterTests, + #name : 'VMPrimitiveTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'imageName' ], @@ -9,10 +9,12 @@ Class { 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #asserting } +{ #category : 'asserting' } VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ | numSlotOop numSlotOopToCompare | @@ -26,7 +28,7 @@ VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMPrimitiveTest >> fillNewSpace [ "Allocate enough space to generate a full new space" @@ -38,7 +40,7 @@ VMPrimitiveTest >> fillNewSpace [ classIndex: memory arrayClassIndexPun) isNotNil ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -49,7 +51,7 @@ VMPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -76,7 +78,7 @@ VMPrimitiveTest >> setUp [ imageName := VMPrimitiveTest name ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> setUpForwardedObjects [ | class1 class2 object1 object2 array1 array2 | @@ -100,14 +102,14 @@ VMPrimitiveTest >> setUpForwardedObjects [ ^ object1. ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveTest >> tearDown [ imageName ifNotNil: [ imageName asFileReference ensureDeleteAll ]. super tearDown ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -120,7 +122,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -133,7 +135,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ | string | @@ -149,7 +151,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ interpreter push: (memory integerObjectOf: 1). @@ -164,7 +166,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -181,7 +183,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflow [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -194,7 +196,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflow [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ | maxSmallInt | @@ -212,7 +214,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -233,7 +235,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferen self assert: (memory isForwarded: object2) equals: true ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -254,7 +256,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ self assert: (memory fetchClassOf: object2) equals: class1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -275,7 +277,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSi self assert: (memory fetchClassOf: (memory followForwarded: object2)) equals: class1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -297,7 +299,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ self assert: (memory fetchInteger: 0 ofObject: object2) equals: 42. ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -323,7 +325,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferen self assert: (memory fetchInteger: 0 ofObject: (memory followForwarded: object2)) equals: 42 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -346,7 +348,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ self assert: (memory rawHashBitsOf: object2) equals: hash1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDifferentSize [ | class1 class2 object1 object2 hash1 hash2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -370,7 +372,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDiff self assert: (memory rawHashBitsOf: (memory followForwarded: object2)) equals: hash1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ | class immediate array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -389,7 +391,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -410,7 +412,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ self assert: interpreter primFailCode equals: PrimErrNoModification ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -430,7 +432,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ self assert: interpreter primFailCode equals: PrimErrObjectIsPinned ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNotCopyHash [ | class object1 object2 hash2BeforeBecome array1 array2 object2FromForwarder | class := self @@ -453,7 +455,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNot self assert: (memory hashBitsOf: object2) equals: hash2BeforeBecome ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -476,7 +478,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHa self deny: (memory hashBitsOf: object2) equals: hash2 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOriginalObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -496,7 +498,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOrigi self assert: (memory followForwarded: object1) equals: object2 ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacter [ interpreter push: (memory integerObjectOf: 65). @@ -506,7 +508,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacter [ self assert: interpreter stackTop equals: (memory characterObjectOf: 65). ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ | invalidNumber | @@ -525,7 +527,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ interpreter push: memory trueObject. @@ -536,7 +538,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -560,7 +562,7 @@ VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: interpreter stackTop. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -571,7 +573,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -586,7 +588,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -600,7 +602,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ | class objectInstance biggerClass objectForwarded array1 array2 | "Forwarding an object happens when becoming it with a bigger object" @@ -630,7 +632,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -642,7 +644,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ | class objectInstance | "I don't know how to force a bad argument count." @@ -665,7 +667,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -681,7 +683,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -696,7 +698,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ | class object slotIndex objectToPutInSlot | @@ -719,7 +721,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ self assert: interpreter primFailCode equals: 2. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -743,7 +745,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ self assert: interpreter primFailCode equals: PrimErrNoModification. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -759,7 +761,7 @@ VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -782,7 +784,7 @@ VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger >> memory numSmallIntegerTagBits)). @@ -793,7 +795,7 @@ VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -804,7 +806,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -815,7 +817,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ | string | @@ -832,7 +834,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ | string | @@ -846,7 +848,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -857,7 +859,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ "This insures the fact that no data is lost during the processing of usqInt by the primitive" @@ -873,7 +875,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ "111... 010110 -> -42 000... 010110 -> 21""" @@ -886,7 +888,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: 21). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -897,7 +899,7 @@ VMPrimitiveTest >> testPrimitiveBitOr1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -912,7 +914,7 @@ VMPrimitiveTest >> testPrimitiveBitOr2 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr3 [ interpreter push: (memory integerObjectOf: 16r0). @@ -927,7 +929,7 @@ VMPrimitiveTest >> testPrimitiveBitOr3 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr4 [ "This is to insure that primitiveBitOr executes a logical Or and not an XOr" @@ -943,7 +945,7 @@ VMPrimitiveTest >> testPrimitiveBitOr4 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ interpreter push: memory trueObject. @@ -957,7 +959,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -968,7 +970,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -979,7 +981,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ "This insure the fact that no data is lost during the processing of usqInt by the primitive" @@ -995,7 +997,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ interpreter push: (memory integerObjectOf: -73). @@ -1006,7 +1008,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> memory numSmallIntegerTagBits) - 1)). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShift1 [ interpreter push: (memory integerObjectOf: 2). @@ -1017,7 +1019,7 @@ VMPrimitiveTest >> testPrimitiveBitShift1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1030,7 +1032,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -1043,7 +1045,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ interpreter push: memory trueObject. @@ -1056,7 +1058,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftLeft [ interpreter push: (memory integerObjectOf: 16). @@ -1067,7 +1069,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftLeft [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftRight [ interpreter push: (memory integerObjectOf: 16). @@ -1078,7 +1080,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftRight [ self assert: interpreter stackTop equals: (memory integerObjectOf: 8). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ memory wordSize = 8 ifFalse: [ ^ self ]. "The 32 bits version of the primitive doesn't handle the negativ number case" @@ -1090,7 +1092,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ equals: (memory integerObjectOf: 16r1C00000000000000) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ "Insures no data is lost when bitshift overflows the integer type." @@ -1102,7 +1104,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ self assert: (interpreter stackTop) > (memory maxSmallInteger). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1113,7 +1115,7 @@ VMPrimitiveTest >> testPrimitiveBitXor1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor2 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1124,7 +1126,7 @@ VMPrimitiveTest >> testPrimitiveBitXor2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor3 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1135,7 +1137,7 @@ VMPrimitiveTest >> testPrimitiveBitXor3 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor4 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1146,7 +1148,7 @@ VMPrimitiveTest >> testPrimitiveBitXor4 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ interpreter push: memory trueObject. @@ -1160,7 +1162,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1171,7 +1173,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1182,7 +1184,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ "This guarantees the fact that no data is lost during the processing of usqInt by the primitive" "111... 111 @@ -1202,7 +1204,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> (memory numSmallIntegerTagBits + 1)))). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ interpreter push: (memory integerObjectOf: -42). @@ -1213,7 +1215,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 40). ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqualsZero [ interpreter push: self setUpForwardedObjects. @@ -1227,7 +1229,7 @@ VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqu ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZero [ interpreter push: self setUpForwardedObjects. @@ -1242,7 +1244,7 @@ VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZ ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ interpreter push: memory trueObject. @@ -1254,7 +1256,7 @@ VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDiv [ interpreter push: (memory integerObjectOf: 15). @@ -1267,7 +1269,7 @@ VMPrimitiveTest >> testPrimitiveDiv [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ interpreter push: (memory trueObject). @@ -1280,7 +1282,7 @@ VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1291,7 +1293,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1302,7 +1304,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ "In the primitive implementation of quo, it doesnt push the rest of the operation on the stack" @@ -1314,7 +1316,7 @@ VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1325,7 +1327,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1336,7 +1338,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 4). @@ -1347,7 +1349,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -1358,7 +1360,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1373,7 +1375,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivide [ interpreter push: (memory integerObjectOf: 4). @@ -1384,7 +1386,7 @@ VMPrimitiveTest >> testPrimitiveDivide [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 2). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ interpreter push: (memory trueObject). @@ -1396,7 +1398,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ "The interpreter fails because 42%4 != 0" @@ -1410,7 +1412,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1421,7 +1423,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1432,7 +1434,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1443,7 +1445,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1454,7 +1456,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 6). @@ -1465,7 +1467,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -42). @@ -1476,7 +1478,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -21). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self installFloatClass. @@ -1489,7 +1491,7 @@ VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1500,7 +1502,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 15). @@ -1511,7 +1513,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 15). @@ -1522,7 +1524,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1537,7 +1539,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory falseObject). @@ -1548,7 +1550,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -1559,7 +1561,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - Float64Array' } +{ #category : 'tests - primitiveAdd - Float64Array' } VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ | x y z result firstTerm size | @@ -1583,7 +1585,7 @@ VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 22.0. ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ interpreter push: (memory integerObjectOf: 1). @@ -1592,7 +1594,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1605,7 +1607,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1619,7 +1621,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1633,7 +1635,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1644,7 +1646,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1655,7 +1657,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1666,7 +1668,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1677,7 +1679,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -1688,7 +1690,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1699,7 +1701,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1714,7 +1716,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1725,7 +1727,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1736,7 +1738,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1747,7 +1749,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1758,7 +1760,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1769,7 +1771,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ interpreter push: (memory integerObjectOf: -1000). @@ -1780,7 +1782,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1791,7 +1793,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1806,7 +1808,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectWithArgCountLessThanOne [ |object1| "Tests the case where objectArg = 1 and: isOopFowarded: stackTop" @@ -1823,7 +1825,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectW self deny: interpreter failed. ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ |object1| "Tests the case where objectArg > 1 and: isOopFowarded: stackTop" @@ -1842,7 +1844,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ |object1| @@ -1858,7 +1860,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ interpreter push: memory trueObject. @@ -1870,7 +1872,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButDifferentType [ | object1 object2 | @@ -1889,7 +1891,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButD ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ | object | @@ -1905,7 +1907,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ | object | @@ -1919,7 +1921,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameValue [ | object1 object2 | @@ -1935,7 +1937,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameV ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ interpreter push: (memory trueObject). @@ -1948,7 +1950,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ interpreter push: (memory characterObjectOf: 66). @@ -1961,7 +1963,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ interpreter push: (memory integerObjectOf: 0). @@ -1974,7 +1976,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -1987,7 +1989,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -2002,7 +2004,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2017,7 +2019,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat . @@ -2033,7 +2035,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2049,7 +2051,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2065,7 +2067,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2090,7 +2092,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedBool [ interpreter push: (memory trueObject). @@ -2101,7 +2103,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedBool [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -2112,7 +2114,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ interpreter push: (memory integerObjectOf: 16). @@ -2123,7 +2125,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2134,7 +2136,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2145,7 +2147,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2156,7 +2158,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2167,7 +2169,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2178,7 +2180,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2193,7 +2195,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2204,7 +2206,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory trueObject). @@ -2215,7 +2217,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2226,7 +2228,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2237,7 +2239,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2248,7 +2250,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2259,7 +2261,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2270,7 +2272,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2281,7 +2283,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2292,7 +2294,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2307,7 +2309,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ | class array | @@ -2327,7 +2329,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ | class array | @@ -2345,7 +2347,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 0.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ | class array | @@ -2365,7 +2367,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ | class array | @@ -2385,7 +2387,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ | class array | @@ -2405,7 +2407,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ | class array | @@ -2425,7 +2427,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ | class array | @@ -2445,7 +2447,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ | class array | @@ -2467,7 +2469,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveMod [ interpreter push: (memory integerObjectOf: 16). @@ -2480,7 +2482,7 @@ VMPrimitiveTest >> testPrimitiveMod [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ interpreter push: (memory trueObject). @@ -2495,7 +2497,7 @@ VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2506,7 +2508,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 42). @@ -2518,7 +2520,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModNegativeValue [ interpreter push: (memory integerObjectOf: 16). @@ -2531,7 +2533,7 @@ VMPrimitiveTest >> testPrimitiveModNegativeValue [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ interpreter push: (memory integerObjectOf: memory maxCInteger >> memory numSmallIntegerTagBits). @@ -2544,7 +2546,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -2555,7 +2557,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2566,7 +2568,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ interpreter push: (memory trueObject). @@ -2579,7 +2581,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ interpreter push: (memory integerObjectOf: 16). @@ -2592,7 +2594,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2607,7 +2609,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -2618,7 +2620,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ interpreter push: (memory integerObjectOf: 16). @@ -2630,7 +2632,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ self assert: (interpreter stackValue: 2) equals: (memory integerObjectOf: 16). ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2642,7 +2644,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ | class | class := self newClassInOldSpaceWithSlots: 4 instSpec: memory nonIndexablePointerFormat. @@ -2653,7 +2655,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: interpreter stackTop) equals: 4 ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ | class | @@ -2667,7 +2669,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ | class | @@ -2681,7 +2683,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2692,7 +2694,7 @@ VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ self deny: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2704,7 +2706,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -2720,7 +2722,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2732,7 +2734,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2744,7 +2746,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2757,7 +2759,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2770,7 +2772,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2783,7 +2785,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ | newObj class | @@ -2800,7 +2802,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: newObj) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ | newObj class | @@ -2816,7 +2818,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: newObj) equals: 7 ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ | newObj class | @@ -2834,7 +2836,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ self assert: (memory getMemoryMap isOldObject: newObj) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ | class | @@ -2850,7 +2852,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ | class | @@ -2864,7 +2866,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ | class | @@ -2879,7 +2881,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ | class | @@ -2895,7 +2897,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ | class | @@ -2909,7 +2911,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ self assert: interpreter primFailCode equals: PrimErrBadArgument ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2920,7 +2922,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ | class | "class object with no slots, so no format" @@ -2932,7 +2934,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ | class | "class with nil used as format" @@ -2945,7 +2947,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2956,7 +2958,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2967,7 +2969,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 16). @@ -2978,7 +2980,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2989,7 +2991,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3004,7 +3006,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -3015,7 +3017,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -3026,7 +3028,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -3037,7 +3039,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ interpreter push: (memory integerObjectOf: 16). @@ -3048,7 +3050,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ interpreter push: (memory instantiateClass: (self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat)). @@ -3060,7 +3062,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ |object object2| @@ -3079,7 +3081,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ self assert: (memory isPinned: object2). ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ |object| @@ -3099,7 +3101,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ |object| @@ -3119,7 +3121,7 @@ VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuo [ interpreter push: (memory integerObjectOf: 15). @@ -3129,7 +3131,7 @@ VMPrimitiveTest >> testPrimitiveQuo [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ interpreter push: (memory trueObject). @@ -3142,7 +3144,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -3153,7 +3155,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -3164,7 +3166,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ "Tests that the rest of the integer division is not pushed into the stack, as this is not expected in a primitive behavior" interpreter push: (memory integerObjectOf: 16). @@ -3176,7 +3178,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ self assert: (interpreter stackValue: 1) equals: (memory integerObjectOf: 16). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ interpreter push: (memory integerObjectOf: 42). @@ -3187,7 +3189,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -3198,7 +3200,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -3209,7 +3211,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ interpreter push: (memory integerObjectOf: -13). @@ -3220,7 +3222,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 6). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -3231,7 +3233,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3246,7 +3248,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ interpreter push: (memory integerObjectOf: 1). @@ -3256,7 +3258,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ self assert: interpreter failed ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ | class object | @@ -3271,7 +3273,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ self assert: (memory isImmutable: object) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ | method | @@ -3286,7 +3288,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ | array1 | @@ -3299,7 +3301,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ | method | @@ -3314,7 +3316,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ | array1 array2 arrayForwarder arrayForwardee | @@ -3339,7 +3341,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderResolutionAndCallPrimitiveAgain [ | array1 array2 arrayForwarder arrayForwardee | @@ -3366,7 +3368,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderReso ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ | class objectInstance | "Forwarding an object happens when becoming it with a bigger object" @@ -3382,7 +3384,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3397,7 +3399,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3412,7 +3414,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3428,7 +3430,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3444,7 +3446,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3460,7 +3462,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3482,7 +3484,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3499,7 +3501,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ equals: (memory smallFloatObjectOf: 10.0) ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3516,7 +3518,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPre self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3533,7 +3535,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3547,7 +3549,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3561,7 +3563,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3579,7 +3581,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3596,7 +3598,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ equals: (memory smallFloatObjectOf: 1.0) ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3613,7 +3615,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeError self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3630,7 +3632,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErro self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3648,7 +3650,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStac self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 0.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3662,7 +3664,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3676,7 +3678,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperan self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3689,7 +3691,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3707,7 +3709,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3722,7 +3724,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3737,7 +3739,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3751,7 +3753,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3765,7 +3767,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3782,7 +3784,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3801,7 +3803,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3816,7 +3818,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3831,7 +3833,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3848,7 +3850,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3865,7 +3867,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithT self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3882,7 +3884,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWith self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3896,7 +3898,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirs self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3910,7 +3912,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSeco self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3930,7 +3932,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3945,7 +3947,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3960,7 +3962,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3977,7 +3979,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3994,7 +3996,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4008,7 +4010,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4022,7 +4024,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4041,7 +4043,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4056,7 +4058,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4071,7 +4073,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4086,7 +4088,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4103,7 +4105,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4120,7 +4122,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4134,7 +4136,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4148,7 +4150,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4167,7 +4169,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4182,7 +4184,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4199,7 +4201,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4215,7 +4217,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOpera ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4231,7 +4233,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOper ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4250,7 +4252,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesSta ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4272,7 +4274,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4288,7 +4290,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4305,7 +4307,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ equals: (memory smallFloatObjectOf: 100.0) ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4324,7 +4326,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErr ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4343,7 +4345,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeEr ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4357,7 +4359,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4371,7 +4373,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4389,7 +4391,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4404,7 +4406,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4419,7 +4421,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4436,7 +4438,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErr self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4453,7 +4455,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4467,7 +4469,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4481,7 +4483,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4500,7 +4502,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4515,7 +4517,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4530,7 +4532,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4547,7 +4549,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4561,7 +4563,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4575,7 +4577,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4594,7 +4596,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ | method frame contextOop contextIdentityHash suspendedContext | @@ -4627,7 +4629,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ equals: contextIdentityHash ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ | method | @@ -4649,7 +4651,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ interpreter imageReader validateImage: imageName ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ | method object objectHash | @@ -4676,7 +4678,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ equals: objectHash ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ | class array | @@ -4697,7 +4699,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ | class array | @@ -4718,7 +4720,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ | class array | @@ -4737,7 +4739,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ | class array | @@ -4756,7 +4758,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ | class array | @@ -4775,7 +4777,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ | class array | @@ -4794,7 +4796,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ | class array | @@ -4813,7 +4815,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4829,7 +4831,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4846,7 +4848,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4864,7 +4866,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonC self assert: string contentEquals: (self newString: 'po') ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4879,7 +4881,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4902,7 +4904,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4920,7 +4922,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonChar self assert: string contentEquals: (self newString: 'po') ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -4940,7 +4942,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4960,7 +4962,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4980,7 +4982,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5000,7 +5002,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ | byteSymbol asciiOrder | @@ -5019,7 +5021,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -5032,7 +5034,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -5045,7 +5047,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ | string | @@ -5060,7 +5062,7 @@ VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ interpreter push: (memory integerObjectOf: 2). @@ -5075,7 +5077,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -5092,7 +5094,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ interpreter push: (memory integerObjectOf: memory minSmallInteger). @@ -5103,7 +5105,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ | minSmallInt | @@ -5121,7 +5123,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ interpreter setImageVersion: 110. @@ -5136,7 +5138,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 110). ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ | slots | @@ -5162,7 +5164,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ memory okayOop: (memory fetchPointer: i ofObject: interpreter stackTop) ] ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterSetsImageVersion [ interpreter push: memory nilObject. diff --git a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st index 8ec7e8c742..895ba3b5f2 100644 --- a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMPushThisContextRoutineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMPushThisContextRoutineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> setUp [ | contextClass | @@ -27,7 +29,7 @@ VMPushThisContextRoutineTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | @@ -72,7 +74,7 @@ VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ equals: contextOop ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -105,7 +107,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: LargeContextSlots. ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -140,7 +142,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: SmallContextSlots ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments expectedStackPointer | @@ -177,7 +179,7 @@ VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ | isLargeContext isInBlock routine numberOfArguments | @@ -214,7 +216,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ self assert: (memory fetchPointer: Context allSlots size +2 ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: 3). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ | isLargeContext isInBlock routine numberOfArguments | @@ -248,7 +250,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ | isLargeContext isInBlock routine numberOfArguments | @@ -283,7 +285,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop expectedStackPointer | @@ -321,7 +323,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ | isLargeContext isInBlock routine numberOfArguments | @@ -356,7 +358,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ self assert: (memory fetchPointer: ReceiverIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ | isLargeContext isInBlock routine numberOfArguments | @@ -396,7 +398,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ self assert: (memory fetchPointer: Context allSlots size + numberOfArguments + 3 ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testSingleContextReturnsNewSpouseInNewSpace [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | diff --git a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st index 9edefda0ad..b5bfa609cb 100644 --- a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSegmentsImageFormatTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-ImageFormat' + #name : 'VMSegmentsImageFormatTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegment [ | header newSegmentSize | @@ -23,7 +25,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegme equals: (memory segmentManager segments at: 0) segSize ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage [ | header newSegmentSize | @@ -46,7 +48,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage equals: header firstSegSize + newSegmentSize ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBigger [ | newSegmentSize | @@ -59,7 +61,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBi self assert: newSegmentSize >= memory growHeadroom ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSmaller [ | newSegmentSize | @@ -74,7 +76,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSm self assert: newSegmentSize >= memory growHeadroom ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testMinimalImageHasASingleSegment [ diff --git a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st index 8a162f9399..9b55da5b97 100644 --- a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMSelectorIndexDereferenceRoutineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSelectorIndexDereferenceRoutineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ "32 bit platforms use a direct selector reference and not an index" @@ -18,7 +20,7 @@ VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ self assert: cogit ceDereferenceSelectorIndex isNil ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -29,7 +31,7 @@ VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ self assert: cogit ceDereferenceSelectorIndex notNil ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSpecialSelectorTable [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -58,7 +60,7 @@ VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSp self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> testPositiveSelectorIndexIsLookedUpInMethodLiterals [ "64 bit platforms use a selector index and a routine to map it to the real selector" diff --git a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st index 8e4b9726e7..34f53a536e 100644 --- a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSessionIdTest, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-InterpreterTests' + #name : 'VMSessionIdTest', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMSessionIdTest >> testGlobalSessionID [ "The globalSessionID is stored as a 64 bit number, but for compatibility with older plugins, is restricted to postive signed 32 bit values" | vm predicted diff | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st index 1a7faad9a6..c9037f3998 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimpleStackBasedCogitAbstractTest, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMSimpleStackBasedCogitAbstractTest', + #superclass : 'VMSpurMemoryManagerTest', #instVars : [ 'cogit', 'codeSize', @@ -31,10 +31,12 @@ Class { 'VMBytecodeConstants', 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ ^ { @@ -42,7 +44,7 @@ VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ } ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ ^ ParametrizedTestMatrix new @@ -51,7 +53,7 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ yourself ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ ^ ParametrizedTestMatrix new @@ -60,26 +62,26 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ yourself ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSizeParameters [ ^ self wordSize64Parameters + self wordSize32Parameters ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> ISA: anISA [ isa := anISA ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> abstractInstructions [ ^ (0 to: cogit getOpcodeIndex - 1) collect: [ :i | cogit abstractOpcodes at: i ] ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure [ | before after | @@ -91,7 +93,7 @@ VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure self assert: (self readMemoryAt: after) equals: anOop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlockClosure [ | before | @@ -103,17 +105,17 @@ VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlock equals: before ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> callerAddress [ ^ callerAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> cogit [ ^ cogit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ "Compiles some native code using the code inside the block closure as builder. This version assumes the block has a single 1-bytecode statement @@ -122,13 +124,13 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ ^ self compile: aBlockClosure bytecodes: 2 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes [ ^ self compile: aBlockClosure bytecodes: bytecodes headerSize: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes headerSize: headerSize [ "Compiles some native code using the code inside the block closure as builder. @@ -153,7 +155,7 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecod ^ allocatedAddress ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ "We will call to this address" @@ -165,7 +167,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ sendAddress := self compile: [ cogit genSpecialSelectorSend ]. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampolineName [ | startAddress | @@ -185,7 +187,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampol ^ startAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytecodes: bytecodes [ "Call a compilation block initializing the compiler before. @@ -203,7 +205,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytec ^ aBlockClosure value ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ "Create the root context with a valid method" @@ -239,7 +241,7 @@ VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ baseFrame := interpreter framePointer ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ self @@ -249,13 +251,13 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ temporaries: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments [ self createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for machine code. @@ -286,7 +288,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress rec builder buildFrame ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ self @@ -295,7 +297,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ arguments: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress receiver: receiver arguments: arguments [. "I create a frameless call @@ -322,7 +324,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress re ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for interpreter. @@ -363,7 +365,7 @@ VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: return cogit needsFrame: true. ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ | specialObjectsOop | @@ -380,19 +382,19 @@ VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ memory specialObjectsOop: specialObjectsOop. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassemble [ ^ self disassembleFrom: cogInitialAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex [ ^ self disassembleFrom: anIndex opcodes: opcodes ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ machineSimulator disassembler @@ -405,25 +407,25 @@ VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberO pc: 0 ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue [ ^ machineSimulator framePointerRegisterValue ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue: aValue [ machineSimulator framePointerRegisterValue: aValue ] -{ #category : #configuration } +{ #category : 'configuration' } VMSimpleStackBasedCogitAbstractTest >> generateCaptureCStackPointers [ ^ true ] -{ #category : #'helpers - cog methods' } +{ #category : 'helpers - cog methods' } VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector: anSelectorOop [ | targetCog allocatedAddress | @@ -442,18 +444,18 @@ VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> getLastAddress [ ^ machineSimulator getLastAddress: self abstractInstructions. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initialCodeSize [ ^ 4 * 1024 ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ "I will create the initial stack with a well-known caller address so we know if the code comes back @@ -465,7 +467,7 @@ VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ | page | @@ -478,31 +480,31 @@ VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ machineSimulator framePointerRegisterValue: page baseAddress. ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> instructionPointer [ ^ self readRegister: machineSimulator instructionPointerRegister ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> interpreterClass [ ^ CogVMSimulatorLSB ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> jitCompilerClass [ ^ SimpleStackBasedCogit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod [ ^ self jitMethod: aHostCompiledMethod selector: memory nilObject ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: aSelectorOop [ | methodOop | @@ -512,7 +514,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: ^ cogit cog: methodOop selector: aSelectorOop ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> jitOptions [ ^ Dictionary newFromPairs: { @@ -522,7 +524,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitOptions [ #ObjectMemory. self memoryClass name } ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ | builder | @@ -531,12 +533,12 @@ VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ ^ builder ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> machineSimulator [ ^ machineSimulator ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ^ self wordSize = 4 @@ -544,7 +546,7 @@ VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ifFalse: [ Spur64BitCoMemoryManager ] ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ | compiler | @@ -559,13 +561,13 @@ VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> openMachineDebugger [ self openMachineDebuggerAt: cogInitialAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ ^ VMMachineCodeDebugger new @@ -576,7 +578,7 @@ VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ openWithSpec. ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pop [ | stackAddressIntegerValue poppedByteArray | @@ -593,13 +595,13 @@ VMSimpleStackBasedCogitAbstractTest >> pop [ ^ poppedByteArray ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> popAddress [ ^ self pop integerAt: 1 size: self wordSize signed: false ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareCall [ machineSimulator hasLinkRegister @@ -612,13 +614,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareCall [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver arguments: arguments [ machineSimulator baseRegisterValue: cogit varBaseAddress. @@ -635,13 +637,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver ar self prepareCall ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> primitiveTraceLogSize [ ^ 256 * 8 "word size" ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ | stackAddressIntegerValue | @@ -662,7 +664,7 @@ VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ | aByteArray | @@ -671,7 +673,7 @@ VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ self push: aByteArray ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ | bytes | @@ -679,7 +681,7 @@ VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ ^ bytes integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ registerValue := ByteArray new: self wordSize. @@ -687,7 +689,7 @@ VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ " @@ -710,26 +712,26 @@ VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ ^ self readMemoryAt: machineSimulator framePointerRegisterValue - ((3 + anIndex) * self wordSize) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> receiverRegister: anInteger [ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> returnValue [ ^ self readRegister: machineSimulator receiverRegister ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress [ ^ self runFrom: startAddress until: endAddress timeout: 100000. "microseconds" ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress timeout: microseconds [ machineSimulator startAt: startAddress @@ -738,7 +740,7 @@ VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress t count: 0. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ "The different platforms generates code in a different way, so the number of opcodes can not be valid. Eg: ARM generates more instructions per opcode. It has to calculate the instructions to run differently" @@ -749,7 +751,7 @@ VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ count: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ machineSimulator startAt: cogInitialAddress @@ -759,7 +761,7 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ machineSimulator startAt: anAddress @@ -769,17 +771,17 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> sentSelector [ ^ sentSelector ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> sentSelector: anObject [ sentSelector := anObject ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUp [ super setUp. @@ -822,7 +824,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUp [ self initializeInitialStackFrame. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit allocateOpcodes: 80 bytecodes: 0 ifFail: [ self error: 'Could not allocate opcodes' ]. @@ -839,7 +841,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit methodZone manageFrom: cogit methodZoneBase to: memory getMemoryMap codeZoneEnd. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ "Create a send trampoline so we can stop..." @@ -866,7 +868,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ ^ (self stackAt: index) @@ -875,7 +877,7 @@ VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ signed: false ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ | stackAddressIntegerValue | @@ -885,37 +887,37 @@ VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ ^ machineSimulator memoryAt: stackAddressIntegerValue readNext: self wordSize. ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue: aValue [ machineSimulator stackPointerRegisterValue: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> temporaryRegisterValue [ ^ self machineSimulator temporaryRegisterValue ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> top [ ^ self stackAt: 0 ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> topAddress [ ^ self top integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st index da38e1895e..c43441d889 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitBytecodeTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitBytecodeTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -25,7 +27,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVa self runGeneratedCode. ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrameful onBlock: generationBlock [ | oldFP oldSP | @@ -45,7 +47,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrame self assert: oldSP equals: self stackPointerRegisterValue. ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister: anAddress withFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -58,7 +60,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister self assert: machineSimulator receiverRegisterValue equals: anAddress ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -69,50 +71,50 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isF self runUntilReturn. ] -{ #category : #'tests - extended store bytecode - store inst var' } +{ #category : 'tests - extended store bytecode - store inst var' } VMSimpleStackBasedCogitBytecodeTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable1 [ self testExtendedPushPushesInstanceVariable: 1 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable2 [ self testExtendedPushPushesInstanceVariable: 2 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable3 [ self testExtendedPushPushesInstanceVariable: 3 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable32 [ self testExtendedPushPushesInstanceVariable: 32 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable64 [ self testExtendedPushPushesInstanceVariable: 64 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable: instanceVariableToWrite [ self testExtendedPushPushesVariableType: 0 "Instance variable type" index: instanceVariableToWrite ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type index: instanceVariableToWrite [ "Type = 0 is instance variable" @@ -136,7 +138,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - jumps' } +{ #category : 'tests - jumps' } VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ | firstBytecode | @@ -176,67 +178,67 @@ VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ equals: memory trueObject ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempPopsValue [ self testPopIntoTempPopsValueAt: 3 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 3 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempPopsValue [ self testPopIntoTempPopsValueAt: 4 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 4 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempPopsValue [ self testPopIntoTempPopsValueAt: 5 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 5 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempPopsValue [ self testPopIntoTempPopsValueAt: 6 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 6 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempPopsValue [ self testPopIntoTempPopsValueAt: 7 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 7 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -244,7 +246,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -252,7 +254,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -260,19 +262,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempPopsValue [ self testPopIntoTempPopsValueAt: 1 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 1 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -280,55 +282,55 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresEigthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFifthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFirstInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFourthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSecondInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSeventhInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSixthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresThirdInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite. @@ -337,7 +339,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStores self assert: (memory fetchPointer: instanceVariableToWrite - 1 ofObject: obj) equals: memory falseObject ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -345,19 +347,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempPopsValue [ self testPopIntoTempPopsValueAt: 2 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 2 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -365,7 +367,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecod self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -373,7 +375,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableUnderTest [ | temporaries | @@ -400,7 +402,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableU self assert: self popAddress equals: memory trueObject ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVariableUnderTest [ | temporaries | @@ -425,7 +427,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVar self assert: (self readTemporaryValueAt: tempVariableUnderTest) equals: memory falseObject ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -433,157 +435,157 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 10 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 10 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 11 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 11 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 12 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 12 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 13 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 13 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 14 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 14 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 15 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 15 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush3rdTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 3 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 4 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 4 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 5 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 5 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 6 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 6 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 7 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 7 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 8 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 8 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 9 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 9 ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse [ self compile: [ cogit genPushConstantFalseBytecode ]. @@ -592,7 +594,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - two bytecodes' } +{ #category : 'tests - two bytecodes' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self compile: [ @@ -604,7 +606,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self assert: machineSimulator receiverRegisterValue equals: memory nilObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self compile: [ cogit genPushConstantNilBytecode ]. @@ -613,7 +615,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self assert: self popAddress equals: memory nilObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self compile: [ cogit genPushConstantTrueBytecode ]. @@ -622,7 +624,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self assert: self popAddress equals: memory trueObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallIntegerZero [ self compile: [ cogit genPushConstantZeroBytecode ]. @@ -631,19 +633,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallI self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 1 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 1 ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusOne [ cogit byte0: 116. @@ -654,7 +656,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusO self assert: self popAddress equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ cogit byte0: 118. @@ -665,7 +667,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ self assert: self popAddress equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ cogit byte0: 119. @@ -676,7 +678,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ self assert: self popAddress equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ cogit byte0: 117. @@ -687,7 +689,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver [ machineSimulator receiverRegisterValue: 75. @@ -698,103 +700,103 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver self assert: self popAddress equals: 75 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEighthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 8 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEleventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 11 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 15 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 5 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFirstVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 1 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 14 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 4 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesNinthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 9 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSecondVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 2 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSeventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 7 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 16 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 6 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 10 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirdVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 3 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 13 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTwelfthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 12 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -813,19 +815,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushe self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 2 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 2 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tempVariableUnderTest [ | arguments | @@ -848,7 +850,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tempVariableUnderTest [ | temporaries | @@ -873,13 +875,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushThirdTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 3 ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -918,7 +920,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFr equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -956,7 +958,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallF equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFrameCallsLargeMethodTrampoline [ | numberOfArguments methodObject method | @@ -993,7 +995,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFram equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFrameCallsSmallMethodTrampoline [ | numberOfArguments methodObject method | @@ -1030,13 +1032,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFram equals: numberOfArguments ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnRegister [ self @@ -1045,19 +1047,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnReg onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRegister [ self @@ -1066,13 +1068,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRe onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInReturnRegister [ self @@ -1083,7 +1085,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInRet cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ @@ -1091,7 +1093,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ @@ -1099,7 +1101,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ @@ -1107,7 +1109,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInReturnRegister [ self @@ -1118,7 +1120,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInRe cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ @@ -1126,7 +1128,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ self @@ -1134,7 +1136,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInReturnRegister [ self @@ -1144,7 +1146,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInR cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ self @@ -1152,7 +1154,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ self @@ -1160,7 +1162,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectInReturnRegister [ self @@ -1170,7 +1172,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectIn cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ self @@ -1178,7 +1180,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1192,7 +1194,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsP equals: memory trueObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1207,7 +1209,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjec equals: memory falseObject ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1244,7 +1246,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector literalIndex | @@ -1272,7 +1274,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesReceiverFromStackTopIntoReceiverRegister [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1296,7 +1298,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesRecei equals: memory falseObject ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1323,7 +1325,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector | @@ -1350,7 +1352,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesReturnValueFromReceiverRegisterAfterReturn [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1379,7 +1381,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesRetu self assert: self popAddress equals: (memory integerObjectOf: 42) ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1394,7 +1396,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjec equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1409,7 +1411,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalOb equals: memory trueObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1429,7 +1431,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1454,7 +1456,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #+. @@ -1469,7 +1471,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1488,7 +1490,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelector equals: selectorAtIndex ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #+. @@ -1507,7 +1509,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1528,7 +1530,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1554,7 +1556,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #at:put:. @@ -1570,7 +1572,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ | signed | @@ -1596,7 +1598,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelector equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #at:put:. @@ -1616,7 +1618,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1635,7 +1637,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMoves equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64Bits [ | signed | @@ -1659,7 +1661,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegated equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #atEnd. @@ -1673,7 +1675,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceive self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelectorIntoClassRegisterIn32Bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1691,7 +1693,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelecto equals: selectorAtIndex ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #atEnd. diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st index e471e136aa..c69374a214 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st @@ -1,19 +1,21 @@ Class { - #name : #VMSimpleStackBasedCogitCoggedMethods, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitCoggedMethods', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogMethodConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitCoggedMethods >> setUp [ super setUp. self setUpCogMethodEntry. ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndContinue [ | cogMethod otherBlock | @@ -28,7 +30,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: otherBlock ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndGoesToAbort [ | cogMethod otherBlock | @@ -43,7 +45,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: cogit ceMethodAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingNoCheckEntryDoesNotCheckClassTag [ | cogMethod otherBlock | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st index 021b93d5c5..e2345429d5 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMSimpleStackBasedCogitMegamorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitMegamorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMMethodCacheConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ | specialSelectorsArray | @@ -25,7 +27,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ cogit generateOpenPICPrototype. ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICReturnsPIC [ | selector createdPic specialObjectsArray | @@ -36,13 +38,13 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICRet self assert: (cogit methodZone openPICWithSelector: selector) equals: createdPic. ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupNonExistingMegamorphicPICReturnsNil [ self assert: (cogit methodZone openPICWithSelector: memory trueObject) equals: nil ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ "We have to call the pic and see if it reaches the abort trampoline" @@ -74,7 +76,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ self assert: machineSimulator sendNumberOfArgumentsRegisterValue equals: createdPic address ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectPicAbortTrampoline [ | createdPic selector | @@ -87,7 +89,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectP equals: (cogit picAbortTrampolineFor: 1) ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numArgs [ | selector createdPic | @@ -96,43 +98,43 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numAr self assert: createdPic cmNumArgs equals: numArgs ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith1 [ self testNewMegamorphicPICNumArgs: 1 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith16 [ self testNewMegamorphicPICNumArgs: 16 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith2 [ self testNewMegamorphicPICNumArgs: 2 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith4 [ self testNewMegamorphicPICNumArgs: 4 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith8 [ self testNewMegamorphicPICNumArgs: 8 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWithoutArgs [ self testNewMegamorphicPICNumArgs: 0 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ | createdPic selector | @@ -141,7 +143,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ self assert: createdPic selector equals: selector ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ | createdPic selector | @@ -150,7 +152,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ self assert: createdPic blockSize equals: cogit openPICSize. ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ | selector createdPic | @@ -160,7 +162,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testRelinkCallSiteToMegamorphicPICCallsNewPIC [ | selector literalIndex method createdPic returnAfterCallAddress patchedCogMethod startAddress | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st index 64f66063c8..e1ff4724cd 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitMonomorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitMonomorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ "Calculate the size of the Closed Pic" @@ -14,7 +16,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ self assert: cogit closedPICSize isNotNil ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineReplacesTheCallTargetWithTheCogMethodAddress [ "This is for the monomorphic case" @@ -64,7 +66,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineR self deny: executedTheTrampoline ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testObtainInlineCacheFromLinkedCall [ | sendingMethod targetCog selector executedTheTrampoline | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st index 1aba76164e..2d4f3a96ab 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimpleStackBasedCogitPolymorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitPolymorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'selector', 'numArgs', @@ -14,10 +14,12 @@ Class { #pools : [ 'CogMethodConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ ^ super testParameters * @@ -26,7 +28,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ yourself) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ | pic | "Only run this test if the test is configured for so much cases" @@ -37,7 +39,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ self assertPIC: pic hits: (cogMethods at: aCase) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ "Receiver is nil, class tag of the first entry is the receiver's class tag. - the receiver matches class tag for case 0 @@ -59,7 +61,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ "Receiver is nil, class tag of the first entry is 1 (a small integer). @@ -80,19 +82,19 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases [ ^ configuredPicCases ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases: aNumber [ configuredPicCases := aNumber ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ cogit @@ -102,7 +104,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ isMNUCase: false. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ | pic | @@ -117,7 +119,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ ^ pic ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ super setUp. @@ -158,7 +160,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ cogMethods at: index - 1 put: cogMethod ] "Maximum polymorphic cases" ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ | pic | @@ -167,7 +169,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ self assert: pic cPICNumCases equals: self configuredPicCases ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ | pic | pic := self makePolymorphicPIC. @@ -175,43 +177,43 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ self assert: (cogit backend callTargetFromReturnAddress: pic asInteger + cogit missOffset) equals: (cogit picAbortTrampolineFor: numArgs) ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase0 [ self assertHitAtCase: 0 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase1 [ self assertHitAtCase: 1 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase2 [ self assertHitAtCase: 2 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase3 [ self assertHitAtCase: 3 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase4 [ self assertHitAtCase: 4 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase5 [ "This is the last case. Cog PICs have 6 cases (0-based)" self assertHitAtCase: 5 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ | pic | pic := self makePolymorphicPIC. @@ -219,7 +221,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ self assert: pic cmType equals: CMPolymorphicIC. ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ | pic | @@ -229,7 +231,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ self assertPICMiss: pic ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ | pic | @@ -238,7 +240,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ self assert: pic cmNumArgs equals: numArgs ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEntryOffset [ | pic methodCheckEntryPoint methodNoCheckEntryPoint passedByCheckEntryPoint | @@ -269,7 +271,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEnt self deny: passedByCheckEntryPoint ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testSelectorInHeader [ | pic | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st index 7ab3e09968..00fe287064 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitRememberedSetTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitRememberedSetTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: value shouldCallTrampoline: shouldCallTrampoline [ | trampoline afterBytecode | @@ -28,14 +30,14 @@ VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: valu ] -{ #category : #initialization } +{ #category : 'initialization' } VMSimpleStackBasedCogitRememberedSetTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesNotCallTrampoline [ | newObject otherNewObject | @@ -48,7 +50,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesN shouldCallTrampoline: false ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesCallTrampoline [ | oldObject otherNewObject | @@ -62,7 +64,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesC shouldCallTrampoline: true ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesNotCallTrampoline [ | oldObject otherOldObject | @@ -76,7 +78,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesN shouldCallTrampoline: false ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInPermObjectDoesCallTrampoline [ | permObject otherPermObject | diff --git a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st index b3b1b69113..a3b6237cbb 100644 --- a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimulatedEnvironmentBuilder, - #superclass : #Object, + #name : 'VMSimulatedEnvironmentBuilder', + #superclass : 'Object', #instVars : [ 'interpreter', 'interpreterClass', @@ -18,17 +18,19 @@ Class { 'permSpaceSize', 'allocateMemory' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> build [ self doBuildSimulator. self doBuild ] -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> doBuild [ "100 k at least to put the class table in the old space. @@ -85,7 +87,7 @@ VMSimulatedEnvironmentBuilder >> doBuild [ ] -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> doBuildSimulator [ objectMemory := objectMemoryClass simulatorClass new. @@ -100,17 +102,17 @@ VMSimulatedEnvironmentBuilder >> doBuildSimulator [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> initialCodeSize: anInteger [ initialCodeSize := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> initializationOptions: aCollection [ initializationOptions := aCollection ] -{ #category : #initialization } +{ #category : 'initialization' } VMSimulatedEnvironmentBuilder >> initialize [ super initialize. @@ -118,58 +120,58 @@ VMSimulatedEnvironmentBuilder >> initialize [ permSpaceSize := 0. ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> interpreter [ ^ interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> interpreterClass: aClass [ interpreterClass := aClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> memoryInitialAddress [ ^ initialAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> methodCacheSize [ ^ methodCacheSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> newSpaceSize [ ^ newSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> objectMemory [ ^ objectMemory ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> objectMemoryClass: aClass [ objectMemoryClass := aClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> oldSpaceSize [ ^ oldSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> permSpaceSize: anInteger [ permSpaceSize := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> primitiveTraceLogSize: anInteger [ primitiveTraceLogSize := anInteger ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ "Unicorn simulator requires mapped memory to be multiple of 4096" @@ -181,7 +183,7 @@ VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ ^ anInteger + (pageSize - remainder) ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ^ 4096. @@ -189,12 +191,12 @@ VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> stackSpaceSize [ ^ stackSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> wordSize: anInteger [ wordSize := anInteger ] diff --git a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st index f1c4a88d03..007b9984d9 100644 --- a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimulationTest, - #superclass : #TestCase, - #category : #'VMMakerTests-Simulation' + #name : 'VMSimulationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests-Simulation', + #package : 'VMMakerTests', + #tag : 'Simulation' } -{ #category : #tests } +{ #category : 'tests' } VMSimulationTest >> testSetUpJITSimulationReadsImage [ | options c | @@ -27,7 +29,7 @@ VMSimulationTest >> testSetUpJITSimulationReadsImage [ extraMemory: 100000. ] -{ #category : #tests } +{ #category : 'tests' } VMSimulationTest >> testSetUpNonJITSimulationReadsImage [ | options c | diff --git a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st index 746c298210..f09dcfb865 100644 --- a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSistaSuperSendsTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSistaSuperSendsTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSistaSuperSendsTest >> jitOptions [ ^ super jitOptions @@ -12,7 +14,7 @@ VMSistaSuperSendsTest >> jitOptions [ yourself ] -{ #category : #'tests - sends/super' } +{ #category : 'tests - sends/super' } VMSistaSuperSendsTest >> testSuperSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector binding literalVariableIndex literalSelectorIndex startPC receiver expectedSelector | diff --git a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st index d5644e8ee9..bcaf2eb03b 100644 --- a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSistaTrampolineTest, - #superclass : #VMTrampolineTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSistaTrampolineTest', + #superclass : 'VMTrampolineTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSistaTrampolineTest >> jitOptions [ ^ super jitOptions @@ -12,7 +14,7 @@ VMSistaTrampolineTest >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMSistaTrampolineTest >> testSendTrampolineWithFourArguments [ | trampolineStart receiver | diff --git a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st index f4a16ac4a2..45d181195e 100644 --- a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpecialSendArithmethicTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSpecialSendArithmethicTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpecialSendArithmethicTest class >> testParameters [ ^ super testParameters * { @@ -13,7 +15,7 @@ VMSpecialSendArithmethicTest class >> testParameters [ } ] -{ #category : #running } +{ #category : 'running' } VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop [ self assert: machineSimulator instructionPointerRegisterValue equals: sendTrampolineAddress. @@ -21,7 +23,7 @@ VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop self assert: machineSimulator arg0RegisterValue equals: argOop. ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTrampoline [ self @@ -31,7 +33,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTram shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoline [ self @@ -42,7 +44,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -52,7 +54,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCa shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCallsTrampoline [ self @@ -62,7 +64,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCalls shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsTrampoline [ self @@ -73,7 +75,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsT shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -83,7 +85,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSmallInteger [ self @@ -94,7 +96,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSm shouldPerformOperationReturning: expectedResult ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -104,7 +106,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgument shouldCallTrampolineWith: (memory integerObjectOf: value1) and: (memory integerObjectOf: value2) ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstReturnsSmallInteger [ self @@ -114,7 +116,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstRet shouldPerformOperationReturning: expectedResult. ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTrampoline [ self @@ -124,7 +126,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTra shouldCallTrampolineWith: (memory integerObjectOf: value2) and: memory trueObject ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -134,7 +136,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampo shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampoline [ self @@ -145,7 +147,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampol shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -156,7 +158,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentRet ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturnsSmallInteger [ self @@ -166,7 +168,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturn ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -177,7 +179,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturns ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampoline [ @@ -188,7 +190,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampo shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampoline [ self @@ -198,7 +200,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampolin ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline [ @@ -209,7 +211,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -220,7 +222,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentRetu shouldPerformOperationReturning: expectedResult ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturnsSmallInteger [ self @@ -231,7 +233,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturns ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -241,7 +243,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsS shouldPerformOperationReturning: expectedReflexiveResult ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampoline [ self @@ -252,7 +254,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampol shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline [ self @@ -262,7 +264,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ self @@ -272,7 +274,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ self @@ -281,7 +283,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ self @@ -291,7 +293,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampoline [ self @@ -301,7 +303,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampo shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampoline [ self @@ -310,7 +312,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampolin shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline [ self @@ -320,7 +322,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ self @@ -331,7 +333,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ self @@ -341,7 +343,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampoline [ self @@ -352,7 +354,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampol shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline [ self @@ -362,7 +364,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusTrueSelfCallsTrampoline [ self diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st index 400872c055..494fea69d6 100644 --- a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMSpurEphemeronsAlgorithmTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurEphemeronsAlgorithmTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'ephemeronObjectOopOne', 'ephemeronObjectOopTwo', 'nonEphemeronObjectOopOne', 'nonEphemeronObjectOopTwo' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #helper } +{ #category : 'helper' } VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ memory storePointer: 0 @@ -22,7 +24,7 @@ VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ withValue: nonEphemeronObjectOopTwo ] -{ #category : #helper } +{ #category : 'helper' } VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ "Force ephemerons to not be collected by putting them in special variables" @@ -30,7 +32,7 @@ VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ self keepObjectInVMVariable2: ephemeronObjectOopTwo ] -{ #category : #helper } +{ #category : 'helper' } VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ "In pharo Ephemerons have 3 slots" @@ -39,7 +41,7 @@ VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : #running } +{ #category : 'running' } VMSpurEphemeronsAlgorithmTest >> setUp [ super setUp. @@ -47,7 +49,7 @@ VMSpurEphemeronsAlgorithmTest >> setUp [ self createEphemeronClass ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -70,7 +72,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -93,7 +95,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -117,7 +119,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -141,7 +143,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : #'tests - ephemerons with same key' } +{ #category : 'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ ephemeronObjectOopOne := self newEphemeronObject. @@ -159,14 +161,14 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect ephemerons" + "Collect non ephemeoron objetc" memory doScavenge: 1. self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : #'tests - ephemerons with same key' } +{ #category : 'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ ephemeronObjectOopOne := self newEphemeronObject. @@ -191,7 +193,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : #'tests - ephemerons with same key' } +{ #category : 'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ ephemeronObjectOopOne := self newEphemeronObject. @@ -209,14 +211,14 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect ephemerons" + "Collect non ephemeron object" memory fullGC. self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : #'tests - ephemerons with same key' } +{ #category : 'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -241,7 +243,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : #'tests - ephemerons with same key' } +{ #category : 'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -266,7 +268,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ ephemeronObjectOopOne := self newEphemeronObject. @@ -290,7 +292,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ ephemeronObjectOopOne := self newEphemeronObject. @@ -314,7 +316,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ ephemeronObjectOopOne := self newEphemeronObject. @@ -337,7 +339,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ self assert: memory dequeueMourner equals: ephemeronObjectOopTwo ] -{ #category : #'tests - finalization - algorithm' } +{ #category : 'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoungInverse [ ephemeronObjectOopOne := self newEphemeronObject. diff --git a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st index 1965e24efa..6dc630f31b 100644 --- a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMSpurInitializedOldSpaceTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurInitializedOldSpaceTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #testing } +{ #category : 'testing' } VMSpurInitializedOldSpaceTest class >> isAbstract [ ^ self == VMSpurInitializedOldSpaceTest ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> assertFreeListEmpty: aFreeListOop [ self assert: aFreeListOop equals: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createEphemeronClass [ ourEphemeronClass := self createEphemeronClassForSlots: 3 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ | theNewClass formatWithSlots hash | @@ -38,7 +40,7 @@ VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ ^ theNewClass ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ | address | @@ -47,24 +49,24 @@ VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ ^ address ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> denyFreeListEmpty: aFreeListOop [ self deny: aFreeListOop equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurInitializedOldSpaceTest >> forgetObject3 [ memory coInterpreter profileMethod: memory nilObject ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeListForSize: allocationSize [ ^ memory freeLists at: allocationSize / memory allocationUnit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ "Initially the old space has a single big chunk of free memory and no small free chunks. @@ -77,7 +79,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ ^ memory freeLists at: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ "The free tree lists stores the oop of free tree nodes. @@ -88,7 +90,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ ^ memory startOfObject: self freeTreeRootOop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ^ memory @@ -96,7 +98,7 @@ VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ | class | @@ -107,14 +109,14 @@ VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" ^ self newOldEphemeronObjectWithSlots: 3 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ | class | @@ -125,7 +127,7 @@ VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -144,7 +146,7 @@ VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ ^ oop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ^ memory @@ -152,7 +154,7 @@ VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ^ memory @@ -160,7 +162,7 @@ VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ^ memory @@ -168,7 +170,7 @@ VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #running } +{ #category : 'running' } VMSpurInitializedOldSpaceTest >> setUp [ super setUp. @@ -178,7 +180,7 @@ VMSpurInitializedOldSpaceTest >> setUp [ memory classByteArray: (self newClassInOldSpaceWithSlots: 0 instSpec: (memory byteFormatForNumBytes: 0)). ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> smallerNodeOf: aNode [ ^ memory diff --git a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st index 8019a6749c..a63471fcdc 100644 --- a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSpurMemoryManagerTest, - #superclass : #ParametrizedTestCase, + #name : 'VMSpurMemoryManagerTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'memory', 'interpreter', @@ -24,10 +24,12 @@ Class { 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> imageFormatParameters [ ^ { @@ -36,13 +38,13 @@ VMSpurMemoryManagerTest class >> imageFormatParameters [ } ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> testParameters [ ^ self wordSizeParameters * self imageFormatParameters ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -50,7 +52,7 @@ VMSpurMemoryManagerTest class >> wordSizeParameters [ yourself ] -{ #category : #configuring } +{ #category : 'configuring' } VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ environmentBuilder @@ -62,7 +64,7 @@ VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ primitiveTraceLogSize: self primitiveTraceLogSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createActiveProcess [ | processorOopAssociation processorOop processorListsArray priorities | @@ -84,7 +86,7 @@ VMSpurMemoryManagerTest >> createActiveProcess [ memory storePointer: ActiveProcessIndex ofObject: processorOop withValue: (self newArrayWithSlots: 4). ] -{ #category : #initialization } +{ #category : 'initialization' } VMSpurMemoryManagerTest >> createArrayClass [ | ourArrayClass | @@ -102,7 +104,7 @@ VMSpurMemoryManagerTest >> createArrayClass [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createEphemeronClass [ ourEphemeronClass := self newObjectWithSlots: 3. memory @@ -112,7 +114,7 @@ VMSpurMemoryManagerTest >> createEphemeronClass [ memory ensureBehaviorHash: ourEphemeronClass. ] -{ #category : #utils } +{ #category : 'utils' } VMSpurMemoryManagerTest >> createLargeIntegerClasses [ | classLargeInteger classLargeNegativeInteger | @@ -133,7 +135,7 @@ VMSpurMemoryManagerTest >> createLargeIntegerClasses [ withValue: classLargeNegativeInteger. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ | methodOop | @@ -143,7 +145,7 @@ VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ ^ methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> createWeakArrayClass [ ourWeakClass := self newObjectWithSlots: 3. memory @@ -154,43 +156,43 @@ VMSpurMemoryManagerTest >> createWeakArrayClass [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> emptyObjectSize [ "It is the header plus a word, padded to 8 bytes alignment" ^ self objectHeaderSize + "memory wordSize" 8 ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageReaderClass [ ^ imageReaderClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageReaderClass: anObject [ imageReaderClass := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageWriterClass [ ^ imageWriterClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageWriterClass: anObject [ imageWriterClass := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> initialCodeSize [ ^ 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializationOptions [ ^ { @@ -204,7 +206,7 @@ VMSpurMemoryManagerTest >> initializationOptions [ imageWriterClass name } ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ | ourArrayClass | @@ -226,7 +228,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ memory flushNewSpace. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ | freeListOop firstClassTablePage | @@ -290,7 +292,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ self deny: memory needGCFlag ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> initializeSpecialSelectors [ | specialSelectorsArrayOop | @@ -306,7 +308,7 @@ VMSpurMemoryManagerTest >> initializeSpecialSelectors [ memory splObj: SpecialSelectors put: specialSelectorsArrayOop ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMSpurMemoryManagerTest >> installFloat64RegisterClass [ | registerClass | @@ -325,7 +327,7 @@ VMSpurMemoryManagerTest >> installFloat64RegisterClass [ ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMSpurMemoryManagerTest >> installFloatClass [ | classFloat | @@ -341,52 +343,52 @@ VMSpurMemoryManagerTest >> installFloatClass [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" ] -{ #category : #accessor } +{ #category : 'accessor' } VMSpurMemoryManagerTest >> interpreter [ ^ interpreter ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> interpreterClass [ ^ StackInterpreterSimulatorLSB ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable1: anOop [ interpreter newMethod: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable2: anOop [ interpreter profileSemaphore: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable3: anOop [ interpreter profileMethod: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable1 [ ^ interpreter newMethod ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable2 [ ^ interpreter profileSemaphore ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable3 [ ^ interpreter profileMethod ] -{ #category : #accessor } +{ #category : 'accessor' } VMSpurMemoryManagerTest >> memory [ ^ memory ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> memoryClass [ ^ self wordSize = 4 @@ -394,13 +396,13 @@ VMSpurMemoryManagerTest >> memoryClass [ ifFalse: [ Spur64BitMemoryManager ] ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new16BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 2 format: memory firstShortFormat ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ | indexable | @@ -410,13 +412,13 @@ VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ ^ indexable ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new32BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 4 format: memory firstLongFormat ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ | indexable | @@ -426,31 +428,31 @@ VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ ^ indexable ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new64BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 8 format: memory sixtyFourBitIndexableFormat ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new8BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 1 format: memory firstByteFormat ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots [ ^ self newArrayWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: memory arrayFormat classIndex: anIndex ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSlot format: format [ | padding numberOfWordSizeSlots desiredByteSize | @@ -463,7 +465,7 @@ VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSl classIndex: self nextOrdinaryClassIndex ] -{ #category : #asd } +{ #category : 'asd' } VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ | oop | @@ -481,7 +483,7 @@ VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ ^ oop ] -{ #category : #'helpers - classes' } +{ #category : 'helpers - classes' } VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: format [ | newClass formatWithSlots | @@ -499,7 +501,7 @@ VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: ^ newClass ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -510,7 +512,7 @@ VMSpurMemoryManagerTest >> newEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arguments [ | method methodHeader | @@ -531,13 +533,13 @@ VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arg ^ method ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots [ ^ self newObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ | format | @@ -548,7 +550,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: format classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -560,7 +562,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: ^ oop ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -579,7 +581,7 @@ VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ ^ oop ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ ^ self @@ -587,13 +589,13 @@ VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots [ ^ self newOldSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -605,7 +607,7 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -617,13 +619,13 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat cla ^ oop ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentObjectWithSlots: slots [ ^ self newPermanentSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -637,7 +639,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: a classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -649,7 +651,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aForm ^ oop ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -695,7 +697,7 @@ VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newString: aString [ | vmString | @@ -714,7 +716,7 @@ VMSpurMemoryManagerTest >> newString: aString [ ^ vmString ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ ^ self @@ -723,7 +725,7 @@ VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ classIndex: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newZeroSizedObject [ ^ memory @@ -732,7 +734,7 @@ VMSpurMemoryManagerTest >> newZeroSizedObject [ classIndex: self zeroSizedObjectClassIndex. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ^ nextIndex @@ -740,18 +742,18 @@ VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ifNotNil: [ nextIndex := nextIndex + 1 ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> objectHeaderSize [ ^ memory baseHeaderSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> primitiveTraceLogSize [ ^ 0 ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ | aClass | aClass := self @@ -764,7 +766,7 @@ VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ withValue: aClass ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ | aClass | aClass := self @@ -777,7 +779,7 @@ VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ | class | @@ -801,7 +803,7 @@ VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUp [ super setUp. @@ -828,7 +830,7 @@ VMSpurMemoryManagerTest >> setUp [ memory lastHash: 1. ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUpScheduler [ "The ScheduleAssocation should be initialized to a valid Processor object" @@ -856,7 +858,7 @@ VMSpurMemoryManagerTest >> setUpScheduler [ memory memoryActiveProcess: activeProcessOop. ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUpUsingImage [ "/!\ Only runnable with a wordsize equals to your image's (needs disabling parametizing of wordsize) /!\" @@ -889,25 +891,25 @@ VMSpurMemoryManagerTest >> setUpUsingImage [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> sizeOfObjectWithSlots: slots [ ^ self objectHeaderSize + ((slots min: 1 "at least one for the forwarder pointer") * memory wordSize "bytes") ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> wordSize [ ^ wordSize ifNil: [ 8 ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> wordSize: aWordSize [ wordSize := aWordSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> zeroSizedObjectClassIndex [ ^ zeroSizedObjectClassIndex ifNil: [ self nextOrdinaryClassIndex ] diff --git a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st index db41fee015..2617ab3f77 100644 --- a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurNewSpaceStructureTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurNewSpaceStructureTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> fillEden [ "Allocate enough objects to fill the eden." @@ -13,7 +15,7 @@ VMSpurNewSpaceStructureTest >> fillEden [ do: [ :index | self newZeroSizedObject ] ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject [ | freeStartBefore | @@ -24,7 +26,7 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAfterObject [ | freeStartBefore | @@ -35,38 +37,38 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAft self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenEndIsAtTheStartOfOldSpace [ self assert: memory scavenger eden limit equals: memory getMemoryMap newSpaceEnd ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenIsRestOfNewSpace [ self assert: memory scavenger eden size > (environmentBuilder newSpaceSize - memory scavenger pastSpace size - memory scavenger futureSpace size - interpreter interpreterAllocationReserveBytes) ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFreeStartIsEdenStart [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceEndIsAtTheStartOfEden [ self assert: memory scavenger futureSpace limit equals: memory scavenger eden start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger futureSpace size equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceStart [ "The future survivor start indicates during the execution of the scavenger, where the next free space in future space starts." @@ -74,13 +76,13 @@ VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceSt self assert: memory scavenger futureSurvivorStart equals: memory scavenger futureSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceEndIsAtTheStartOfFutureSpace [ self assert: memory scavenger pastSpace limit equals: memory scavenger futureSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart [ " - pastSpaceStart points to where the free space in the past space starts => it **does** move @@ -89,19 +91,19 @@ VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsAtTheStartOfNewSpace [ self assert: memory scavenger pastSpace start equals: memory getMemoryMap newSpaceStart ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger pastSpaceBytes equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ "Allocate enough objects to fill the eden." @@ -115,7 +117,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ self assert: error messageText equals: 'no room in eden for allocateNewSpaceSlots:format:classIndex:' ] ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ | futureSpaceStartBefore | @@ -125,7 +127,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ self assert: memory scavenger futureSurvivorStart equals: futureSpaceStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ | pastSpaceStartBefore | @@ -135,7 +137,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ self assert: memory pastSpaceStart equals: pastSpaceStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -146,7 +148,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ self assert: oop equals: freeStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -157,7 +159,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeade self assert: oop equals: freeStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testScavengeThresholdIsInsideTheEden [ self assert:(memory scavengeThreshold diff --git a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st index 9eb2876f3f..04a758a911 100644 --- a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurObjectAllocationTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurObjectAllocationTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ | oldFreeStart | @@ -14,7 +16,7 @@ VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ self assert: memory freeStart > oldFreeStart ] -{ #category : #tests } +{ #category : 'tests' } VMSpurObjectAllocationTest >> testAllocateObjectInOldSpaceMovesFreeStart [ | oldFreeStart | diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st index 2e6576bb9a..b86ff4e514 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurOldSpaceBootstrapTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceBootstrapTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ | tableRoot | @@ -29,7 +31,7 @@ VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ equals: memory classTableRootSlots + memory hiddenRootSlots ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ | freeListOop | @@ -38,7 +40,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ self assert: (memory numSlotsOf: freeListOop) equals: memory numFreeLists ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ | freeListOop | @@ -47,7 +49,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ self assert: (memory formatOf: freeListOop) equals: memory wordIndexableFormat ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ | freeListOop | @@ -57,14 +59,14 @@ VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ self assert: (memory fetchPointer: i ofObject: freeListOop) equals: 0 ] ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid [ memory initializeFreeList. memory validFreeTree ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid2 [ memory initializeFreeList. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index 0830123f51..a0dfca3596 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -1,18 +1,20 @@ Class { - #name : #VMSpurOldSpaceGarbageCollectorTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurOldSpaceGarbageCollectorTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'objectStackLimit' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #assertion } +{ #category : 'assertion' } VMSpurOldSpaceGarbageCollectorTest >> assertHashOf: anOop equals: aHash [ self assert: (memory hashBitsOf: anOop) equals: aHash ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ | initialSpace lastObjectToBeRemembered sizeOfLastObject | "The planning compactor frees object by sliding, and therefore does not reclaim memory if there is only dead objects in the oldspace." @@ -33,34 +35,34 @@ VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ ^ initialSpace - sizeOfLastObject - memory totalFreeListBytes ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> initializationOptions [ ^ super initializationOptions , { #ObjStackPageSlots . objectStackLimit } ] -{ #category : #testing } +{ #category : 'testing' } VMSpurOldSpaceGarbageCollectorTest >> isValidFirstBridge [ ^ memory segmentManager isValidSegmentBridge: (memory segmentManager bridgeAt: 0) ] -{ #category : #running } +{ #category : 'running' } VMSpurOldSpaceGarbageCollectorTest >> runCaseManaged [ ^ self runCase ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> setUp [ objectStackLimit := 10. super setUp. ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpace [ | anObjectOop slotsNumber | @@ -71,7 +73,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: anObjectOop isNil ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpaceShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -82,7 +84,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: memory needGCFlag ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFreeChunk [ | chuckSize chunk next object free | @@ -117,7 +119,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFr self assert: (memory isFreeObject: free). ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ | anObjectOop slotsNumber | @@ -128,7 +130,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ self assert: anObjectOop isNotNil ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldBeZero [ | anObjectOop slotsNumber | @@ -139,7 +141,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldB self assert: memory totalFreeOldSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -150,7 +152,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldP self assert: memory needGCFlag ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollected [ | deltaFreeSpace | @@ -160,7 +162,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollec self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShouldBeCollected [ | deltaFreeSpace | @@ -173,7 +175,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShou self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPermObjectShouldBeKept [ | oldObjectSize deltaFreeSpace | @@ -186,7 +188,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPer self assert: deltaFreeSpace equals: oldObjectSize ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedCycleObjectShouldBeCollected [ | deltaFreeSpace | @@ -200,7 +202,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedC self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeKept [ | oldOop objectSize deltaFreeSpace | @@ -214,7 +216,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assert: deltaFreeSpace equals: objectSize ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeMoved [ | anObjectOop hash | @@ -233,7 +235,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assertHashOf: self keptObjectInVMVariable1 equals: hash ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantained [ | deltaFreeSpace arrayOfPerms objectsSize aPermObject anOldObject originalRememberedSetSize afteRememberedSetSize numberOfObjects originalNewRememberedSetSize afteNewRememberedSetSize | @@ -260,7 +262,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: deltaFreeSpace equals: objectsSize + (afteRememberedSetSize - originalRememberedSetSize) + (afteNewRememberedSetSize - originalNewRememberedSetSize) ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantainedWhenObjectsMoved [ | numberOfObjects originalHashes permArray anOldObject | @@ -283,7 +285,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: (originalHashes at: i) equals: (memory hashBitsOf: (memory fetchPointer: i - 1 ofObject: permArray))] ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ | ephemeron | @@ -305,7 +307,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ | ephemeron | @@ -335,7 +337,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ memory fullGC. @@ -346,7 +348,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ self deny: (memory isFreeObject: (memory freeListsObj)). ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ | obj1 obj2 obj3 arrFrom arrTo arrFrom2 arrTo2 | @@ -378,7 +380,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ self assert: (memory isRemembered: arrTo2). ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ | roots ephemeron1 ephemeron2 ephemeron3 key1 key2 key3 | @@ -441,7 +443,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -479,7 +481,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQue equals: numberJustOverLimit ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail [ | ephemeron1 key | @@ -497,7 +499,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ | freespace freespace2 slotsNumber anObjectOop | @@ -518,7 +520,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ self assert: freespace equals: memory totalFreeOldSpace. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ | roots keyObj ephemeronObj | @@ -537,7 +539,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ self assert: memory dequeueMourner equals: nil. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ | roots keyObj ephemeronObj keyObj2 ephemeronObj2 | @@ -564,7 +566,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ self assert: memory dequeueMourner equals: nil. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -602,7 +604,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ equals: numberJustOverLimit ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronAsKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -617,7 +619,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronA memory fullGC ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -631,7 +633,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemer memory fullGC ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -648,7 +650,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEph memory fullGC ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testPageLimitMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st index 33212d0b85..11d8661998 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMSpurOldSpaceStructureTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceStructureTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceShouldHaveOneSegment [ self assert: memory segmentManager numSegments equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSameSizeAsOldSpace [ self @@ -18,7 +20,7 @@ VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSam equals: memory oldSpaceSize ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSizeShouldBeAskedMemory [ self assert: memory oldSpaceSize equals: oldSpaceSize diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st index b923eade30..131ffcdd73 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurOldSpaceTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ memory allocateOldSpaceChunkOfBytes: memory totalFreeListBytes. @@ -12,7 +14,7 @@ VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ self assert: memory totalFreeListBytes equals: 0 ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self createFreeChunkOfSize: 120. @@ -24,7 +26,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: 24) ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists [ self createFreeChunkOfSize: 120. @@ -36,7 +38,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists self assertFreeListEmpty: (self freeListForSize: 120) ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ | smallerAddress newAddress | @@ -49,7 +51,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ self assert: newAddress equals: smallerAddress ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self createFreeChunkOfSize: 120. @@ -61,7 +63,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self denyFreeListEmpty: (self freeListForSize: 160) ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ | someBytes freeBytesBefore | @@ -72,7 +74,7 @@ VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ self assert: memory totalFreeListBytes equals: freeBytesBefore - someBytes ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ | secondAddress newAddress | @@ -83,7 +85,7 @@ VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ self deny: newAddress equals: secondAddress ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self createFreeChunkOfSize: 160. @@ -95,7 +97,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self denyFreeListEmpty: (self freeListForSize: 200) ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ | secondAddress | @@ -106,7 +108,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ self assert: (self freeListForSize: 160) equals: 0 ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ | secondAddress newAddress | @@ -116,7 +118,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ self assert: newAddress equals: secondAddress ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ memory allocateOldSpaceChunkOfBytes: (memory bytesInObject: self freeTreeRootOop). @@ -124,7 +126,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ self assert: self freeTreeRootOop equals: 0 ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -135,7 +137,7 @@ VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ | size childAddress smallerChildOop largerChildOop aBitBiggerThanHalf | @@ -154,7 +156,7 @@ VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ self assert: (memory bytesInObject: largerChildOop) equals: aBitBiggerThanHalf ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ | freeRootOopBeforeAllocation | @@ -165,7 +167,7 @@ VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ self deny: freeRootOopBeforeAllocation equals: self freeTreeRootOop ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ "Allocation should be contiguous because we have a single big chunk of memory to take memory from" @@ -176,7 +178,7 @@ VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ | address | @@ -185,7 +187,7 @@ VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ self assert: address isNil ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRoot [ | leftOverSize | @@ -195,7 +197,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRo self assert: (memory bytesInObject: self freeTreeRootOop) equals: leftOverSize ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList [ | leftOverSize | @@ -205,7 +207,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -218,7 +220,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ | sizeToAllocate powerOfSizeToAllocate leftOverSize | @@ -231,7 +233,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ | sizeToAllocate powerOfSizeToAllocate nonMultipleAddress newAddress | @@ -253,7 +255,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ self deny: newAddress equals: nonMultipleAddress. ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ | sizeToAllocate powerOfSizeToAllocate | @@ -265,7 +267,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ self assertFreeListEmpty: (self freeListForSize: powerOfSizeToAllocate) ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ | sizeToAllocate freeMultipleAddress newAddress powerOfSizeToAllocate | @@ -277,7 +279,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ self assert: newAddress equals: freeMultipleAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ | secondAddress newAddress | @@ -288,7 +290,7 @@ VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ self assert: newAddress equals: secondAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ | secondAddress thirdAddress | @@ -299,7 +301,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ self assert: secondAddress < thirdAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ | freeChunkStartAddress allocatedSize | @@ -311,7 +313,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ equals: freeChunkStartAddress + allocatedSize ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted [ | freeChunkStartAddressBeforeAllocation allocatedAddress | @@ -322,7 +324,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted equals: freeChunkStartAddressBeforeAllocation ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ | firstAddress byteSize smallerNodeOop | @@ -335,7 +337,7 @@ VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ self assert: smallerNodeOop equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian [ | newAddress freeLargeSpaceAddressBeforeAllocation freeAddress | @@ -349,7 +351,7 @@ VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian self assert: newAddress equals: freeLargeSpaceAddressBeforeAllocation ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ | smallerChild freeTreeRoot parentNode | @@ -362,7 +364,7 @@ VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ self assert: parentNode equals: freeTreeRoot ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ | freeTreeRoot size child1 child2 nextChildOop child3 siblingOop previousOop | @@ -389,7 +391,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ self assert: previousOop equals: nextChildOop. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ | freeTreeRoot size child1 child2 nextChildOop child3 largerOop largerThanSmaller siblingOop | @@ -421,7 +423,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ self assert: largerOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ | freeTreeRoot size child1 child2 nextChild child3 parentOop | @@ -448,7 +450,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ self assert: parentOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ | freeTreeRoot size child1 child2 nextChildOop child3 smallerOop smallerThanSmaller siblingOop | @@ -480,7 +482,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ self assert: smallerOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ | freeRoot address | @@ -492,7 +494,7 @@ VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ self assert: freeRoot equals: (memory freeLists at: 0) ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead [ | smallerChild freeTreeRoot size child1 child2 nextChild child3 | @@ -514,7 +516,7 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead self assert: nextChild equals: child2. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ | smallerChild freeTreeRoot size child1 child2 nextChild | @@ -532,13 +534,13 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ self assert: nextChild equals: child2. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testFalseObjectIsNotAnArray [ self deny: (memory isArray: memory falseObject). ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ | firstAddress secondAddress freeListHead chunkSize | chunkSize := 32. @@ -552,7 +554,7 @@ VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ self assert: freeListHead equals: secondAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ | secondAddress | @@ -562,7 +564,7 @@ VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ self assert: memory allFreeObjects size equals: 2 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize | allocationSize := 32. @@ -578,7 +580,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ self assert: nextFreeChunk equals: firstAddress ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize previousFreeChunk | allocationSize := 32. @@ -595,7 +597,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ self assert: previousFreeChunk equals: freeListHead ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChunks [ | secondAddress newAddress | @@ -607,7 +609,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChu self assert: memory allFreeObjects size equals: 3 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ | secondAddress allocationSize firstAddress | allocationSize := 32. @@ -620,7 +622,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ self assert: memory allFreeListHeads size equals: 1 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ | firstAddress freeListHead | @@ -636,7 +638,7 @@ VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ ] ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ 2 to: memory numFreeLists - 1 do: [ :numberOfSlots | @@ -646,7 +648,7 @@ VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ ] ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ | bigChunk nextNode | @@ -656,7 +658,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ | bigChunk nextNode | @@ -666,7 +668,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ | bigChunk nextNode | @@ -676,7 +678,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ | bigChunk nextNode | @@ -686,7 +688,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ | bigChunk nextNode | @@ -696,13 +698,13 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootIsFreeObject [ self assert: (memory isFreeObject: self freeTreeRootOop) ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ self @@ -710,7 +712,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ equals: memory totalFreeListBytes ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ | firstAddress byteSize smallerNodeOop | @@ -723,7 +725,7 @@ VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ self assert: (memory startOfObject: smallerNodeOop) equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop | @@ -744,7 +746,7 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ self assert: (memory startOfObject: largerChildOop) equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop parentNodeOop | @@ -766,13 +768,13 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ self assert: parentNodeOop equals: newRoot ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testNewMemoryShouldHaveSingleFreeObject [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ | oop | @@ -781,19 +783,19 @@ VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ self assert: (memory getMemoryMap isOldObject: oop) ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectIsNotAnArray [ self deny: (memory isArray: memory nilObject). ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectObjectFormatIsZero [ self assert: (memory formatOf: memory nilObject) equals: 0. ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFreeList [ | secondAddress freeChunksBefore | @@ -806,7 +808,7 @@ VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFr self assert: memory allFreeObjects size equals: freeChunksBefore. ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ | secondAddress | @@ -817,7 +819,7 @@ VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -829,7 +831,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ self assert: (self nextNodeOf: freeListHead) equals: 0 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -841,7 +843,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ self assert: (self previousNodeOf: freeListHead) equals: 0 ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ | smallerChild freeTreeRoot parentNode smallerSize rootSize | @@ -858,7 +860,7 @@ VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ self assert: parentNode equals: freeTreeRoot ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testTrueObjectIsNotAnArray [ self deny: (memory isArray: memory trueObject). diff --git a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st index 674b31f591..dd5b734300 100644 --- a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurRememberedSetTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurRememberedSetTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests - from old to new' } +{ #category : 'tests - from old to new' } VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ | oldObjectAddress rememberedObjectAddress | @@ -22,7 +24,7 @@ VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ ] -{ #category : #'tests - from old to perm' } +{ #category : 'tests - from old to perm' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNewRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -40,7 +42,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNew ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress referencedOldObjectAddress | @@ -63,7 +65,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberP ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOldRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -82,7 +84,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOld ] -{ #category : #'tests - from perm to new' } +{ #category : 'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRememberedToo [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -99,7 +101,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRemembered ] -{ #category : #'tests - from perm to new' } +{ #category : 'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRememberedSet [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -117,7 +119,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRem ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ | oldObjectAddress | @@ -126,7 +128,7 @@ VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ | oldObjectRootAddress originalLimit youngObjectAddress | @@ -156,7 +158,7 @@ VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ self assert: memory getFromOldSpaceRememberedSet rememberedSetLimit equals: originalLimit * 2 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone [ | oldObjectAddress storedOldObjectAddress | @@ -170,7 +172,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: storedOldObjectAddress). ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress | @@ -186,7 +188,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObjec self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyone [ | oldObjectAddress youngObjectAddress | @@ -200,7 +202,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyon self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #'tests - from old to perm' } +{ #category : 'tests - from old to perm' } VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone [ | permObjectAddress oldObjectAddress | @@ -214,7 +216,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #'tests - from perm to perm' } +{ #category : 'tests - from perm to perm' } VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyone [ | permObjectAddress referencedPermObjectAddress | @@ -228,7 +230,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyon self deny: (memory isRemembered: referencedPermObjectAddress). ] -{ #category : #'tests - from new to perm' } +{ #category : 'tests - from new to perm' } VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyone [ | permObjectAddress youngObjectAddress | @@ -242,7 +244,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyo self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress youngObjectAddress | @@ -267,7 +269,7 @@ VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberP ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObject [ | oldObjectAddress youngObjectAddress | @@ -281,7 +283,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObjec self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObject [ | permObjectAddress youngObjectAddress | @@ -295,7 +297,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObj self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAnyone [ | youngObjectAddress storedYoungObjectAddress | @@ -309,7 +311,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAny self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testYoungObjectIsNotRemembered [ | newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st index 665359f03f..634ab1b369 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurScavengeEphemeronTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengeEphemeronTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #initialization } +{ #category : 'initialization' } VMSpurScavengeEphemeronTest >> setUp [ super setUp. @@ -12,7 +14,7 @@ VMSpurScavengeEphemeronTest >> setUp [ self createEphemeronClass ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmptyMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -32,7 +34,7 @@ VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmpty self assert: memory dequeueMourner equals: nil ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ | numberOfEphemerons ephemeronKey | @@ -68,7 +70,7 @@ VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ withValue: memory nilObject ] ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeronClass [ | ephemeronObjectOop | @@ -79,7 +81,7 @@ VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeron equals: ourEphemeronClass ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -102,7 +104,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalO equals: memory nonIndexablePointerFormat ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -123,7 +125,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -150,7 +152,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -179,7 +181,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSu equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -200,7 +202,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAft equals: memory nonIndexablePointerFormat ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -219,7 +221,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -241,7 +243,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -265,7 +267,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorSho equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInEden [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -296,7 +298,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInPastSpace [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -338,7 +340,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlyOneEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -370,7 +372,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: nil ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlySecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -400,7 +402,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldBeQueuedAfterConsumingMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -438,7 +440,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldLeaveFirstOneAsEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -468,7 +470,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: (memory isEphemeron: ephemeronObjectOop) ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldScavengeKeyOfSecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -500,7 +502,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi equals: (memory remapObj: nonEphemeronObjectOop) ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeZeroSizedEphemeronShouldTreatItAsNormalObject [ | ephemeronObjectOop zeroSizedEphemeronClass hashBefore addressBefore | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st index ae428a6af8..56c08746b3 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurScavengeWeakTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengeWeakTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'test-format' } +{ #category : 'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ | weakObjectOop | @@ -14,7 +16,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ self assert: (memory fetchClassOfNonImm: weakObjectOop) equals: ourWeakClass ] -{ #category : #'test-format' } +{ #category : 'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ | weakObjectOop classIndex | @@ -26,7 +28,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ self assert: classIndex equals: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash nilHash | @@ -50,7 +52,7 @@ VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldB equals: nilHash ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nilHash | @@ -70,7 +72,7 @@ VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNi equals: nilHash ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingSurvivorShouldLeaveWeakObjectAsIs [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st index 94f56ee281..08ac1152d9 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st @@ -1,17 +1,19 @@ Class { - #name : #VMSpurScavengerTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengerTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #asserting } +{ #category : 'asserting' } VMSpurScavengerTest >> assertPastSpaceIsEmpty [ self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurScavengerTest >> fullNewSpace [ | rootObjectAddress referencedObjectAddress freeStartAtBeginning | @@ -37,7 +39,7 @@ VMSpurScavengerTest >> fullNewSpace [ self error: 'New space is not full!' ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop receiver: aReceiverOop args: argsOops andStack: stackOops [ | page pointer | @@ -85,7 +87,7 @@ VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop withValue: (memory coInterpreter withSmallIntegerTags: page baseFP) ] ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScavenge [ | times | @@ -97,7 +99,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScaveng self deny: memory needGCFlag ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ | times anObjectOop | @@ -108,7 +110,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ self assert: (memory getMemoryMap isYoungObject: anObjectOop) ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ | times anObject | @@ -126,7 +128,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ self assert: (memory getMemoryMap isOldObject: anObject) ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge [ | times | @@ -144,7 +146,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge self assert: memory needGCFlag ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -165,7 +167,7 @@ VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ | rootObjectAddress | @@ -181,7 +183,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0 "Past space keep not full -> Not tenure next pass" ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ | rootObjectAddress | @@ -196,7 +198,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0.1 "Past space is full -> Tenure next pass" ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -219,7 +221,7 @@ VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -238,7 +240,7 @@ VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -257,7 +259,7 @@ VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -276,7 +278,7 @@ VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -295,7 +297,7 @@ VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -314,7 +316,7 @@ VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -336,7 +338,7 @@ VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ | rootObjectAddress newRootObjectAddress referencedObjectAddress referencedObjectHash | @@ -359,7 +361,7 @@ VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ equals: referencedObjectHash ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -379,7 +381,7 @@ VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress maybeMappedReferenceToYoungObject | @@ -399,7 +401,7 @@ VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterS self assert: maybeMappedReferenceToYoungObject equals: newRememberedObjectAddress ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferencedObjectIsInTheOldSpace [ | permObjectAddress youngObject otherOldObjectAddress | @@ -426,7 +428,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferenced ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceWhenMutatedToPointAPermObject [ | permObjectAddress youngObject otherPermObjectAddress | @@ -450,7 +452,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceW ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -470,7 +472,7 @@ VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ | rootObjectAddress rootObjectHash newRootObjectAddress referencedObjectAddress referencedObjectHash newReferencedObjectAddress | @@ -493,7 +495,7 @@ VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ self assert: (memory hashBitsOf: newReferencedObjectAddress) equals: referencedObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ | youngObjectAddress oneOldObjectAddress otherOldObjectAddress | @@ -518,7 +520,7 @@ VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces [ | oldPastSpaceStart oldFutureSpaceStart | @@ -531,7 +533,7 @@ VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces self assert: memory scavenger futureSpace start equals: oldPastSpaceStart. ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ "Nil should survive." "A new object not referenced should not survive." @@ -542,7 +544,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPastSpace [ "Only Nil should survive." @@ -554,7 +556,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPast self assertPastSpaceIsEmpty ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -579,7 +581,7 @@ VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBefo self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -604,7 +606,7 @@ VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInS self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -621,7 +623,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVar self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -638,7 +640,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObject self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ "Nil should survive. It is referenced by the roots because many of their slots are nilled." @@ -647,7 +649,7 @@ VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ memory doScavenge: 1 "TenureByAge". @@ -655,7 +657,7 @@ VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAndForth [ | oldPastSpaceStart oldFutureSpaceStart | @@ -668,7 +670,7 @@ VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAnd self assert: memory scavenger futureSpace start equals: oldFutureSpaceStart. ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder [ | rootObjectAddress objectThatShouldGoSecond objectThatShouldGoFirst | @@ -686,7 +688,7 @@ VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder self assert: (memory remapObj: objectThatShouldGoFirst) < (memory remapObj: objectThatShouldGoSecond) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects [ | firstRootObjectAddress nonRootObjectAddress secondRootObjectAddress | @@ -704,7 +706,7 @@ VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects self assert: (memory remapObj: secondRootObjectAddress) < (memory remapObj: nonRootObjectAddress) ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ | firstObjectAddress secondObjectAddress | @@ -736,7 +738,7 @@ VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ | rootObjectAddress newRootObjectAddress | @@ -760,7 +762,7 @@ VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ self assert: (memory isInOldSpace: newRootObjectAddress) ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ | objectA objectB | objectA := self newObjectWithSlots: 1. @@ -779,7 +781,7 @@ VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ | unreferencedRootObjectAddress referencedObjectAddress | unreferencedRootObjectAddress := self newObjectWithSlots: 1. @@ -794,7 +796,7 @@ VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -812,7 +814,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanve self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurviveScanvenge [ | permObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -830,7 +832,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurvive self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testYoungObjectsFromPermanentSpaceAreRemapped [ | newObjectOop newObjectHash permObject newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st index 3b597fa124..6c7bc93c59 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMSpurTreeAllocationStrategyForLargeTreeTest, - #superclass : #VMSpurTreeAllocationStrategyForSmallTreeTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurTreeAllocationStrategyForLargeTreeTest', + #superclass : 'VMSpurTreeAllocationStrategyForSmallTreeTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ " 1120 @@ -52,7 +54,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -60,7 +62,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWit self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -68,7 +70,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -76,7 +78,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWithChildrenShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -84,7 +86,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWit self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -92,7 +94,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTree self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -102,7 +104,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTree self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -110,7 +112,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTree self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -118,7 +120,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeN self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -128,7 +130,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeN self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -136,7 +138,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeN self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -144,7 +146,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSm self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -154,7 +156,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSm self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -162,7 +164,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSm self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -170,7 +172,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSma self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -179,7 +181,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSma self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSmallerLeafTreeNodeShouldShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -187,7 +189,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSma self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -195,7 +197,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLa self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -205,7 +207,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLa self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -213,7 +215,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLa self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. @@ -221,7 +223,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLar self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -231,7 +233,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLar self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test37AllocateBestFitLargerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st index 8fe74cb50a..4340d04dd7 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMSpurTreeAllocationStrategyForSmallTreeTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurTreeAllocationStrategyForSmallTreeTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationStrategyForSmallTreeTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUp [ super setUp. self setUpTree. ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ " 560 @@ -61,13 +63,13 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationStrategyForSmallTreeTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -75,7 +77,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithC self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 8. @@ -84,7 +86,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliput self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -92,7 +94,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -103,7 +105,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1152 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -111,7 +113,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRootAddress [ | desiredAddress allocatedAddress | @@ -121,7 +123,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2). @@ -129,7 +131,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNo self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseLargestSmallerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 8. @@ -138,7 +140,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -148,7 +150,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNo self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -159,7 +161,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1088 - allocatedSize) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3). @@ -167,7 +169,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNod self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseSmallerThanRootAddress [ | desiredAddress allocatedAddress | @@ -177,7 +179,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -187,7 +189,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNod self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldUseIntermediateNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -197,7 +199,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4). @@ -205,7 +207,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmal self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | allocatedSize := (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -215,7 +217,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1056 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -225,7 +227,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmal self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldUseRootNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 8. @@ -235,7 +237,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanL self assert: (memory bytesInObject: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 3) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5). @@ -243,7 +245,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmall self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -254,7 +256,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanL self denyFreeListEmpty: (self freeListForSize: 1120 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -263,7 +265,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmall self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldUseLargestLeafNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 8. @@ -272,7 +274,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6). @@ -280,7 +282,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLarg self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -292,7 +294,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1216 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -302,7 +304,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLarg self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldUseIntermediateLargerNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 8. @@ -311,7 +313,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7). @@ -319,7 +321,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLarge self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -331,7 +333,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1184 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -341,7 +343,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLarge self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateSmallerThanLiliputianDiffFromLargestLeaShouldFindNoMemory [ self assert: (memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 8) equals: nil diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st index de185856c6..09933d96de 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMSpurTreeAllocationWithBigNodesTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurTreeAllocationWithBigNodesTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationWithBigNodesTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationWithBigNodesTest >> setUp [ " Allocate a tree that has a large child large enough so a remainder could still be larger than the root @@ -45,13 +47,13 @@ VMSpurTreeAllocationWithBigNodesTest >> setUp [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationWithBigNodesTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: 16. @@ -60,7 +62,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShould self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: 1008 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShouldBeInsertedInLarger [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) + 16. @@ -69,7 +71,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShou self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: 4080 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test03LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) * 2 + 16. diff --git a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st index 03868c02d3..bd476b58e7 100644 --- a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st @@ -27,23 +27,25 @@ Types are not the exact types used. " Class { - #name : #VMStackBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMStackBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'page', 'frames', 'args', 'methodBuilder' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #frames } +{ #category : 'frames' } VMStackBuilder >> addFrame: aFrame [ frames add: aFrame ] -{ #category : #frames } +{ #category : 'frames' } VMStackBuilder >> addNewFrame [ | frame | "'add' a new frame in the sense of an OrderedCollection, which will be iterated with #do: @@ -53,17 +55,17 @@ VMStackBuilder >> addNewFrame [ ^ frame "the frame is then configured by the caller" ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> args [ ^ args ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> args: anObject [ args := anObject ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> buildStack [ self createStackPage. self preparePage. @@ -72,7 +74,7 @@ VMStackBuilder >> buildStack [ ^ frames last ] -{ #category : #stack } +{ #category : 'stack' } VMStackBuilder >> createStackPage [ | sp | frames ifEmpty:[ self error ]. @@ -83,17 +85,17 @@ VMStackBuilder >> createStackPage [ interpreter stackPointer: sp. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> frames [ ^ frames ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> frames: anObject [ frames := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } VMStackBuilder >> initialize [ super initialize. frames := OrderedCollection new. "will be treated in reverse" @@ -103,35 +105,35 @@ VMStackBuilder >> initialize [ page := nil. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> lastFrame [ ^ frames last ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> methodBuilder [ ^ methodBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> methodBuilder: anObject [ methodBuilder := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> page [ ^ page ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> page: anObject [ page := anObject ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> preparePage [ "Page setup before the base frame" interpreter push: memory nilObject. "receiver" @@ -142,7 +144,7 @@ VMStackBuilder >> preparePage [ ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushAllButFirstFrames [ 2 to: frames size do: [ :anIndex | | aFrame | aFrame := frames at: anIndex. @@ -156,19 +158,19 @@ VMStackBuilder >> pushAllButFirstFrames [ ] ] -{ #category : #initialization } +{ #category : 'initialization' } VMStackBuilder >> pushArgs [ args do: [ :anArg | interpreter push: anArg ] ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushBaseFrame [ frames first previousFrameArgsSize: args size. self pushFrame: frames first. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushFrame: aFrame [ interpreter framePointer: interpreter stackPointer. @@ -178,18 +180,18 @@ VMStackBuilder >> pushFrame: aFrame [ page headSP: interpreter stackPointer. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushFrames [ self pushBaseFrame. self pushAllButFirstFrames. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMStackBuilder >> reset [ self initialize. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> setInterpreterVariables [ | lastFrame | interpreter setStackPageAndLimit: page. @@ -204,7 +206,7 @@ VMStackBuilder >> setInterpreterVariables [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> topFrame [ ^ frames last ] diff --git a/smalltalksrc/VMMakerTests/VMStackFrame.class.st b/smalltalksrc/VMMakerTests/VMStackFrame.class.st index ec06607f85..81b9be1e5e 100644 --- a/smalltalksrc/VMMakerTests/VMStackFrame.class.st +++ b/smalltalksrc/VMMakerTests/VMStackFrame.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMStackFrame, - #superclass : #Object, + #name : 'VMStackFrame', + #superclass : 'Object', #instVars : [ 'framePointer', 'interpreter' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^self new framePointer: anInteger; @@ -19,19 +21,19 @@ VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpre yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMStackFrame class >> virtualMachine: aVirtualMachine fp: anInteger [ ^ self newFramePointer: anInteger withInterpreter: aVirtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> bytecodeMethod [ ^ VMBytecodeMethod newOnInterpreter: interpreter methodOop: self method ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> caller [ | callerContext | @@ -65,41 +67,41 @@ VMStackFrame >> caller [ ^ VMContext newOnContext: callerContext withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> callerContext [ ^ interpreter frameCallerContext: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> callerFP [ ^ interpreter frameCallerFP: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> context [ ^VMContext newOnContext: (interpreter frameContext: framePointer) withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> description [ | selector | selector := interpreter findSelectorOfMethod: self methodOop. ^ interpreter stringOf: selector ] -{ #category : #accesing } +{ #category : 'accesing' } VMStackFrame >> framePointer: anInteger [ framePointer := anInteger ] -{ #category : #testing } +{ #category : 'testing' } VMStackFrame >> hasContext [ ^interpreter frameHasContext: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> instructionPointer [ ^ interpreter framePointer = framePointer @@ -107,50 +109,50 @@ VMStackFrame >> instructionPointer [ ifFalse: [ interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : #acccessing } +{ #category : 'acccessing' } VMStackFrame >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : #testing } +{ #category : 'testing' } VMStackFrame >> isMachineCodeFrame [ ^ interpreter isMachineCodeFrame: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> machineCodeMethod [ | methodSurrogate | methodSurrogate := interpreter cogMethodZone methodFor: self method. ^ VMMachineCodeMethod newOnInterpreter: interpreter cogMethodSurrogate: methodSurrogate ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> method [ ^ interpreter iframeMethod: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> methodOop [ ^ interpreter frameMethodObject: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> receiver [ ^ interpreter framePointer = framePointer ifTrue: [ interpreter receiver ] ifFalse: [ self halt. interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> sender [ ^ VMStackFrame newFramePointer:(interpreter frameCallerFP: framePointer) withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> sourceCode [ ^ self isMachineCodeFrame @@ -158,7 +160,7 @@ VMStackFrame >> sourceCode [ ifFalse: [ self bytecodeMethod disassemble ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> stack [ | stack currentFrame | stack := OrderedCollection new. @@ -169,7 +171,7 @@ VMStackFrame >> stack [ ^ stack ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> stackPage [ ^interpreter stackPages stackPageFor: framePointer. ] diff --git a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st index 4a73d7c65e..2e9960b95e 100644 --- a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st @@ -1,32 +1,34 @@ Class { - #name : #VMStackInterpreterTest, - #superclass : #TestCase, + #name : 'VMStackInterpreterTest', + #superclass : 'TestCase', #instVars : [ 'stackInterpreterClass' ], - #category : #'VMMakerTests-StackInterpreter' + #category : 'VMMakerTests-StackInterpreter', + #package : 'VMMakerTests', + #tag : 'StackInterpreter' } -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> setUp [ super setUp. stackInterpreterClass := StackInterpreter. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackInterpreterTest >> stackInterpreterClass [ ^ stackInterpreterClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackInterpreterTest >> stackInterpreterClass: anObject [ stackInterpreterClass := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> testIsObjectAccessor [ self @@ -35,7 +37,7 @@ VMStackInterpreterTest >> testIsObjectAccessor [ assert: (self stackInterpreterClass isObjectAccessor: #fetchClassOf:) ] -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> testIsStackAccessor [ self diff --git a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st index e36709438e..c643d5e0b8 100644 --- a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMStackMappingTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMStackMappingTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMStackMappingTest >> buildStackFromFrames [ 3 timesRepeat: [ @@ -17,7 +19,7 @@ VMStackMappingTest >> buildStackFromFrames [ stackBuilder buildStack ] -{ #category : #helpers } +{ #category : 'helpers' } VMStackMappingTest >> newContext [ | method | @@ -30,13 +32,13 @@ VMStackMappingTest >> newContext [ ip: 10 ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testCreatingNewContextByHandShouldbeSingle [ self assert: (interpreter isSingleContext: self newContext) ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ | context fp | context := self newContext. @@ -46,7 +48,7 @@ VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ self assert: (interpreter isSingleContext: context) ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testDivorceFramesInPage [ | page | self buildStackFromFrames. @@ -67,7 +69,7 @@ VMStackMappingTest >> testDivorceFramesInPage [ ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testMarryNewContextIsMarried [ | context | context := self newContext. @@ -75,7 +77,7 @@ VMStackMappingTest >> testMarryNewContextIsMarried [ self assert: (interpreter isStillMarriedContext: context) ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ | aContext framePointerToMarry stackPointerToMarry oldPage | self buildStackFromFrames. @@ -89,7 +91,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ self assert: oldPage isFree ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext | self buildStackFromFrames. @@ -103,7 +105,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSen self assert: expectedDivorcedContext equals: aContext. ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry oldPage newPage | self buildStackFromFrames. @@ -117,7 +119,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ self deny: oldPage equals: newPage ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -129,7 +131,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext oldBaseFramePointer callerContext | self buildStackFromFrames. @@ -149,7 +151,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsS ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -163,7 +165,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ self assert: initialiNumberOfusedPages + 1 equals: newNumberOfUsedPages ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -175,7 +177,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ | aContext initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -187,7 +189,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ self assert: initialiNumberOfusedPages equals: newNumberOfUsedPages ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryTopFrame [ | aContext | self buildStackFromFrames. diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st index 076488f560..fd296015d6 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMStackToRegisterMappingCogitTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMStackToRegisterMappingCogitTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'methodReceiver', 'receiverOperationBlock', @@ -15,21 +15,23 @@ Class { 'expectedResult', 'expectedReflexiveResult' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> argumentOperation: aFullBlockClosure [ argumentOperation := aFullBlockClosure ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> arguments: aCollection [ arguments := aCollection ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> buildStackFrame [ "Let's prepare the trampoline in case of non-optimized path" self createSpecialSelectorArray. @@ -49,7 +51,7 @@ VMStackToRegisterMappingCogitTest >> buildStackFrame [ ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> compileMethod [ codeAddress := self compile: [ @@ -61,54 +63,54 @@ VMStackToRegisterMappingCogitTest >> compileMethod [ cogit genReturnTopFromMethod ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult [ ^ expectedReflexiveResult ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult: anObject [ expectedReflexiveResult := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedResult [ ^ expectedResult ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedResult: anObject [ expectedResult := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingCogitTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> methodReceiver: anOop [ methodReceiver := anOop ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> receiverOperation: aFullBlockClosure [ receiverOperationBlock := aFullBlockClosure ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> sendBytecode [ ^ sendBytecode ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> sendBytecode: anObject [ sendBytecode := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingCogitTest >> setUp [ super setUp. @@ -116,7 +118,7 @@ VMStackToRegisterMappingCogitTest >> setUp [ arguments := #(). ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperation and: argumentOfOperation [ self buildStackFrame. @@ -126,7 +128,7 @@ VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperati self assertSpecialSendTo: receiverOfOperation value withArg: argumentOfOperation value ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self buildStackFrame. @@ -136,22 +138,22 @@ VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: aValue). ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value1 [ ^ value1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value1: anObject [ value1 := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value2 [ ^ value2 ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value2: anObject [ value2 := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st index 1033cc50ad..f67ef4a755 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMStackToRegisterMappingTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMStackToRegisterMappingTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingTest >> setUp [ super setUp. @@ -29,7 +31,7 @@ VMStackToRegisterMappingTest >> setUp [ cogit needsFrame: true ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testFlushBelowTop [ | stop stackPointerBefore framePointer | @@ -57,7 +59,7 @@ VMStackToRegisterMappingTest >> testFlushBelowTop [ self assert: self popAddress equals: (memory integerObjectOf: 17) ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopConstant [ cogit ssPushConstant: 1. @@ -67,7 +69,7 @@ VMStackToRegisterMappingTest >> testPopConstant [ self assert: cogit ssTop equals: cogit simSelf. ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -94,7 +96,7 @@ VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopRegister [ cogit ssPushRegister: TempReg. @@ -104,7 +106,7 @@ VMStackToRegisterMappingTest >> testPopRegister [ self assert: cogit ssTop equals: cogit simSelf ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ | stop stackPointerBefore framePointer | @@ -130,7 +132,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ self assert: self machineSimulator smalltalkStackPointerRegisterValue equals: stackPointerBefore ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPopFromStack [ | stop stackPointerBefore framePointer | @@ -157,7 +159,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPop self assert: self popAddress equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -184,7 +186,7 @@ VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPushConstant [ cogit ssPushConstant: 1. @@ -195,7 +197,7 @@ VMStackToRegisterMappingTest >> testPushConstant [ self deny: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPushRegister [ cogit ssPushRegister: TempReg. @@ -206,7 +208,7 @@ VMStackToRegisterMappingTest >> testPushRegister [ self deny: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testSpillConstant [ cogit ssPushConstant: 1. @@ -223,7 +225,7 @@ VMStackToRegisterMappingTest >> testSpillConstant [ self assert: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testSpillRegister [ cogit ssPushRegister: TempReg. @@ -242,7 +244,7 @@ VMStackToRegisterMappingTest >> testSpillRegister [ self assert: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testTopOfEmptyIsSimSelf [ self assert: cogit ssSize equals: 1. diff --git a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st index 267fd1873e..e1964ec1c5 100644 --- a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st @@ -1,14 +1,15 @@ Class { - #name : #VMTestMockInterpreter, - #superclass : #StackInterpreterSimulatorLSB, + #name : 'VMTestMockInterpreter', + #superclass : 'StackInterpreterSimulatorLSB', #instVars : [ 'interpreteBlock', 'allocatedElements' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'memory testing' } +{ #category : 'memory testing' } VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ | allocated | @@ -19,43 +20,43 @@ VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ ^ allocated ] -{ #category : #'memory testing' } +{ #category : 'memory testing' } VMTestMockInterpreter >> allocatedElements [ ^ allocatedElements ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> basicInitialize [ super basicInitialize. allocatedElements := Set new ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> enterSmalltalkExecutiveImplementation [ interpreteBlock value ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> free: aPointer [ allocatedElements remove: aPointer. ^ super free: aPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> interpreteBlock [ ^ interpreteBlock ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> interpreteBlock: anObject [ interpreteBlock := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> malloc: aSize [ ^ allocatedElements add: (super malloc: aSize) diff --git a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st index dd1e43a5cc..22b52f0abb 100644 --- a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMTrampolineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMTrampolineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'registerMask', 'isAligned', @@ -10,10 +10,12 @@ Class { 'CogAbstractRegisters', 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMTrampolineTest class >> testParameters [ ^ super testParameters * { @@ -22,25 +24,25 @@ VMTrampolineTest class >> testParameters [ } ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> isAligned [ ^ isAligned ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> isAligned: aBoolean [ isAligned := aBoolean ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> setUp [ super setUp. @@ -60,7 +62,7 @@ VMTrampolineTest >> setUp [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ | inc baseMethod baseMethodIP ctx page | @@ -123,7 +125,7 @@ VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ equals: (memory integerObjectOf: 3) ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testDetectFrameNotPointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -138,7 +140,7 @@ VMTrampolineTest >> testDetectFrameNotPointerInUse [ self deny: cogit isCFramePointerInUse ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testDetectFramePointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -153,7 +155,7 @@ VMTrampolineTest >> testDetectFramePointerInUse [ self assert: cogit isCFramePointerInUse ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -171,7 +173,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self assert: self framePointerRegisterValue equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -189,7 +191,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self assert: machineSimulator smalltalkStackPointerRegisterValue equals: 17 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ | initialStackPointer | @@ -207,7 +209,7 @@ VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue equals: initialStackPointer ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDereferenceSelectorRoutine [ | dereferenceRoutine previousLinkRegister trampoline | @@ -238,7 +240,7 @@ VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDeref self assert: self interpreter stackTop equals: previousLinkRegister ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -252,7 +254,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self assert: machineSimulator framePointerRegisterValue equals: 888 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -266,7 +268,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self assert: machineSimulator stackPointerRegisterValue equals: 777 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ cogit backend hasLinkRegister ifFalse: [ ^ self skip ]. @@ -282,7 +284,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ self assert: self interpreter stackTop equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -299,7 +301,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePoint self assert: self interpreter framePointer equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -316,7 +318,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPoint self assert: self interpreter stackPointer equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ "Some architectures such as ARMv8 require that the SP is always aligned to some value even in between calls. @@ -329,7 +331,7 @@ VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue \\ cogit stackPointerAlignment equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testStoreRegistersPushesValuesToStack [ | initialStackPointer actualPushedBytes | diff --git a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st index 9827cf8874..1951d51644 100644 --- a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMX64InstructionTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMX64InstructionTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMX64InstructionTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -15,13 +17,13 @@ VMX64InstructionTest class >> wordSizeParameters [ yourself ] -{ #category : #configuration } +{ #category : 'configuration' } VMX64InstructionTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ | mem | @@ -45,7 +47,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ | mem | @@ -70,7 +72,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupSRVr [ @@ -86,7 +88,7 @@ VMX64InstructionTest >> testDupSRVr [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFaddSRvRvRv [ | result | @@ -105,7 +107,7 @@ VMX64InstructionTest >> testFaddSRvRvRv [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ | result | @@ -124,7 +126,7 @@ VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFsubSRvRvRv [ | result | @@ -143,7 +145,7 @@ VMX64InstructionTest >> testFsubSRvRvRv [ self assert: (result doubleAt: 9) equals: -1.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFsubSRvRvRvWithThreeDifferentRegisters [ | result | diff --git a/smalltalksrc/VMMakerTests/package.st b/smalltalksrc/VMMakerTests/package.st index 328d153d5f..285bf148e9 100644 --- a/smalltalksrc/VMMakerTests/package.st +++ b/smalltalksrc/VMMakerTests/package.st @@ -1 +1 @@ -Package { #name : #VMMakerTests } +Package { #name : 'VMMakerTests' } From 5a89a23d4f67444832abe933a59b91ff225818fc Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Thu, 22 Aug 2024 16:56:14 +0200 Subject: [PATCH 05/11] Revert "updated comment" This reverts commit 771436315e03641e984f5f420a0affb4512cc28b. --- smalltalksrc/VMMakerTests/Array.extension.st | 6 +- .../VMMakerTests/ByteSymbol.extension.st | 6 +- .../VMMakerTests/Character.extension.st | 6 +- smalltalksrc/VMMakerTests/Cogit.extension.st | 12 +- .../VMMakerTests/CompiledBlock.extension.st | 4 +- .../VMMakerTests/DummyProcessor.class.st | 56 +- .../VMMakerTests/ExitInterpreter.class.st | 9 +- .../VMMakerTests/LiteralVariable.extension.st | 4 +- .../ManifestVMMakerTests.class.st | 14 +- .../VMMakerTests/MethodBuilderTest.class.st | 30 +- .../MockVMStructWithReservedWords.class.st | 13 +- ...ckVMStructWithoutTypeDeclarations.class.st | 9 +- .../ParametrizedTestMatrix.extension.st | 4 +- .../VMMakerTests/ProcessorSimulator.class.st | 258 ++++--- .../VMMakerTests/RegisterDescriptor.class.st | 33 +- .../VMMakerTests/SmallInteger.extension.st | 4 +- .../SpurMemoryManager.extension.st | 4 +- .../VMMakerTests/StackBuilderTest.class.st | 76 +- .../StackToRegisterMappingCogit.extension.st | 4 +- .../VMMakerTests/UndefinedObject.extension.st | 4 +- .../UnicornARMv5Simulator.class.st | 136 ++-- .../UnicornARMv8Simulator.class.st | 212 +++--- .../UnicornI386Simulator.class.st | 106 ++- .../UnicornInvalidMemoryAccess.class.st | 28 +- .../VMMakerTests/UnicornProcessor.class.st | 160 ++-- .../UnicornRISCVSimulator.class.st | 264 ++++--- .../UnicornRegisterDescriptor.class.st | 30 +- .../UnicornSimulationTrap.class.st | 26 +- .../VMMakerTests/UnicornSimulator.class.st | 28 +- .../VMMakerTests/UnicornTimeout.class.st | 12 +- .../VMMakerTests/UnicornX64Simulator.class.st | 162 ++-- .../VMARMStackAlignmentTest.class.st | 24 +- .../VMARMV8SIMDEncodingTest.class.st | 38 +- .../VMARMV8SpecificEncodingTest.class.st | 72 +- .../VMMakerTests/VMAbstractBuilder.class.st | 18 +- .../VMMakerTests/VMAbstractFFITest.class.st | 23 +- .../VMAbstractImageFormatTest.class.st | 22 +- .../VMAbstractPrimitiveTest.class.st | 19 +- .../VMMakerTests/VMBlockTest.class.st | 40 +- .../VMMakerTests/VMByteCodesTest.class.st | 136 ++-- .../VMMakerTests/VMBytecodeMethod.class.st | 32 +- .../VMCodeCompactionTest.class.st | 38 +- .../VMMakerTests/VMCogitHelpersTest.class.st | 28 +- .../VMCompiledCodeBuilder.class.st | 72 +- smalltalksrc/VMMakerTests/VMContext.class.st | 28 +- .../VMMakerTests/VMContextAccessTest.class.st | 22 +- .../VMDivisionInstructionTest.class.st | 28 +- .../VMFFIArgumentMarshallingTest.class.st | 95 ++- .../VMMakerTests/VMFFICallbacksTest.class.st | 17 +- .../VMMakerTests/VMFFIHelpersTest.class.st | 31 +- .../VMFFIReturnMarshallingTest.class.st | 47 +- ...SameThreadArgumentMarshallingTest.class.st | 13 +- .../VMFFISameThreadCalloutTest.class.st | 11 +- ...FISameThreadReturnMarshallingTest.class.st | 11 +- ...MFFIWorkerArgumentMarshallingTest.class.st | 19 +- .../VMFFIWorkerCalloutTest.class.st | 27 +- .../VMFFIWorkerReturnMarshallingTest.class.st | 13 +- ...ForwardLiteralInMachineMethodTest.class.st | 14 +- .../VMMakerTests/VMFrameBuilder.class.st | 92 ++- .../VMImageHeaderWritingTest.class.st | 50 +- .../VMMakerTests/VMImageReadingTest.class.st | 32 +- .../VMMakerTests/VMInterpreterTests.class.st | 14 +- .../VMJITPrimitiveCallingTest.class.st | 82 +-- .../VMJITVMPrimitiveTest.class.st | 20 +- .../VMJistMethodTestObject.class.st | 10 +- .../VMMakerTests/VMJitMethodTest.class.st | 30 +- .../VMJitMethodWithImmutabilityTest.class.st | 16 +- .../VMMakerTests/VMJitSimdBytecode.class.st | 26 +- .../VMJittedBoxFloatPrimitivesTest.class.st | 14 +- ...ittedByteArrayAccessPrimitiveTest.class.st | 112 ++- ...xternalAddressAccessPrimitiveTest.class.st | 12 +- .../VMJittedGeneralPrimitiveTest.class.st | 306 ++++---- .../VMMakerTests/VMJittedLookupTest.class.st | 22 +- .../VMJittedPrimitiveAtPutTest.class.st | 14 +- .../VMJittedPrimitiveAtTest.class.st | 74 +- .../VMJittedPrimitiveSizeTest.class.st | 32 +- .../VMJittedPrimitivesTest.class.st | 20 +- .../VMJittedSmallFloatPrimitiveTest.class.st | 52 +- .../VMMakerTests/VMLiterRulesTest.class.st | 13 +- .../VMMakerTests/VMLookUpTest.class.st | 62 +- .../VMMASTTranslationTest.class.st | 87 ++- .../VMMachineCodeFrameBuilderForTest.class.st | 41 +- .../VMMakerTests/VMMachineCodeMethod.class.st | 20 +- .../VMMachineSimulatorTest.class.st | 42 +- .../VMMakerTests/VMMockCodeGenerator.class.st | 26 +- ...MObjectAccessorIdentificationTest.class.st | 10 +- .../VMMakerTests/VMObjectLayoutTests.class.st | 60 +- .../VMMakerTests/VMObjectStackTest.class.st | 38 +- .../VMPermanentSpaceImageReadingTest.class.st | 14 +- .../VMPermanentSpaceMemoryTest.class.st | 90 ++- .../VMPermanentSpacePrimitiveTest.class.st | 30 +- .../VMMakerTests/VMPinnedObjectTest.class.st | 36 +- .../VMPrimitiveCallAbstractTest.class.st | 44 +- .../VMPrimitiveCallingTest.class.st | 16 +- .../VMMakerTests/VMPrimitiveTest.class.st | 696 +++++++++--------- .../VMPushThisContextRoutineTest.class.st | 32 +- .../VMSegmentsImageFormatTest.class.st | 18 +- ...lectorIndexDereferenceRoutineTest.class.st | 16 +- .../VMMakerTests/VMSessionIdTest.class.st | 10 +- ...SimpleStackBasedCogitAbstractTest.class.st | 164 ++--- ...SimpleStackBasedCogitBytecodeTest.class.st | 312 ++++---- ...impleStackBasedCogitCoggedMethods.class.st | 16 +- ...StackBasedCogitMegamorphicPICTest.class.st | 40 +- ...StackBasedCogitMonomorphicPICTest.class.st | 14 +- ...StackBasedCogitPolymorphicPICTest.class.st | 52 +- ...eStackBasedCogitRememberedSetTest.class.st | 20 +- .../VMSimulatedEnvironmentBuilder.class.st | 48 +- .../VMMakerTests/VMSimulationTest.class.st | 12 +- .../VMSistaSuperSendsTest.class.st | 12 +- .../VMSistaTrampolineTest.class.st | 12 +- .../VMSpecialSendArithmethicTest.class.st | 80 +- .../VMSpurEphemeronsAlgorithmTest.class.st | 46 +- .../VMSpurInitializedOldSpaceTest.class.st | 48 +- .../VMSpurMemoryManagerTest.class.st | 154 ++-- .../VMSpurNewSpaceStructureTest.class.st | 46 +- .../VMSpurObjectAllocationTest.class.st | 12 +- .../VMSpurOldSpaceBootstrapTest.class.st | 20 +- ...MSpurOldSpaceGarbageCollectorTest.class.st | 78 +- .../VMSpurOldSpaceStructureTest.class.st | 14 +- .../VMMakerTests/VMSpurOldSpaceTest.class.st | 140 ++-- .../VMSpurRememberedSetTest.class.st | 46 +- .../VMSpurScavengeEphemeronTest.class.st | 48 +- .../VMSpurScavengeWeakTest.class.st | 18 +- .../VMMakerTests/VMSpurScavengerTest.class.st | 96 ++- ...llocationStrategyForLargeTreeTest.class.st | 56 +- ...llocationStrategyForSmallTreeTest.class.st | 76 +- ...purTreeAllocationWithBigNodesTest.class.st | 20 +- .../VMMakerTests/VMStackBuilder.class.st | 54 +- .../VMMakerTests/VMStackFrame.class.st | 50 +- .../VMStackInterpreterTest.class.st | 18 +- .../VMMakerTests/VMStackMappingTest.class.st | 38 +- ...VMStackToRegisterMappingCogitTest.class.st | 48 +- .../VMStackToRegisterMappingTest.class.st | 34 +- .../VMTestMockInterpreter.class.st | 23 +- .../VMMakerTests/VMTrampolineTest.class.st | 46 +- .../VMX64InstructionTest.class.st | 26 +- smalltalksrc/VMMakerTests/package.st | 2 +- 137 files changed, 3449 insertions(+), 3679 deletions(-) diff --git a/smalltalksrc/VMMakerTests/Array.extension.st b/smalltalksrc/VMMakerTests/Array.extension.st index a4a387884a..ef74d1b24b 100644 --- a/smalltalksrc/VMMakerTests/Array.extension.st +++ b/smalltalksrc/VMMakerTests/Array.extension.st @@ -1,13 +1,13 @@ -Extension { #name : 'Array' } +Extension { #name : #Array } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Array >> forMemory: aMemory inMethod: anObject [ ^ aMemory newArrayWith: (self collect: [ :anElement | anElement forMemory: aMemory inMethod: nil ]) ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Array >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st index 3fde704597..e9a6595a9d 100644 --- a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st +++ b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'ByteSymbol' } +Extension { #name : #ByteSymbol } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ByteSymbol >> forMemory: aMemory inMethod: anObject [ | vmString instSpec numSlots | @@ -27,7 +27,7 @@ ByteSymbol >> forMemory: aMemory inMethod: anObject [ ^ vmString ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ByteSymbol >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Character.extension.st b/smalltalksrc/VMMakerTests/Character.extension.st index 79a30d41b3..26f22ec3fe 100644 --- a/smalltalksrc/VMMakerTests/Character.extension.st +++ b/smalltalksrc/VMMakerTests/Character.extension.st @@ -1,12 +1,12 @@ -Extension { #name : 'Character' } +Extension { #name : #Character } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Character >> forMemory: memory [ ^ memory characterObjectOf: self codePoint ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Character >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Cogit.extension.st b/smalltalksrc/VMMakerTests/Cogit.extension.st index c8d411581d..3b587c4699 100644 --- a/smalltalksrc/VMMakerTests/Cogit.extension.st +++ b/smalltalksrc/VMMakerTests/Cogit.extension.st @@ -1,28 +1,28 @@ -Extension { #name : 'Cogit' } +Extension { #name : #Cogit } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> byte0: anInteger [ byte0 := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> inBlock: anInteger [ inBlock := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> methodOrBlockNumArgs: anInteger [ methodOrBlockNumArgs := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> needsFrame [ ^ true ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> needsFrame: aFalse [ needsFrame := aFalse ] diff --git a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st index 87094e4db8..436740ae7f 100644 --- a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st +++ b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'CompiledBlock' } +Extension { #name : #CompiledBlock } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } CompiledBlock >> forMemory: memory inMethod: aMethodBuilder [ | methodBuilder | diff --git a/smalltalksrc/VMMakerTests/DummyProcessor.class.st b/smalltalksrc/VMMakerTests/DummyProcessor.class.st index 3c4e14ea5a..7779177d07 100644 --- a/smalltalksrc/VMMakerTests/DummyProcessor.class.st +++ b/smalltalksrc/VMMakerTests/DummyProcessor.class.st @@ -1,6 +1,6 @@ Class { - #name : 'DummyProcessor', - #superclass : 'Object', + #name : #DummyProcessor, + #superclass : #Object, #instVars : [ 'stackPointer', 'framePointer', @@ -10,151 +10,149 @@ Class { 'linkRegisterValue', 'receiverRegisterValue' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> baseRegisterValue: anInteger [ baseRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> cResultRegister [ ^ nil ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> disassembler [ ^ LLVMDisassembler aarch64 ] -{ #category : 'operations' } +{ #category : #operations } DummyProcessor >> flushICacheFrom: anInteger to: anInteger2 [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> fp [ ^ framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> fp: anInteger [ framePointer := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> framePointerRegisterValue: anInteger [ framePointer := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> hasLinkRegister [ ^ true ] -{ #category : 'initialization' } +{ #category : #initialization } DummyProcessor >> initializeStackFor: aSimpleStackBasedCogit [ "We are dummy...." ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> instructionPointerRegisterValue [ ^ programCounter ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> integerRegisterState [ ^ #() ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> linkRegisterValue: anInteger [ linkRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> machineSimulator [ ^ self ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> memoryAt: anInteger write: aCollection size: anInteger3 [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> pc [ ^ programCounter ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> pc: anInteger [ programCounter := anInteger ] -{ #category : 'operations' } +{ #category : #operations } DummyProcessor >> pushWord: anInteger [ stackPointer := stackPointer - 8 ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> receiverRegisterValue: anInteger [ receiverRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> runUntil: anInteger [ programCounter := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> setFramePointer: aFPValue stackPointer: aSPValue [ stackPointer := aSPValue. framePointer := aFPValue ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> simulateLeafCallOf: anInteger nextpc: anInteger2 memory: anUndefinedObject [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> smalltalkStackPointerRegisterValue [ ^ smalltalkStackPointerRegisterValue ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> smalltalkStackPointerRegisterValue: anInteger [ smalltalkStackPointerRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> sp [ ^ stackPointer diff --git a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st index 4aff38ec53..86c280b059 100644 --- a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st @@ -1,14 +1,13 @@ Class { - #name : 'ExitInterpreter', - #superclass : 'Error', + #name : #ExitInterpreter, + #superclass : #Error, #instVars : [ 'returnValue' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } ExitInterpreter >> returnValue: anInteger [ returnValue := anInteger diff --git a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st index 02d3f47f5a..6579fb7e3b 100644 --- a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st +++ b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'LiteralVariable' } +Extension { #name : #LiteralVariable } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } LiteralVariable >> forMemory: aMemory inMethod: anObject [ | aVariable | diff --git a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st index 267b338feb..84a27ad5d5 100644 --- a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st +++ b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st @@ -2,28 +2,26 @@ I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser " Class { - #name : 'ManifestVMMakerTests', - #superclass : 'PackageManifest', - #category : 'VMMakerTests-Manifest', - #package : 'VMMakerTests', - #tag : 'Manifest' + #name : #ManifestVMMakerTests, + #superclass : #PackageManifest, + #category : #'VMMakerTests-Manifest' } -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> ruleBadMessageRule2V1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#UnicornARMv8Simulator #smashCallerSavedRegistersWithValuesFrom:by:in: #false)) #'2023-05-12T09:19:16.384586+02:00') #(#(#RGMethodDefinition #(#UnicornARMv8Simulator #postCallArgumentsNumArgs:in: #false)) #'2023-05-12T09:20:41.357283+02:00') #(#(#RGMethodDefinition #(#ProcessorSimulator #smashRegistersWithValuesFrom:by: #false)) #'2023-05-12T09:25:17.137958+02:00') ) ] -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> rulePrecedenceRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2023-05-12T09:19:42.605517+02:00') ) ] -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> ruleUncommonMessageSendRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2020-07-24T12:05:44.86595+02:00') ) ] diff --git a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st index 882ae1c75a..fada9181db 100644 --- a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'MethodBuilderTest', - #superclass : 'VMInterpreterTests', + #name : #MethodBuilderTest, + #superclass : #VMInterpreterTests, #instVars : [ 'literals', 'numberOfArguments', @@ -11,19 +11,17 @@ Class { 'methodHeader', 'method' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testAddingBytecodesDoesntOverrideHeader [ method := methodBuilder newMethod buildMethod. self assert: methodBuilder buildMethodHeader equals: (memory integerValueOf: (memory fetchPointer: 0 ofObject: method)). ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ method := methodBuilder newMethod; buildMethod. @@ -35,14 +33,14 @@ MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ self shouldnt:[ methodBuilder newMethod; buildMethod ] raise: AssertionFailure ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBuildEmptyMethodIsCompiledMethod [ "checking the format" method := methodBuilder newMethod; buildMethod. self assert: (memory isCompiledMethod: method) ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ | bytecodeAddress | literals := { }. @@ -56,7 +54,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | @@ -71,7 +69,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ | bytecodeAddress | @@ -86,13 +84,13 @@ MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testClassOfCompiledMethodIsCompiledMethod [ self assert: (memory fetchClassOf: methodBuilder newMethod buildMethod) equals: (memory splObj: 16). ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testGeneratingCompiledMethod [ method := methodBuilder newMethod @@ -101,7 +99,7 @@ MethodBuilderTest >> testGeneratingCompiledMethod [ self assert: (memory isCompiledMethod: method) ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ | numberOfByteCode | @@ -116,7 +114,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ | numberOfByteCode | @@ -131,7 +129,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testSecondBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st index 1ffa0754bb..92814927f5 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st @@ -1,28 +1,27 @@ Class { - #name : 'MockVMStructWithReservedWords', - #superclass : 'VMStructType', + #name : #MockVMStructWithReservedWords, + #superclass : #VMStructType, #instVars : [ 'foo', 'case' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'enumerating' } +{ #category : #enumerating } MockVMStructWithReservedWords class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ aBinaryBlock value: 'foo' value: 'char *'. aBinaryBlock value: 'case' value: 'char *' ] -{ #category : 'accessing' } +{ #category : #accessing } MockVMStructWithReservedWords >> case [ ^ case ] -{ #category : 'accessing' } +{ #category : #accessing } MockVMStructWithReservedWords >> case: anObject [ case := anObject diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st index 077e789b01..15627d4255 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st @@ -1,15 +1,14 @@ Class { - #name : 'MockVMStructWithoutTypeDeclarations', - #superclass : 'VMStructType', + #name : #MockVMStructWithoutTypeDeclarations, + #superclass : #VMStructType, #instVars : [ 'foo', 'bar' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'enumerating' } +{ #category : #enumerating } MockVMStructWithoutTypeDeclarations class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ "Missing the bar type declaration" diff --git a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st index b9250409cb..f5910338a6 100644 --- a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st +++ b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'ParametrizedTestMatrix' } +Extension { #name : #ParametrizedTestMatrix } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ParametrizedTestMatrix >> + aParametrizedTestMatrix [ | newMatrix | diff --git a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st index a61f9c0b74..37e4e7c26c 100644 --- a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st +++ b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st @@ -1,48 +1,46 @@ Class { - #name : 'ProcessorSimulator', - #superclass : 'Object', + #name : #ProcessorSimulator, + #superclass : #Object, #instVars : [ 'simulator', 'registerAliases', 'registerSmalltalkAliases', 'memory' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> ARMv5 [ ^ UnicornARMv5Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> ARMv8 [ ^ UnicornARMv8Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> IA32 [ ^ UnicornI386Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> X64 [ ^ UnicornX64Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> aarch64 [ ^ UnicornARMv8Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> riscv64 [ "TODO: Add riscv32 and possibly two subclasses for the RISCV simulator" @@ -50,203 +48,203 @@ ProcessorSimulator class >> riscv64 [ "^ SpikeRISCVSimulator new" ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> simulatorFor: isa [ ^ (self subclasses detect: [ :each | each supportsISA: isa ]) perform: isa asSymbol ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> aliasForRegister: aRegisterName [ ^ registerAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> aliasSmalltalkForRegister: aRegisterName [ ^ registerSmalltalkAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0Register [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue [ ^ self readRegister: self arg0Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue: aValue [ ^ self writeRegister: self arg0Register value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1Register [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue [ ^ self readRegister: self arg1Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue: aValue [ ^ self writeRegister: self arg1Register value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue [ ^ self readRegister: self baseRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue: aValue [ ^ self writeRegister: self baseRegister value: aValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegister [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegisterValue [ ^ self readRegister: self cResultRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegisterValue: aValue [ self writeRegister: self cResultRegister value: aValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg0RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0RegisterValue [ ^ self readRegister: self carg0Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg1RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1RegisterValue [ ^ self readRegister: self carg1Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg2RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2RegisterValue [ ^ self readRegister: self carg2Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg3RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3RegisterValue [ ^ self readRegister: self carg3Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue [ ^ self readRegister: self classRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue: aValue [ ^ self writeRegister: self classRegister value: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> cogit [ ^ memory interpreter cogit ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleCurrentInstruction [ ^ (self disassembleFrom: self instructionPointerRegisterValue opcodes: 1) first ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ self disassembler @@ -257,7 +255,7 @@ ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ pc: self instructionPointerRegisterValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleFrom: start to: stop [ ^ self disassembler @@ -268,114 +266,114 @@ ProcessorSimulator >> disassembleFrom: start to: stop [ pc: self instructionPointerRegisterValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembler [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister0 value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister1 value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister2 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister2 value: aValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ ^ self subclassResponsibility ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> finishMappingMemory [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> flushICacheFrom: startAddress to: endAddress [ simulator removeInstructionCacheFrom: startAddress to: endAddress ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> fp [ ^ self framePointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> fp: aValue [ ^ self framePointerRegisterValue: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue [ ^ self readRegister: self framePointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue: aValue [ self writeRegister: self framePointerRegister value: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> getLastAddress: abstractInstructions [ | last | @@ -383,13 +381,13 @@ ProcessorSimulator >> getLastAddress: abstractInstructions [ ^ last address + last machineCodeSize ] -{ #category : 'testing' } +{ #category : #testing } ProcessorSimulator >> hasLinkRegister [ ^ false ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initialize [ super initialize. @@ -399,91 +397,91 @@ ProcessorSimulator >> initialize [ self initializeRegisterSmalltalkAliases. ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initializeRegisterAliases [ "Hook for subclasses" ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initializeRegisterSmalltalkAliases [ "Hook for subclasses" ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue [ ^ self readRegister: self instructionPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue: aValue [ ^ self writeRegister: self instructionPointerRegister value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> integerRegisterState [ ^ { } ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastExecutedInstructionAddress [ ^ simulator lastExecutedInstructionAddress ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastExecutedInstructionSize [ ^ simulator lastExecutedInstructionSize ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastInstructionCount [ ^ simulator lastInstructionCount ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue [ ^ self readRegister: self linkRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue: aValue [ ^ self writeRegister: self linkRegister value: aValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> lr [ ^ self linkRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> lr: aValue [ ^ self linkRegisterValue: aValue ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> mapMemory: aMemory at: anAddress [ simulator @@ -492,7 +490,7 @@ ProcessorSimulator >> mapMemory: aMemory at: anAddress [ withPermissions: UnicornConstants permissionAll. ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ aSlangMemoryManager regionsDo: [ :startAddress :region | @@ -502,42 +500,42 @@ ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ self finishMappingMemory. ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> memory [ ^ memory ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> memory: aSpur64BitMMLECoSimulator [ memory := aSpur64BitMMLECoSimulator ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> memoryAt: address readNext: byteSize [ ^ simulator memoryAt: address readNext: byteSize ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> memoryAt: address write: bytes size: size [ simulator memoryAt: address write: bytes size: size ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> pc [ ^ self instructionPointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> pc: aValue [ ^ self instructionPointerRegisterValue: aValue ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> peek [ | stackAddressIntegerValue peekedByteArray | @@ -551,13 +549,13 @@ ProcessorSimulator >> peek [ ^ peekedByteArray ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> peekAddress [ ^ self peek integerAt: 1 size: self wordSize signed: false ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> popBytes [ | stackAddressIntegerValue aByteArray | @@ -574,7 +572,7 @@ ProcessorSimulator >> popBytes [ ^ aByteArray ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> popWord [ | aByteArray | @@ -582,7 +580,7 @@ ProcessorSimulator >> popWord [ ^ aByteArray integerAt: 1 size: self wordSize signed: false. ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> pushBytes: aByteArray [ | stackAddressIntegerValue | @@ -603,7 +601,7 @@ ProcessorSimulator >> pushBytes: aByteArray [ ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> pushWord: anInteger [ | aByteArray | @@ -612,7 +610,7 @@ ProcessorSimulator >> pushWord: anInteger [ self pushBytes: aByteArray ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readFloat64Register: aRegisterID [ | registerValue | @@ -622,7 +620,7 @@ ProcessorSimulator >> readFloat64Register: aRegisterID [ ^ registerValue doubleAt: 1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ | registerValue | @@ -631,7 +629,7 @@ ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ ^ registerValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readRegister: aRegisterID [ | registerValue size | @@ -640,37 +638,37 @@ ProcessorSimulator >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: size signed: false ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue [ ^ self readRegister: self receiverRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue: anInteger [ self writeRegister: self receiverRegister value: anInteger ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> register: anIndex readInto: aByteArray [ simulator register: anIndex readInto: aByteArray ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerAliases [ ^ registerAliases ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerDescriptors [ ^ self registerList collect: [ :reg | @@ -682,98 +680,98 @@ ProcessorSimulator >> registerDescriptors [ yourself ] ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerList [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue [ ^ self readRegister: self sendNumberOfArgumentsRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue: aValue [ ^ self writeRegister: self sendNumberOfArgumentsRegister value: aValue ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegister [ "By default they are the same" ^ self stackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue [ ^ self readRegister: self smalltalkStackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue: aValue [ self writeRegister: self smalltalkStackPointerRegister value: aValue ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> smashRegisterAccessors [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smashRegistersWithValuesFrom: base by: step [ self smashRegisterAccessors withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> sp [ ^ self stackPointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> sp: aValue [ ^ self stackPointerRegisterValue: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue [ ^ self readRegister: self stackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue: aValue [ self writeRegister: self stackPointerRegister value: aValue ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> stackValueAt: anInteger [ "Get a value from the stack at a 0-base position" @@ -782,7 +780,7 @@ ProcessorSimulator >> stackValueAt: anInteger [ ^ aByteArray integerAt: 1 size: self wordSize signed: false ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> stackValueBytesAt: position [ "Get the bytes from the stack at a 0-base position" @@ -800,7 +798,7 @@ ProcessorSimulator >> stackValueBytesAt: position [ ^ aByteArray ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> stackValues [ | initialValue | @@ -811,14 +809,14 @@ ProcessorSimulator >> stackValues [ ] ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> startAt: begin until: until timeout: timeout count: count [ self subclassResponsibility ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> step [ self @@ -828,36 +826,36 @@ ProcessorSimulator >> step [ count: 1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue [ ^ self readRegister: self temporaryRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue: anInteger [ ^ self writeRegister: self temporaryRegister value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> wordAt: anInteger [ ^ memory longAt: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> wordSize [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ | value | @@ -867,7 +865,7 @@ ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st index f4b6a25c2b..7f3419228e 100644 --- a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st @@ -1,50 +1,49 @@ Class { - #name : 'RegisterDescriptor', - #superclass : 'Object', + #name : #RegisterDescriptor, + #superclass : #Object, #instVars : [ 'simulator', 'name', 'alias', 'smalltalkAlias' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> alias [ ^ alias ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> name [ ^ name ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -54,35 +53,35 @@ RegisterDescriptor >> printOn: aStream [ ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> smalltalkAlias [ ^ smalltalkAlias ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> smalltalkAlias: aString [ smalltalkAlias := aString ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/SmallInteger.extension.st b/smalltalksrc/VMMakerTests/SmallInteger.extension.st index d5f6ef6f2a..f6dcb4fca2 100644 --- a/smalltalksrc/VMMakerTests/SmallInteger.extension.st +++ b/smalltalksrc/VMMakerTests/SmallInteger.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'SmallInteger' } +Extension { #name : #SmallInteger } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } SmallInteger >> forMemory: aMemory inMethod: anObject [ (self > aMemory maxSmallInteger or: [ self < aMemory minSmallInteger ]) ifTrue: [ self halt ]. diff --git a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st index b5d4de558f..e75c5e91a4 100644 --- a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st +++ b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'SpurMemoryManager' } +Extension { #name : #SpurMemoryManager } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } SpurMemoryManager >> hiddenRootsObject: anInteger [ hiddenRootsObj := anInteger diff --git a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st index aec69a0f71..8fce0dcfbe 100644 --- a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st @@ -15,8 +15,8 @@ temp2 method " Class { - #name : 'StackBuilderTest', - #superclass : 'VMInterpreterTests', + #name : #StackBuilderTest, + #superclass : #VMInterpreterTests, #instVars : [ 'stackElement1', 'stackElement2', @@ -32,12 +32,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> addFullFrame [ | frame | @@ -71,78 +69,78 @@ StackBuilderTest >> addFullFrame [ ^ frame ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument1 [ ^ self offsetArgument2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument1FromBaseFP [ ^ self offsetArgument2FromBaseFP + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument2 [ "we skip the frame pointer" ^ self offsetMethod + 2 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument2FromBaseFP [ ^ 2 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetCallerFP [ ^ self offsetMethod + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetContext [ ^ self offsetFlags + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetFlags [ ^ self offsetReceiver + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetInstructionPointer [ ^ 0 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetMethod [ ^ self offsetContext + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetReceiver [ ^ self offsetTemp1 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetStackElement1 [ ^ self offsetStackElement2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetStackElement2 [ ^ self offsetInstructionPointer + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetTemp1 [ ^ self offsetTemp2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetTemp2 [ ^ self offsetStackElement1 + 1 ] -{ #category : 'running' } +{ #category : #running } StackBuilderTest >> setUp [ super setUp. @@ -157,14 +155,14 @@ StackBuilderTest >> setUp [ ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testCallerFrameOfTopFrameShouldBeSecondFrameBuilderObject [ "For debug purpose, we added a link to the caller frame in the current frame." self assert: (stackBuilder topFrame callerFrame) equals: (stackBuilder frames nextToLast) ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -172,7 +170,7 @@ StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ equals: stackBuilder frames second instructionPointer. ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ | frame | @@ -187,7 +185,7 @@ StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ | frame | @@ -202,7 +200,7 @@ StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -210,7 +208,7 @@ StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ "We have 3 frames. The caller of the top frame should be the middle one" @@ -218,7 +216,7 @@ StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPushed [ method := methodBuilder newMethod buildMethod. @@ -230,7 +228,7 @@ StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPu equals: (methodBuilder bytecodeAt: 0 forMethod: method) ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ | frame argNum | @@ -249,7 +247,7 @@ StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ self assert: frame argumentSize equals: argNum ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ | frame tempNum | @@ -270,37 +268,37 @@ StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ equals: (OrderedCollection new: tempNum withAll: memory nilObject) ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderArgument1InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument1FromBaseFP * memory bytesPerOop)) equals: argument1 ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderArgument2InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument2FromBaseFP * memory bytesPerOop)) equals: argument2 ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderContext [ self assert: (interpreter stackValue: self offsetContext) equals: context ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderMethod [ self assert: (interpreter stackValue: self offsetMethod) equals: method ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderReceiver [ self assert: (interpreter stackValue: self offsetReceiver) equals: receiver ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderStackElementIsReversed [ self assert: (interpreter stackValue: self offsetStackElement1) equals: stackElement1. @@ -308,7 +306,7 @@ StackBuilderTest >> testOrderStackElementIsReversed [ equals: stackElement2. ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ "When a process is suspended, the Instruction Pointer is pushed on the stack of the frame. It should be the last thing pushed, and therefore, be at the top. " @@ -316,7 +314,7 @@ StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ equals: instructionPointer. ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderTempIsReversed [ self assert: (interpreter stackValue: self offsetTemp1) equals: temp1. @@ -324,7 +322,7 @@ StackBuilderTest >> testOrderTempIsReversed [ equals: temp2. ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testPageHeadFPIsLastFrameFP [ "The FramePointer of the interpreter should be the FramePointer of the current process last pushed frame." self assert: interpreter framePointer diff --git a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st index f2768e954f..1ad516b356 100644 --- a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st +++ b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'StackToRegisterMappingCogit' } +Extension { #name : #StackToRegisterMappingCogit } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } StackToRegisterMappingCogit >> methodOrBlockNumTemps: anInteger [ methodOrBlockNumTemps := anInteger diff --git a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st index 6d460c8943..bbe289597b 100644 --- a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st +++ b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'UndefinedObject' } +Extension { #name : #UndefinedObject } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } UndefinedObject >> forMemory: aMemory inMethod: anObject [ ^ aMemory nilObject diff --git a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st index 386b5360a0..f2ff996e16 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st @@ -1,66 +1,64 @@ Class { - #name : 'UnicornARMv5Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornARMv5Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> arg0Register [ ^ UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> arg1Register [ ^ UcARMRegisters r4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> baseRegister [ ^ UcARMRegisters r10 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> cResultRegister [ ^ UcARMRegisters r0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg0Register [ ^ UcARMRegisters r0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg1Register [ ^ UcARMRegisters r1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg2Register [ ^ UcARMRegisters r2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg3Register [ ^ UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> classRegister [ ^ UcARMRegisters r8 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ anInteger < 0 ifFalse: [ ^ anInteger ]. @@ -68,7 +66,7 @@ UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ ^ 16rFFFFFFFF - anInteger abs + 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ (aTwoComplementNumber bitAnd: 1 << 31) = 0 ifTrue: [ @@ -77,7 +75,7 @@ UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ ^ aTwoComplementNumber - 16rFFFFFFFF - 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> createUnicorn [ "Enable Floating Point... @@ -114,13 +112,13 @@ UnicornARMv5Simulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv5Simulator >> disassembler [ ^ LLVMARMDisassembler armv7 ] -{ #category : 'executing' } +{ #category : #executing } UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | actualCount result error startTime remainingTimeout currentTime | @@ -176,25 +174,25 @@ UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout c self instructionPointerRegisterValue = until ifTrue: [ ^ result ]] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARMRegisters d0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARMRegisters d1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARMRegisters d2 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -205,42 +203,42 @@ UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> framePointerRegister [ ^ UcARMRegisters fp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornARMv5Simulator >> hasLinkRegister [ ^ true ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> instructionPointerRegister [ ^ UcARMRegisters pc ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> integerRegisterState [ ^ #() ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> linkRegister [ ^ UcARMRegisters lr ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -255,177 +253,177 @@ UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r0 [ ^ self readRegister: UcARMRegisters r0 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r0: anInteger [ ^ self writeRegister: UcARMRegisters r0 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r1 [ ^ self readRegister: UcARMRegisters r1 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r10 [ ^ self readRegister: UcARMRegisters r10 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r10: anInteger [ ^ self writeRegister: UcARMRegisters r10 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r11: anInteger [ ^ self writeRegister: UcARMRegisters r11 value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> r12 [ ^ self readRegister: UcARMRegisters r12 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r12: anInteger [ self writeRegister: UcARMRegisters r12 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r1: anInteger [ ^ self writeRegister: UcARMRegisters r1 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r2 [ ^ self readRegister: UcARMRegisters r2 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r2: anInteger [ ^ self writeRegister: UcARMRegisters r2 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r3 [ ^ self readRegister: UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r3: anInteger [ ^ self writeRegister: UcARMRegisters r3 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r4 [ ^ self readRegister: UcARMRegisters r4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r4: anInteger [ ^ self writeRegister: UcARMRegisters r4 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r5 [ ^ self readRegister: UcARMRegisters r5 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r5: anInteger [ ^ self writeRegister: UcARMRegisters r5 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r6 [ ^ self readRegister: UcARMRegisters r6 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r6: anInteger [ ^ self writeRegister: UcARMRegisters r6 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r7 [ ^ self readRegister: UcARMRegisters r7 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r7: anInteger [ ^ self writeRegister: UcARMRegisters r7 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r8 [ ^ self readRegister: UcARMRegisters r8 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r8: anInteger [ ^ self writeRegister: UcARMRegisters r8 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r9 [ ^ self readRegister: UcARMRegisters r9 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r9: anInteger [ ^ self writeRegister: UcARMRegisters r9 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> receiverRegister [ ^ UcARMRegisters r5 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> registerList [ ^ #(lr pc sp fp r0 r1 r2 r3 r4 r5 r6 r7 r8 r9) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> registerStateGetters [ ^#(r0 r1 r2 r3 r4) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> retpcIn: aMemory [ "The return address is on the stack, having been pushed by either simulateCallOf:nextpc:memory: or simulateJumpCallOf:memory:" ^memory longAt: self fp + 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> sendNumberOfArgumentsRegister [ ^ UcARMRegisters r6 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -440,40 +438,40 @@ UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ self pc: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self fp: self popWord. self pc: self popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(r0: r1: r2: r3: r9: r12: lr:) withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> smashRegisterAccessors [ ^ #(r0: r1: r2: r3:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> stackPointerRegister [ ^ UcARMRegisters sp ] -{ #category : 'executing' } +{ #category : #executing } UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: count [ begin == until ifTrue: [ ^ self ]. @@ -481,13 +479,13 @@ UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: cou ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> temporaryRegister [ ^ UcARMRegisters r2 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> wordSize [ ^ 4 ] diff --git a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st index 50b83cf1f2..bdda0e9ccd 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st @@ -1,96 +1,94 @@ Class { - #name : 'UnicornARMv8Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornARMv8Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg0Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg1Register [ ^ UcARM64Registers x1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg2Register [ ^ UcARM64Registers x2 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg3Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> baseRegister [ ^ UcARM64Registers x24 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> cResultRegister [ ^ UcARM64Registers x0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg0Register [ ^ UcARM64Registers x0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg1Register [ ^ UcARM64Registers x1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg2Register [ ^ UcARM64Registers x2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg3Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> carry [ ^ (self nzcv bitAnd: (1<<29))~= 0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> classRegister [ ^ UcARM64Registers x22 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1 [ ^ self readRegister: UcARM64Registers cpacr_el1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1: anInteger [ self writeRegister: UcARM64Registers cpacr_el1 value: anInteger ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornARMv8Simulator >> createUnicorn [ simulator := Unicorn arm64. @@ -99,31 +97,31 @@ UnicornARMv8Simulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv8Simulator >> disassembler [ ^ LLVMARMDisassembler aarch64 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARM64Registers d0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARM64Registers d1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARM64Registers d2 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -134,24 +132,24 @@ UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> framePointerRegister [ ^ UcARM64Registers fp ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornARMv8Simulator >> hasLinkRegister [ ^ true ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornARMv8Simulator >> initializeRegisterAliases [ registerAliases @@ -164,37 +162,37 @@ UnicornARMv8Simulator >> initializeRegisterAliases [ at: #x30 put: #linkRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> instructionPointerRegister [ ^ UcARM64Registers pc ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> linkRegister [ ^ UcARM64Registers x30 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> negative [ ^ (self nzcv bitAnd: (1<<31))~= 0 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> nzcv [ ^ self readRegister: UcARM64Registers nzcv ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> overflow [ ^ (self nzcv bitAnd: (1<<28)) ~= 0 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemory [ "" "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -208,37 +206,37 @@ UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemo ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> receiverRegister [ ^ UcARM64Registers x23 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv8Simulator >> registerList [ ^ #(lr pc sp fp x28 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x16 x19 x20 x22 x23 x24 x25 zero negative carry overflow v0 v1 v2) ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> registerStateGetters [ ^#( x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x12 sp lr pc) ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> retpcIn: aMemory [ ^ memory longAt: self fp + 8 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> sendNumberOfArgumentsRegister [ ^ UcARM64Registers x25 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -255,14 +253,14 @@ UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ self instructionPointerRegisterValue: address ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self framePointerRegisterValue: self popWord. @@ -272,13 +270,13 @@ UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> smalltalkStackPointerRegister [ "Internally to execute Smalltalk code we use X28 as the stack pointer register" ^ UcARM64Registers x28 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(x0: x1: x2: x3: x4: x5: lr:) withIndexDo: @@ -286,373 +284,373 @@ UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step self perform: accessor with: index - 1 * step + base] ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x0: x1: x2: x3: x4: x5: x6: x7: x8: x9: x10: x11: x12: ) ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> stackPointerRegister [ ^ UcARM64Registers sp ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> temporaryRegister [ ^ UcARM64Registers x1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v0 [ ^ self readRawRegister: UcARM64Registers v0 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v1 [ ^ self readRawRegister: UcARM64Registers v1 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v2 [ ^ self readRawRegister: UcARM64Registers v2 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcARM64Registers v0 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister1Value [ ^ simulator readRegisterId: UcARM64Registers v1 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister2Value [ ^ simulator readRegisterId: UcARM64Registers v2 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> w25: anInteger [ self writeRegister: UcARM64Registers w25 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> w6: anInteger [ self writeRegister: UcARM64Registers w6 value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv8Simulator >> wordSize [ ^ 8 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x0 [ ^ self readRegister: UcARM64Registers x0 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x0: anInteger [ self writeRegister: UcARM64Registers x0 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x1 [ ^ self readRegister: UcARM64Registers x1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x10 [ ^ self readRegister: UcARM64Registers x10 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x10: anInteger [ ^ self writeRegister: UcARM64Registers x10 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x11 [ ^ self readRegister: UcARM64Registers x11 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x11: anInteger [ ^ self writeRegister: UcARM64Registers x11 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x12 [ ^ self readRegister: UcARM64Registers x12 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x12: anInteger [ ^ self writeRegister: UcARM64Registers x12 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x13: anInteger [ self writeRegister: UcARM64Registers x13 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x14: anInteger [ self writeRegister: UcARM64Registers x14 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x15: anInteger [ self writeRegister: UcARM64Registers x15 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x16 [ ^ self readRegister: UcARM64Registers x16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x16: anInteger [ self writeRegister: UcARM64Registers x16 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x17: anInteger [ self writeRegister: UcARM64Registers x17 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x18: anInteger [ self writeRegister: UcARM64Registers x18 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x19 [ ^ self readRegister: UcARM64Registers x19 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x19: anInteger [ self writeRegister: UcARM64Registers x19 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x1: anInteger [ ^ self writeRegister: UcARM64Registers x1 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x2 [ ^ self readRegister: UcARM64Registers x2 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x20 [ ^ self readRegister: UcARM64Registers x20 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x22 [ ^ self readRegister: UcARM64Registers x22 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x23 [ ^ self readRegister: UcARM64Registers x23 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x23: anInteger [ self writeRegister: UcARM64Registers x23 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x24 [ ^ self readRegister: UcARM64Registers x24 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x24: anInteger [ self writeRegister: UcARM64Registers x24 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x25 [ ^ self readRegister: UcARM64Registers x25 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x25: anInteger [ self writeRegister: UcARM64Registers x25 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x28 [ ^ self readRegister: UcARM64Registers x28 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x28: anInteger [ self writeRegister: UcARM64Registers x28 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x29: anInteger [ ^ self writeRegister: UcARM64Registers x29 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x2: anInteger [ ^ self writeRegister: UcARM64Registers x2 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x3 [ ^ self readRegister: UcARM64Registers x3 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x30: anInteger [ self writeRegister: UcARM64Registers x30 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x3: anInteger [ ^ self writeRegister: UcARM64Registers x3 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x4 [ ^ self readRegister: UcARM64Registers x4 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x4: anInteger [ ^ self writeRegister: UcARM64Registers x4 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x5 [ ^ self readRegister: UcARM64Registers x5 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x5: anInteger [ ^ self writeRegister: UcARM64Registers x5 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x6 [ ^ self readRegister: UcARM64Registers x6 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x6: anInteger [ ^ self writeRegister: UcARM64Registers x6 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x7 [ ^ self readRegister: UcARM64Registers x7 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x7: anInteger [ ^ self writeRegister: UcARM64Registers x7 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x8 [ ^ self readRegister: UcARM64Registers x8 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x8: anInteger [ ^ self writeRegister: UcARM64Registers x8 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x9 [ ^ self readRegister: UcARM64Registers x9 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x9: anInteger [ ^ self writeRegister: UcARM64Registers x9 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> xzr [ ^ self readRegister: UcARM64Registers xzr ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> xzr: anInteger [ ^ self writeRegister: UcARM64Registers xzr value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> zero [ ^ (self nzcv bitAnd: (1<<30)) ~= 0 diff --git a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st index 539e97b80e..3130e440a5 100644 --- a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st @@ -1,193 +1,191 @@ Class { - #name : 'UnicornI386Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornI386Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> arg0Register [ ^ UcX86Registers esi ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> baseRegister [ ^ UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> cResultRegister [ ^ UcX86Registers eax ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg0 [ "Stack value 0 is return address" ^ self stackValueAt: 1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg1 [ "Stack value 0 is return address" ^ self stackValueAt: 2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg2 [ "Stack value 0 is return address" ^ self stackValueAt: 3 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg3 [ "Stack value 0 is return address" ^ self stackValueAt: 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> classRegister [ ^ UcX86Registers ecx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> createUnicorn [ ^ Unicorn x86 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornI386Simulator >> disassembler [ ^ LLVMDisassembler i386 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> eax [ ^ self readRegister: UcX86Registers eax ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eax: anInteger [ self writeRegister: UcX86Registers eax value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ebp [ ^ self readRegister: UcX86Registers ebp ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ebp: anInteger [ self framePointerRegisterValue: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ebx [ ^ self readRegister: UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ebx: anInteger [ self writeRegister: UcX86Registers ebx value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ecx [ ^ self readRegister: UcX86Registers ecx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ecx: anInteger [ self writeRegister: UcX86Registers ecx value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> edi [ ^ self readRegister: UcX86Registers edi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> edi: anInteger [ self writeRegister: UcX86Registers edi value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> edx [ ^ self readRegister: UcX86Registers edx ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> edx: anInteger [ ^ self writeRegister: UcX86Registers edx value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eflags [ ^ self readRegister: UcX86Registers eflags ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> eip [ ^ self readRegister: UcX86Registers eip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eip: anInteger [ self writeRegister: UcX86Registers eip value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> esi [ ^ self readRegister: UcX86Registers esi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> esi: anInteger [ self writeRegister: UcX86Registers esi value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> esp [ ^ self readRegister: UcX86Registers esp ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> esp: anInteger [ self stackPointerRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -197,38 +195,38 @@ UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> framePointerRegister [ ^ UcX86Registers ebp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> hasLinkRegister [ ^ false ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> instructionPointerRegister [ ^ UcX86Registers eip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> integerRegisterState [ ^{ self eax. self ebx. self ecx. self edx. self esp. self ebp. self esi. self edi. self eip. self eflags } ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. On IA32 this typically means accessing stacked arguments @@ -239,31 +237,31 @@ UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ memory longAt: self ebp + i ] ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> receiverRegister [ ^ UcX86Registers edx ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> registerList [ ^ #(eip eax ebx ecx edx esp ebp esi edi) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> retpcIn: aMemory [ ^ memory longAt: self ebp + 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -275,21 +273,21 @@ UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ self eip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self eip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateReturnIn: aMemory [ self ebp: self popWord. self eip: self popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(eax: ecx: edx:) withIndexDo: @@ -297,26 +295,26 @@ UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step i self perform: accessor with: index - 1 * step + base] ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> smashRegisterAccessors [ ^#(eax: ebx: ecx: edx: esi: edi:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> stackPointerRegister [ ^ UcX86Registers esp ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> temporaryRegister [ "Assume SysV" ^ UcX86Registers eax ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> wordSize [ ^ 4 diff --git a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st index be91859d3a..8931a8e659 100644 --- a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st +++ b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st @@ -1,65 +1,63 @@ Class { - #name : 'UnicornInvalidMemoryAccess', - #superclass : 'Error', + #name : #UnicornInvalidMemoryAccess, + #superclass : #Error, #instVars : [ 'type', 'address', 'size', 'value' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> address [ ^ address ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> address: anObject [ address := anObject ] -{ #category : 'testing' } +{ #category : #testing } UnicornInvalidMemoryAccess >> isFetch [ ^ self type value anyMask: UcMemoryAccessType UC_MEM_FETCH value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> messageText [ ^ type item asString, ' at ', address hex ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> size [ ^ size ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> size: anObject [ size := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> type [ ^ type ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> type: anObject [ type := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> value [ ^ value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> value: anObject [ value := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st index 43e7716bc9..474a23f736 100644 --- a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st @@ -1,106 +1,104 @@ Class { - #name : 'UnicornProcessor', - #superclass : 'Object', + #name : #UnicornProcessor, + #superclass : #Object, #instVars : [ 'machineSimulator' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> cResultRegister [ ^ machineSimulator cResultRegisterValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> cResultRegister: anInteger [ machineSimulator cResultRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> convertIntegerToInternal: anInteger [ ^ machineSimulator convertIntegerToInternal: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> convertInternalToInteger: anInteger [ ^ machineSimulator convertInternalToInteger: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> eax: anInteger [ machineSimulator eax: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ebp: anInteger [ machineSimulator ebp: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ebx: anInteger [ machineSimulator ebx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ecx: anInteger [ machineSimulator ecx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> edi: anInteger [ machineSimulator edi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> edx: anInteger [ ^ machineSimulator edx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> esp: anInteger [ machineSimulator esp: anInteger ] -{ #category : 'caching' } +{ #category : #caching } UnicornProcessor >> flushICacheFrom: startAddress to: endAddress [ "Do nothing for now..." machineSimulator flushICacheFrom: startAddress to: endAddress ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> fp [ ^ machineSimulator framePointerRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> fp: aValue [ ^ machineSimulator framePointerRegisterValue: aValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> hasLinkRegister [ ^ machineSimulator hasLinkRegister ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> initializeStackFor: aCompiler [ "Initialize the machine code simulator" @@ -111,192 +109,192 @@ UnicornProcessor >> initializeStackFor: aCompiler [ aCompiler backend configureStackAlignment ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> integerRegisterState [ ^ machineSimulator integerRegisterState ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> linkRegisterValue [ ^ machineSimulator linkRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> lr: anInteger [ machineSimulator lr: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> machineSimulator [ ^ machineSimulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> machineSimulator: aMachineSimulator [ machineSimulator := aMachineSimulator ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> pc [ ^ machineSimulator instructionPointerRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> pc: anInteger [ ^ machineSimulator instructionPointerRegisterValue: anInteger ] -{ #category : 'stack-management' } +{ #category : #'stack-management' } UnicornProcessor >> popWord [ ^ machineSimulator popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory [ ^ machineSimulator postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory ] -{ #category : 'stack-management' } +{ #category : #'stack-management' } UnicornProcessor >> pushWord: anInteger [ machineSimulator pushWord: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r0: anInteger [ ^ machineSimulator r0: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r10: anInteger [ machineSimulator r10: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r11: anInteger [ machineSimulator r11: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r1: anInteger [ ^ machineSimulator r1: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r2: anInteger [ machineSimulator r2: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r3: anInteger [ machineSimulator r3: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r4: anInteger [ machineSimulator r4: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r5: anInteger [ machineSimulator r5: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r6: anInteger [ machineSimulator r6: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r8 [ ^ machineSimulator r8 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r8: anInteger [ machineSimulator r8: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r9: anInteger [ machineSimulator r9: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r9b: anInteger [ machineSimulator r9b: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rax: anInteger [ machineSimulator rax: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rbp: anInteger [ machineSimulator rbp: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rcx: anInteger [ machineSimulator rcx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> rdi: anInteger [ machineSimulator rdi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rdx: anInteger [ machineSimulator rdx: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> retpcIn: aSpurSimulatedMemory [ ^ machineSimulator retpcIn: aSpurSimulatedMemory ] -{ #category : 'accessing registers' } +{ #category : #'accessing registers' } UnicornProcessor >> rsi: anInteger [ ^ machineSimulator rsi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rsp: anInteger [ machineSimulator rsp: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnlyBelow: minimumWritableAddress [ @@ -306,7 +304,7 @@ UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnly count: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> runUntil: anAddress [ ^ machineSimulator startAt: machineSimulator instructionPointerRegisterValue @@ -315,165 +313,165 @@ UnicornProcessor >> runUntil: anAddress [ count: 0 ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornProcessor >> setFramePointer: framePointer stackPointer: stackPointer [ machineSimulator framePointerRegisterValue: framePointer. machineSimulator stackPointerRegisterValue: stackPointer ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory [ machineSimulator simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ machineSimulator simulateLeafCallOf: address nextpc: nextpc memory: aMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateReturnIn: aSpurSimulatedMemory [ ^ machineSimulator simulateReturnIn: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory [ machineSimulator smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> smashRegistersWithValuesFrom: base by: step [ machineSimulator smashRegistersWithValuesFrom: base by: step ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> sp [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> sp: anInteger [ machineSimulator stackPointerRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> w25: anInteger [ machineSimulator w25: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> w6: anInteger [ machineSimulator w6: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x12: anInteger [ machineSimulator x12: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x16: anInteger [ machineSimulator x16: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x19: anInteger [ machineSimulator x19: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x1: anInteger [ machineSimulator x1: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x23: anInteger [ machineSimulator x23: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x24: anInteger [ machineSimulator x24: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x25: anInteger [ machineSimulator x25: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x28: anInteger [ machineSimulator x28: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x29: anInteger [ machineSimulator x29: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x30: anInteger [ machineSimulator x30: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x3: anInteger [ machineSimulator x3: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x4: anInteger [ machineSimulator x4: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x5: anInteger [ machineSimulator x5: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x6: anInteger [ machineSimulator x6: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x7: anInteger [ machineSimulator x7: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> xzr [ ^ machineSimulator xzr ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> xzr: anInteger [ machineSimulator xzr: anInteger diff --git a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st index 2895ec60c8..c65b477cae 100644 --- a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st @@ -1,66 +1,64 @@ Class { - #name : 'UnicornRISCVSimulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornRISCVSimulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> arg0Register [ ^ UcRISCVRegisters x10 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> arg1Register [ ^ UcRISCVRegisters x11 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> baseRegister [ ^ UcRISCVRegisters x26 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> cResultRegister [ ^ UcRISCVRegisters x12 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg0Register [ ^ UcRISCVRegisters x12 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg1Register [ ^ UcRISCVRegisters x13 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg2Register [ ^ UcRISCVRegisters x14 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg3Register [ ^ UcRISCVRegisters x15 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> classRegister [ ^ UcRISCVRegisters x23 ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornRISCVSimulator >> createUnicorn [ simulator := Unicorn riscv64. @@ -69,290 +67,290 @@ UnicornRISCVSimulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> disassembler [ ^ LLVMRV64Disassembler riscv64 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister0 [ ^ UcRISCVRegisters f0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister1 [ ^ UcRISCVRegisters f1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister2 [ ^ UcRISCVRegisters f2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f0 [ ^ self readRegister: UcRISCVRegisters f0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f1 [ ^ self readRegister: UcRISCVRegisters f1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f10 [ ^ self readRegister: UcRISCVRegisters f10 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f11 [ ^ self readRegister: UcRISCVRegisters f11 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f12 [ ^ self readRegister: UcRISCVRegisters f12 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f13 [ ^ self readRegister: UcRISCVRegisters f13 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f14 [ ^ self readRegister: UcRISCVRegisters f14 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f15 [ ^ self readRegister: UcRISCVRegisters f15 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f16 [ ^ self readRegister: UcRISCVRegisters f16 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f17 [ ^ self readRegister: UcRISCVRegisters f17 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f18 [ ^ self readRegister: UcRISCVRegisters f18 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f19 [ ^ self readRegister: UcRISCVRegisters f19 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f2 [ ^ self readRegister: UcRISCVRegisters f2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f20 [ ^ self readRegister: UcRISCVRegisters f20 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f21 [ ^ self readRegister: UcRISCVRegisters f21 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f22 [ ^ self readRegister: UcRISCVRegisters f22 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f23 [ ^ self readRegister: UcRISCVRegisters f23 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f24 [ ^ self readRegister: UcRISCVRegisters f24 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f25 [ ^ self readRegister: UcRISCVRegisters f25 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f26 [ ^ self readRegister: UcRISCVRegisters f26 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f27 [ ^ self readRegister: UcRISCVRegisters f27 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f28 [ ^ self readRegister: UcRISCVRegisters f28 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f29 [ ^ self readRegister: UcRISCVRegisters f29 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f3 [ ^ self readRegister: UcRISCVRegisters f3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f30 [ ^ self readRegister: UcRISCVRegisters f30 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f31 [ ^ self readRegister: UcRISCVRegisters f31 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f4 [ ^ self readRegister: UcRISCVRegisters f4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f5 [ ^ self readRegister: UcRISCVRegisters f5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f6 [ ^ self readRegister: UcRISCVRegisters f6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f7 [ ^ self readRegister: UcRISCVRegisters f7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f8 [ ^ self readRegister: UcRISCVRegisters f8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f9 [ ^ self readRegister: UcRISCVRegisters f9 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagCarryRegister [ ^ UcRISCVRegisters x31 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagCarryRegisterValue [ ^ self readRegister: self flagCarryRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegister [ ^ UcRISCVRegisters x30 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegisterValue [ ^ self readRegister: self flagOverflowRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagSignRegister [ ^ UcRISCVRegisters x29 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagSignRegisterValue [ ^ self readRegister: self flagSignRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagZeroRegister [ ^ UcRISCVRegisters x28 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagZeroRegisterValue [ ^ self readRegister: self flagZeroRegister ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> framePointerRegister [ "Frame Pointer" ^ UcRISCVRegisters x8 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornRISCVSimulator >> hasLinkRegister [ ^ true ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> initializeRegisterAliases [ registerAliases @@ -398,7 +396,7 @@ UnicornRISCVSimulator >> initializeRegisterAliases [ at: #f7 put: #ft7 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ registerSmalltalkAliases @@ -427,43 +425,43 @@ UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ at: #x31 put: #carry ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> instructionPointerRegister [ ^ UcRISCVRegisters pc ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> linkRegister [ ^ UcRISCVRegisters x1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatus [ ^ UcRISCVRegisters mstatus ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue [ ^ self readRegister: self mstatus ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue: aValue [ ^ self writeRegister: self mstatus value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> receiverRegister [ ^ UcRISCVRegisters x24 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRISCVSimulator >> registerList [ ^ #(lr pc sp fp @@ -472,375 +470,375 @@ UnicornRISCVSimulator >> registerList [ f0 f1 f2 f3 f4 f5 f6 f7) ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s0 [ ^ self readRegister: UcRISCVRegisters s0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s0: aValue [ ^ self writeRegister: UcRISCVRegisters s0 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s2 [ ^ self readRegister: UcRISCVRegisters s2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s2: aValue [ ^ self writeRegister: UcRISCVRegisters s2 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s7 [ ^ self readRegister: UcRISCVRegisters s7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s7: aValue [ ^ self writeRegister: UcRISCVRegisters s7 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s8 [ ^ self readRegister: UcRISCVRegisters s8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s8: aValue [ ^ self writeRegister: UcRISCVRegisters s8 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s9 [ ^ self readRegister: UcRISCVRegisters s9 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s9: aValue [ ^ self writeRegister: UcRISCVRegisters s9 value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> sendNumberOfArgumentsRegister [ ^ UcRISCVRegisters x25 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> simulateLeafCallOf: destinationAddress nextpc: returnAddress memory: anUndefinedObject [ self linkRegisterValue: returnAddress. self instructionPointerRegisterValue: destinationAddress ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x1: x5: x6: x7: x10: x11: x12: x13: x14: x15: x16: x17: x28: x29: x30: x31:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> stackPointerRegister [ ^ UcRISCVRegisters x2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t0 [ ^ self readRegister: UcRISCVRegisters t0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t0: aValue [ ^ self writeRegister: UcRISCVRegisters t0 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t1 [ ^ self readRegister: UcRISCVRegisters t1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t1: aValue [ ^ self writeRegister: UcRISCVRegisters t1 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t2 [ ^ self readRegister: UcRISCVRegisters t2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t2: aValue [ ^ self writeRegister: UcRISCVRegisters t2 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t3 [ ^ self readRegister: UcRISCVRegisters t3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t3: aValue [ ^ self writeRegister: UcRISCVRegisters t3 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t4 [ ^ self readRegister: UcRISCVRegisters t4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t4: aValue [ ^ self writeRegister: UcRISCVRegisters t4 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t5 [ ^ self readRegister: UcRISCVRegisters t5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t5: aValue [ ^ self writeRegister: UcRISCVRegisters t5 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t6 [ ^ self readRegister: UcRISCVRegisters t6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t6: aValue [ ^ self writeRegister: UcRISCVRegisters t6 value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> temporaryRegister [ ^ UcRISCVRegisters x22 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRISCVSimulator >> wordSize [ ^ 8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x0 [ ^ self readRegister: UcRISCVRegisters x0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x1 [ ^ self readRegister: UcRISCVRegisters x1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x10 [ ^ self readRegister: UcRISCVRegisters x10 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x11 [ ^ self readRegister: UcRISCVRegisters x11 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x12 [ ^ self readRegister: UcRISCVRegisters x12 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x13 [ ^ self readRegister: UcRISCVRegisters x13 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x14 [ ^ self readRegister: UcRISCVRegisters x14 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x15 [ ^ self readRegister: UcRISCVRegisters x15 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x16 [ ^ self readRegister: UcRISCVRegisters x16 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x17 [ ^ self readRegister: UcRISCVRegisters x17 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x18 [ ^ self readRegister: UcRISCVRegisters x18 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x19 [ ^ self readRegister: UcRISCVRegisters x19 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x2 [ ^ self readRegister: UcRISCVRegisters x2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x20 [ ^ self readRegister: UcRISCVRegisters x20 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x21 [ ^ self readRegister: UcRISCVRegisters x21 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x22 [ ^ self readRegister: UcRISCVRegisters x22 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x23 [ ^ self readRegister: UcRISCVRegisters x23 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x24 [ ^ self readRegister: UcRISCVRegisters x24 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x25 [ ^ self readRegister: UcRISCVRegisters x25 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x26 [ ^ self readRegister: UcRISCVRegisters x26 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x27 [ ^ self readRegister: UcRISCVRegisters x27 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x28 [ ^ self readRegister: UcRISCVRegisters x28 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x29 [ ^ self readRegister: UcRISCVRegisters x29 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x3 [ ^ self readRegister: UcRISCVRegisters x3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x30 [ ^ self readRegister: UcRISCVRegisters x30 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x31 [ ^ self readRegister: UcRISCVRegisters x31 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x4 [ ^ self readRegister: UcRISCVRegisters x4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x5 [ ^ self readRegister: UcRISCVRegisters x5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x6 [ ^ self readRegister: UcRISCVRegisters x6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x7 [ ^ self readRegister: UcRISCVRegisters x7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x8 [ ^ self readRegister: UcRISCVRegisters x8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x9 [ ^ self readRegister: UcRISCVRegisters x9 diff --git a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st index 401ef8c3e9..4302fb7c83 100644 --- a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st @@ -1,50 +1,48 @@ Class { - #name : 'UnicornRegisterDescriptor', - #superclass : 'Object', + #name : #UnicornRegisterDescriptor, + #superclass : #Object, #instVars : [ 'simulator', 'name', 'alias' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> alias [ ^ alias ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> name [ ^ name ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -54,23 +52,23 @@ UnicornRegisterDescriptor >> printOn: aStream [ ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st index cd421437e1..0b5790d901 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st @@ -1,16 +1,14 @@ Class { - #name : 'UnicornSimulationTrap', - #superclass : 'Object', + #name : #UnicornSimulationTrap, + #superclass : #Object, #instVars : [ 'unicornInvalidAccess', 'simulator' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemoryAccess [ ^ self new @@ -19,13 +17,13 @@ UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemor yourself ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> address [ ^ unicornInvalidAccess address ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> nextpc [ | instruction | @@ -33,7 +31,7 @@ UnicornSimulationTrap >> nextpc [ ^ self simulator instructionPointerRegisterValue + instruction size ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> registerAccessor [ "Assume this is a read of a value into a register" @@ -46,18 +44,18 @@ UnicornSimulationTrap >> registerAccessor [ ^ (registerName , ':') asSymbol ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> type [ unicornInvalidAccess type = UcMemoryAccessType UC_MEM_WRITE_UNMAPPED @@ -70,12 +68,12 @@ UnicornSimulationTrap >> type [ self halt ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> unicornInvalidAccess: anUnicornInvalidMemoryAccess [ unicornInvalidAccess := anUnicornInvalidMemoryAccess ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> writtenValue [ "This is the value that was tried to be written but failed (if this is a failed write)" ^ unicornInvalidAccess value diff --git a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st index fc5d4a2eff..c8194d7391 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st @@ -1,28 +1,26 @@ Class { - #name : 'UnicornSimulator', - #superclass : 'ProcessorSimulator', + #name : #UnicornSimulator, + #superclass : #ProcessorSimulator, #instVars : [ 'stopReason', 'invalidAccessHandler' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } UnicornSimulator class >> supportsISA: isa [ ^ #( #ARMv5 #ARMv8 #IA32 #X64 #aarch64 #riscv64 ) includes: isa ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> createUnicorn [ self subclassResponsibility ] -{ #category : 'executing' } +{ #category : #executing } UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | result error startTime currentTime remainingTimeout remainingCount | @@ -73,13 +71,13 @@ UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: ifTrue: [ ^ result ]] ] -{ #category : 'stack-access' } +{ #category : #'stack-access' } UnicornSimulator >> finishMappingMemory [ "Do nothing in the case of Unicorn, is useful if the simulator used has to map memory by hand" ] -{ #category : 'handling invalid accesses' } +{ #category : #'handling invalid accesses' } UnicornSimulator >> handleInvalidAccess: invalidAccess [ | previousInstructionPointer hasToContinue | @@ -97,7 +95,7 @@ UnicornSimulator >> handleInvalidAccess: invalidAccess [ ^ hasToContinue ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> initialize [ super initialize. @@ -112,7 +110,7 @@ UnicornSimulator >> initialize [ true] ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> initializeUnicorn [ simulator @@ -128,12 +126,12 @@ UnicornSimulator >> initializeUnicorn [ false ] ] -{ #category : 'handling invalid accesses' } +{ #category : #'handling invalid accesses' } UnicornSimulator >> invalidAccessHandler: aFullBlockClosure [ invalidAccessHandler := aFullBlockClosure ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ simulator @@ -142,7 +140,7 @@ UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ address = anAddress ifTrue: [ aBlock value ] ] ] -{ #category : 'executing' } +{ #category : #executing } UnicornSimulator >> startAt: begin until: until timeout: timeout count: count [ ^ self doStartAt: begin until: until timeout: timeout count: count. diff --git a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st index e070ae5e0a..12be3bf4bf 100644 --- a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st +++ b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st @@ -1,20 +1,18 @@ Class { - #name : 'UnicornTimeout', - #superclass : 'Error', + #name : #UnicornTimeout, + #superclass : #Error, #instVars : [ 'target' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornTimeout >> target [ ^ target ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornTimeout >> target: anObject [ target := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st index 4dfd2f5b9d..d7176e7d9a 100644 --- a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st @@ -1,100 +1,98 @@ Class { - #name : 'UnicornX64Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornX64Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> arg0Register [ ^ UcX86Registers rdi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> arg1Register [ ^ UcX86Registers rsi ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> baseRegister [ ^ UcX86Registers rbx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> cResultRegister [ ^ UcX86Registers rax ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg0Register [ "Assume SysV" ^ UcX86Registers rdi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg1Register [ "Assume SysV" ^ UcX86Registers rsi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg2Register [ "Assume SysV" ^ UcX86Registers rdx ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg3Register [ "Assume SysV" ^ UcX86Registers rcx ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> classRegister [ ^ UcX86Registers rcx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> createUnicorn [ ^ Unicorn x8664 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornX64Simulator >> disassembler [ ^ LLVMDisassembler amd64 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcX86Registers xmm1 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcX86Registers xmm2 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -104,25 +102,25 @@ UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> framePointerRegister [ ^ UcX86Registers rbp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : 'testing' } +{ #category : #testing } UnicornX64Simulator >> hasLinkRegister [ ^ false ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornX64Simulator >> initializeRegisterAliases [ registerAliases @@ -133,19 +131,19 @@ UnicornX64Simulator >> initializeRegisterAliases [ at: #rbp put: #framePointerRegister ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> instructionPointerRegister [ ^ UcX86Registers rip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> integerRegisterState [ ^ #() ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a Win64 or SysV ABI call. On X64 this simply means accessing register arguments. @@ -160,266 +158,266 @@ UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ self perform: getter] ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r10 [ ^ self readRegister: UcX86Registers r10 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r10: anInteger [ ^ self writeRegister: UcX86Registers r10 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r11 [ ^ self readRegister: UcX86Registers r11 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r11: anInteger [ ^ self writeRegister: UcX86Registers r11 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r12 [ ^ self readRegister: UcX86Registers r12 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r12: anInteger [ ^ self writeRegister: UcX86Registers r12 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r13: anInteger [ self writeRegister: UcX86Registers r13 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r14: anInteger [ self writeRegister: UcX86Registers r14 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r15: anInteger [ self writeRegister: UcX86Registers r15 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r1: anInteger [ ^ self writeRegister: UcX86Registers r1 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r2: anInteger [ ^ self writeRegister: UcX86Registers r2 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r3: anInteger [ ^ self writeRegister: UcX86Registers r3 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r4: anInteger [ ^ self writeRegister: UcX86Registers r4 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r5: anInteger [ ^ self writeRegister: UcX86Registers r5 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r6: anInteger [ ^ self writeRegister: UcX86Registers r6 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r7: anInteger [ ^ self writeRegister: UcX86Registers r7 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r8 [ ^ self readRegister: UcX86Registers r8 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r8: anInteger [ ^ self writeRegister: UcX86Registers r8 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r9 [ ^ self readRegister: UcX86Registers r9 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r9: anInteger [ ^ self writeRegister: UcX86Registers r9 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r9b: anInteger [ self writeRegister: UcX86Registers r9b value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rax [ ^ self readRegister: UcX86Registers rax ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rax: anInteger [ self writeRegister: UcX86Registers rax value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbp [ ^ self readRegister: UcX86Registers rbp ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbp: anInteger [ ^ self writeRegister: UcX86Registers rbp value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbx [ ^ self readRegister: UcX86Registers rbx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbx: aValue [ ^ self writeRegister: UcX86Registers rbx value: aValue ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rcx [ ^ self readRegister: UcX86Registers rcx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rcx: anInteger [ ^ self writeRegister: UcX86Registers rcx value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdi [ ^ self readRegister: UcX86Registers rdi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rdi: anInteger [ self writeRegister: UcX86Registers rdi value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdx [ ^ self readRegister: UcX86Registers rdx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdx: anInteger [ ^ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> receiverRegister [ ^ UcX86Registers rdx ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> registerList [ ^ #(rip rax rbx rcx rdx rsp rbp r8 r9 r10 r11 r12 rsi rdi) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> retpcIn: aSpurSimulatedMemory [ ^ memory long64At: self rbp + 8 ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rip [ ^ self readRegister: UcX86Registers rip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rip: anInteger [ self writeRegister: UcX86Registers rip value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsi [ ^ self readRegister: UcX86Registers rsi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rsi: anInteger [ self writeRegister: UcX86Registers rsi value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsp [ ^ self readRegister: UcX86Registers rsp ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsp: anInteger [ ^ self writeRegister: UcX86Registers rsp value: anInteger ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers r9 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -439,21 +437,21 @@ UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ self rip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self rip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateReturnIn: aMemory [ self rbp: (self popWord). self rip: (self popWord) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ | volatileRegisters | CogX64Compiler isSysV @@ -471,50 +469,50 @@ UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in self perform: setter with: index - 1 * step + base] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> smashRegisterAccessors [ ^#(rax: rbx: rcx: rdx: rsi: rdi: r8: r9: r10: r11: r12: r13: r14: r15:) ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> stackPointerRegister [ ^ UcX86Registers rsp ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> temporaryRegister [ "Both in System V and Windows" ^ UcX86Registers rax ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> wordSize [ ^ 8 ] -{ #category : 'accessing - registers' } +{ #category : #'accessing - registers' } UnicornX64Simulator >> xmm0 [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> xmm1 [ ^ simulator readRegisterId: UcX86Registers xmm1 size: 16 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> xmm2 [ ^ simulator readRegisterId: UcX86Registers xmm2 size: 16 diff --git a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st index 386f10c484..a4cd67ccdf 100644 --- a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMARMStackAlignmentTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMARMStackAlignmentTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'instructions' ], #pools : [ 'CogAbstractRegisters' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMStackAlignmentTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -20,25 +18,25 @@ VMARMStackAlignmentTest class >> wordSizeParameters [ yourself ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> addInstruction: anInstruction [ instructions add: anInstruction ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> disassembleInstructions [ ^ self disassembleFrom: cogInitialAddress opcodes: instructions size ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> runInstructions [ ^ self runFrom: cogInitialAddress until: cogInitialAddress + (instructions size * 4) ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> setUp [ super setUp. @@ -47,7 +45,7 @@ VMARMStackAlignmentTest >> setUp [ machineSimulator stackPointerRegisterValue: interpreter rumpCStackAddress ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ "To start the stack pointer should be aligned" @@ -98,7 +96,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ equals: 'Unhandled CPU exception (UC_ERR_EXCEPTION)' ] ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ "To start the stack pointer should be aligned" @@ -137,7 +135,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> writeInstructions [ cogInitialAddress := cogit methodZone allocate: instructions size * 4 . diff --git a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st index 522508bad7..82faa50100 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMARMV8SIMDEncodingTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMARMV8SIMDEncodingTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMV8SIMDEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -14,7 +12,7 @@ VMARMV8SIMDEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> armInstructionAt: index [ | addr inst | @@ -24,20 +22,20 @@ VMARMV8SIMDEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : 'configuration' } +{ #category : #configuration } VMARMV8SIMDEncodingTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : 'accessing' } +{ #category : #accessing } VMARMV8SIMDEncodingTest >> initializationOptions [ ^ super initializationOptions , { #ProcessorClass . DummyProcessor } ] -{ #category : 'accessing' } +{ #category : #accessing } VMARMV8SIMDEncodingTest >> jitOptions [ ^ super jitOptions @@ -46,7 +44,7 @@ VMARMV8SIMDEncodingTest >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ self compile: [ cogit DupS: 64 R: 3 Vr: 0 ]. @@ -56,7 +54,7 @@ VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ equals: 'dup v0.2d, x3' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ self compile: [ cogit FaddS: 32 Rv: 0 Rv: 1 Rv: 2 ]. @@ -66,7 +64,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ equals: 'fadd v2.4s, v0.4s, v1.4s' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ self compile: [ cogit FaddS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -76,7 +74,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ equals: 'fadd v2.2d, v0.2d, v1.2d' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ self compile: [ cogit FsubS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -86,7 +84,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ equals: 'fsub v2.2d, v0.2d, v1.2d' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -96,7 +94,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.4s }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -106,7 +104,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.2d }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 0 ]. @@ -116,7 +114,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ equals: 'ld1 { v0.2d }, [x1]' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -126,7 +124,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.4s }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -136,7 +134,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.2d }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 0 ]. diff --git a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st index 50b7051a80..ff35f32f94 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMARMV8SpecificEncodingTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMARMV8SpecificEncodingTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMV8SpecificEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -14,7 +12,7 @@ VMARMV8SpecificEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> armInstructionAt: index [ | addr inst | @@ -24,7 +22,7 @@ VMARMV8SpecificEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ | expectedAddress expectedValue | @@ -48,7 +46,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ | expectedAddress expectedValue | @@ -72,7 +70,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ | expectedAddress expectedValue | @@ -94,7 +92,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ | constant | @@ -110,7 +108,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ | negativeConstant12Bits | @@ -125,7 +123,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstant [ | negativeConstant12Bits | @@ -140,7 +138,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstant [ | negativeConstant12Bits | @@ -155,7 +153,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ | negativeConstant12Bits | @@ -170,7 +168,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ | positiveConstant12Bits | @@ -185,7 +183,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ | positiveConstant12Bits | @@ -200,7 +198,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstant [ | positiveConstant12Bits | @@ -215,7 +213,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstant [ | positiveConstant12Bits | @@ -230,7 +228,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ @@ -245,7 +243,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ @@ -260,7 +258,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ @@ -277,7 +275,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ self assert: machineSimulator x24 hex equals: completementValue hex ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ self doTestEncodeMoveMbrR: -256. @@ -285,7 +283,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMbrR: -1024. @@ -293,7 +291,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ self doTestEncodeMoveMbrR: 255. @@ -301,7 +299,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMbrR: 1024. @@ -309,35 +307,35 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegative9BitConstant [ self doTestEncodeMoveMwrR: -256 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMwrR: -20056 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositive12BitConstant [ self doTestEncodeMoveMwrR: 16r100 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMwrR: 20056 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ self doTestEncodeMoveRMwr: -256. @@ -348,28 +346,28 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ equals: 'stur x23, [x3, #-256]' ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitButShiftableConstant [ self doTestEncodeMoveRMwr: 512 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitNegativeConstant [ self doTestEncodeMoveRMwr: -61440 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithPositive9BitConstant [ self doTestEncodeMoveRMwr: 256 ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self compile: [ @@ -381,7 +379,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self assert: machineSimulator receiverRegisterValue equals: 16r1FF ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self compile: [ @@ -393,7 +391,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self assert: machineSimulator receiverRegisterValue equals: (67108865 bitOr: 16r100) ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithNonEncodableConstant [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st index c7defd272a..e712546ea2 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMAbstractBuilder', - #superclass : 'Object', + #name : #VMAbstractBuilder, + #superclass : #Object, #instVars : [ 'interpreter', 'memory' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ "convinience method to put an oop at a specific place No need to take care of the size of the collection, I'm taking care of it!" @@ -22,22 +20,22 @@ VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> interpreter [ ^ interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> interpreter: anObject [ interpreter := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> memory [ ^ memory ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> memory: anObject [ memory := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st index afe2f98aa3..4b0874a231 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st @@ -1,14 +1,13 @@ Class { - #name : 'VMAbstractFFITest', - #superclass : 'VMAbstractPrimitiveTest', + #name : #VMAbstractFFITest, + #superclass : #VMAbstractPrimitiveTest, #pools : [ 'LibFFIConstants' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argumentTypes withReturnType: returnType [ | functionAddress tfExternalFunction functionExternalAddress tfFunctionDefinition cif cifExternalAddress | @@ -32,7 +31,7 @@ VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argume ^ tfExternalFunction ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ ^ self @@ -41,7 +40,7 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ withReturnType: interpreter libFFI float ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTypes: argumentTypes [ ^ self @@ -50,20 +49,20 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTy withReturnType: interpreter libFFI float ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_FFI . true } ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> interpreterClass [ ^ VMTestMockInterpreter ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> newExternalAddress: anInteger [ | anExternalAddress | @@ -76,7 +75,7 @@ VMAbstractFFITest >> newExternalAddress: anInteger [ ^ anExternalAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> readyProcesses [ | collection | @@ -85,7 +84,7 @@ VMAbstractFFITest >> readyProcesses [ ^ collection ] -{ #category : 'initialization' } +{ #category : #initialization } VMAbstractFFITest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st index 9ae991c41c..1d8d2fb4e2 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st @@ -1,40 +1,38 @@ Class { - #name : 'VMAbstractImageFormatTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMAbstractImageFormatTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'imageReader' ], - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractImageFormatTest >> defaultTimeLimit [ ^ 30 seconds ] -{ #category : 'tests' } +{ #category : #tests } VMAbstractImageFormatTest >> imageFileName [ ^ 'lala.image' ] -{ #category : 'tests' } +{ #category : #tests } VMAbstractImageFormatTest >> readHeader [ ^ imageReader readHeaderFromImage: self imageFileName ] -{ #category : 'actions' } +{ #category : #actions } VMAbstractImageFormatTest >> saveImage [ interpreter writeImageFileIO. ] -{ #category : 'running' } +{ #category : #running } VMAbstractImageFormatTest >> setUp [ super setUp. @@ -57,7 +55,7 @@ VMAbstractImageFormatTest >> setUp [ ] -{ #category : 'ston' } +{ #category : #ston } VMAbstractImageFormatTest >> stonPretty: anObject [ ^ String streamContents: [ :s | @@ -68,7 +66,7 @@ VMAbstractImageFormatTest >> stonPretty: anObject [ ] ] -{ #category : 'running' } +{ #category : #running } VMAbstractImageFormatTest >> tearDown [ self imageFileName asFileReference ensureDeleteAll. diff --git a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st index 9657b0b0bd..11812a06b3 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st @@ -1,17 +1,16 @@ Class { - #name : 'VMAbstractPrimitiveTest', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMAbstractPrimitiveTest, + #superclass : #VMSpurMemoryManagerTest, #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ | aProcess | @@ -24,7 +23,7 @@ VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ ^ aProcess ] -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPriority [ | suspendedContext aProcess | @@ -46,7 +45,7 @@ VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPrior ^ aProcess ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMAbstractPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -57,7 +56,7 @@ VMAbstractPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ ^ methodBuilder @@ -66,7 +65,7 @@ VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ buildMethod ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -115,7 +114,7 @@ VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" diff --git a/smalltalksrc/VMMakerTests/VMBlockTest.class.st b/smalltalksrc/VMMakerTests/VMBlockTest.class.st index 8481eab72c..b257001c87 100644 --- a/smalltalksrc/VMMakerTests/VMBlockTest.class.st +++ b/smalltalksrc/VMMakerTests/VMBlockTest.class.st @@ -1,26 +1,24 @@ Class { - #name : 'VMBlockTest', - #superclass : 'VMInterpreterTests', + #name : #VMBlockTest, + #superclass : #VMInterpreterTests, #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> anEmptyMethod [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> evaluatingABlock [ [^1] value ] -{ #category : 'helpers' } +{ #category : #helpers } VMBlockTest >> installFullBlockClosureClass [ | aClass | aClass := self @@ -34,14 +32,14 @@ VMBlockTest >> installFullBlockClosureClass [ withValue: aClass ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodReturningABlock [ ^ [] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ true ifTrue: [ @@ -50,14 +48,14 @@ VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ ^ [ anArgument ] ] ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodReturningABlockWithTwoArguments [ ^ [:a :b] ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodWithLocalReturningABlock [ | a | @@ -65,14 +63,14 @@ VMBlockTest >> methodWithLocalReturningABlock [ ^ [ a ] ] -{ #category : 'running' } +{ #category : #running } VMBlockTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testCreatingABlockCapturesReceiver [ | methodReturning initialMethod | @@ -97,7 +95,7 @@ VMBlockTest >> testCreatingABlockCapturesReceiver [ self assert: (memory fetchPointer: FullClosureReceiverIndex ofObject: interpreter stackTop) equals: memory trueObject ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ | methodReturning initialMethod placeTakenByLiterals closure blockInitialPC compiledBlock | @@ -134,7 +132,7 @@ VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ | methodReturning initialMethod | @@ -161,7 +159,7 @@ VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ assert: (memory fetchPointer: FullClosureFirstCopiedValueIndex ofObject: interpreter stackTop) equals: (memory integerObjectOf: 2) ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ | methodReturning initialMethod | @@ -190,7 +188,7 @@ VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ self assert: (interpreter isWidowedContext: (memory outerContextOf: interpreter stackTop)) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable [ | methodReturning initialMethod | @@ -217,7 +215,7 @@ VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ | methodReturning initialMethod | @@ -244,7 +242,7 @@ VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testEvaluatingABlock [ | methodReturning initialMethod | @@ -276,7 +274,7 @@ VMBlockTest >> testEvaluatingABlock [ equals: (memory classAtIndex: ClassFullBlockClosureCompactIndex) ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testPushClosureBytecodePushesClosure [ | methodReturning initialMethod | diff --git a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st index 459f61526b..1fea546beb 100644 --- a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMByteCodesTest', - #superclass : 'VMInterpreterTests', + #name : #VMByteCodesTest, + #superclass : #VMInterpreterTests, #instVars : [ 'contextOop', 'context', 'callingFrame', 'topFrame' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -23,7 +21,7 @@ VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ self assert: (interpreter temporary: anIndex in: interpreter framePointer) equals: anOop ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock pushed: anOop [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -35,7 +33,7 @@ VMByteCodesTest >> assert: aBlock pushed: anOop [ ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock returned: anOop [ | callerSP | callerSP := interpreter frameCallerSP: interpreter framePointer. @@ -47,7 +45,7 @@ VMByteCodesTest >> assert: aBlock returned: anOop [ ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assertPopped: aBlock [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -58,24 +56,24 @@ VMByteCodesTest >> assertPopped: aBlock [ ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> firstPushTemporaryVariableBytecode [ "in v3 bytecode table" ^ 16 ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> firstStoreAndPopTemporaryVariableBytecode [ ^ 104 ] -{ #category : 'helper-interpret' } +{ #category : #'helper-interpret' } VMByteCodesTest >> interpret: aBlock [ aBlock value ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> interpretNextBytecode [ | count | @@ -85,7 +83,7 @@ VMByteCodesTest >> interpretNextBytecode [ count = 1 ] ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> interpretWithFrame: aBlock [ callingFrame := stackBuilder addNewFrame method: @@ -97,7 +95,7 @@ VMByteCodesTest >> interpretWithFrame: aBlock [ self interpret: aBlock ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> pushTempTest: index [ stackBuilder addNewFrame tempAt: index put: (memory integerObjectOf: 42). @@ -111,13 +109,13 @@ VMByteCodesTest >> pushTempTest: index [ ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> pushTemporaryVariableBytecodeAt: offset [ ^ self firstPushTemporaryVariableBytecode + offset. ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> pushThisContextTopFrame [ self interpretWithFrame: [ interpreter pushActiveContextBytecode ]. @@ -128,14 +126,14 @@ VMByteCodesTest >> pushThisContextTopFrame [ withInterpreter: interpreter ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> setUp [ super setUp. self installFloat64RegisterClass ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ stackBuilder addNewFrame @@ -151,12 +149,12 @@ VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ intoTemporary: index ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> storeAndPopTemporaryVariableBytecodeAt: anInteger [ ^ self firstStoreAndPopTemporaryVariableBytecode + anInteger ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ | oldMaybeSenderContext newMaybeSenderContext | self interpretWithFrame: [ interpreter pushActiveContextBytecode. ]. @@ -166,7 +164,7 @@ VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ self assert: oldMaybeSenderContext equals: newMaybeSenderContext ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testAddVectorBytecode [ | index v0 v1 result firstTerm size | @@ -193,7 +191,7 @@ VMByteCodesTest >> testAddVectorBytecode [ ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testArraySumUsingVectorBytecode [ | cm x y result simulatedMethod z | @@ -235,7 +233,7 @@ VMByteCodesTest >> testArraySumUsingVectorBytecode [ ] -{ #category : 'tests-complex' } +{ #category : #'tests-complex' } VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMethod [ | class object objectToPutInSlot attemptToAssignMethod attemptToAssignSelector aMethodDictionary | @@ -279,7 +277,7 @@ VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMe self assert: topFrame method equals: attemptToAssignMethod ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ | v0 v1 result method | @@ -306,7 +304,7 @@ VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 6.0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testDuplicateStackTop [ stackBuilder addNewFrame ; buildStack. @@ -323,7 +321,7 @@ VMByteCodesTest >> testDuplicateStackTop [ ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPopStackTopBytecode [ stackBuilder addNewFrame ; buildStack. @@ -339,7 +337,7 @@ VMByteCodesTest >> testPopStackTopBytecode [ ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testPushArrayToRegisterBytecode [ | array index result | @@ -364,7 +362,7 @@ VMByteCodesTest >> testPushArrayToRegisterBytecode [ ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantFalseBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -372,7 +370,7 @@ VMByteCodesTest >> testPushConstantFalseBytecode [ pushed: memory falseObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantMinusOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -380,7 +378,7 @@ VMByteCodesTest >> testPushConstantMinusOneBytecode [ pushed: (memory integerObjectOf: -1) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantNilBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -388,7 +386,7 @@ VMByteCodesTest >> testPushConstantNilBytecode [ pushed: memory nilObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -396,7 +394,7 @@ VMByteCodesTest >> testPushConstantOneBytecode [ pushed: (memory integerObjectOf: 1) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantReceiverBytecode [ | intReceiver | intReceiver := memory integerObjectOf: 42. @@ -409,7 +407,7 @@ VMByteCodesTest >> testPushConstantReceiverBytecode [ pushed: intReceiver ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantTrueBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -417,7 +415,7 @@ VMByteCodesTest >> testPushConstantTrueBytecode [ pushed: memory trueObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantTwoBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -425,7 +423,7 @@ VMByteCodesTest >> testPushConstantTwoBytecode [ pushed: (memory integerObjectOf: 2) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantZeroBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -433,74 +431,74 @@ VMByteCodesTest >> testPushConstantZeroBytecode [ pushed: (memory integerObjectOf: 0) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp0 [ self pushTempTest: 0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp1 [ self pushTempTest: 1 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp10 [ self pushTempTest: 10 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp11 [ self pushTempTest: 11 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp2 [ self pushTempTest: 2 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp3 [ self pushTempTest: 3 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp4 [ self pushTempTest: 4 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp5 [ self pushTempTest: 5 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp6 [ self pushTempTest: 6 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp7 [ self pushTempTest: 7 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp8 [ self pushTempTest: 8 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp9 [ self pushTempTest: 9 ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextIsContext [ self pushThisContextTopFrame. self assert: (memory isContext: interpreter stackTop). ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ self pushThisContextTopFrame. @@ -510,7 +508,7 @@ VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ equals: (interpreter frameCallerFP: interpreter framePointer) ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ self pushThisContextTopFrame. @@ -521,28 +519,28 @@ VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ equals: interpreter framePointer ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidReceiver [ self pushThisContextTopFrame. self assert: topFrame receiver equals: context receiver ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameContext: interpreter framePointer) equals: interpreter stackTop. ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetFlagContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameHasContext: interpreter framePointer). ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ | previousTop newTop | self interpretWithFrame: [ @@ -554,7 +552,7 @@ VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ self assert: newTop equals: previousTop. ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testReturnFalse [ "We need to return to a method. @@ -570,7 +568,7 @@ VMByteCodesTest >> testReturnFalse [ returned: memory falseObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testReturnTrue [ "We need to return to a method. @@ -586,7 +584,7 @@ VMByteCodesTest >> testReturnTrue [ returned: memory trueObject ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ | topFrameContext | self interpretWithFrame: [ @@ -600,7 +598,7 @@ VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ self assert: (interpreter isWidowedContext: topFrameContext) ] -{ #category : 'tests-send' } +{ #category : #'tests-send' } VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ | selectorOop aMethod aMethodToActivate receiver receiverClass aMethodDictionary arg1 arg2 | @@ -647,47 +645,47 @@ VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ self assert: interpreter stackTop equals: receiver ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary0 [ self storeAndPopTemporaryIntoTempTest: 0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary1 [ self storeAndPopTemporaryIntoTempTest: 1 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary2 [ self storeAndPopTemporaryIntoTempTest: 2 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary3 [ self storeAndPopTemporaryIntoTempTest: 3 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary4 [ self storeAndPopTemporaryIntoTempTest: 4 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary5 [ self storeAndPopTemporaryIntoTempTest: 5 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary6 [ self storeAndPopTemporaryIntoTempTest: 6 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary7 [ self storeAndPopTemporaryIntoTempTest: 7 ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ | register index array result | @@ -718,7 +716,7 @@ VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ self assert: (memory fetchFloat64: 3 ofObject: array) equals: 6.0. ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testSubVectorBytecode [ | index vector0 vector1 result | diff --git a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st index 1abed9f7a5..517ef6edc4 100644 --- a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMBytecodeMethod', - #superclass : 'Object', + #name : #VMBytecodeMethod, + #superclass : #Object, #instVars : [ 'virtualMachine', 'methodOop' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop [ ^ self new @@ -19,13 +17,13 @@ VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> at: index [ ^ virtualMachine objectMemory fetchByte: index - 1 "0 based" ofObject: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> disassemble [ | symbolicBytecodes | symbolicBytecodes := SymbolicBytecodeBuilder decode: self. @@ -33,52 +31,52 @@ VMBytecodeMethod >> disassemble [ ' join: (symbolicBytecodes collect: [ :sbc | sbc description ]) ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> encoderClass [ ^ EncoderForSistaV1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> endPC [ ^ virtualMachine objectMemory bytesInObject: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> initialPC [ "Answer the program counter for the receiver's first bytecode." ^ (self numLiterals + 1) * virtualMachine objectMemory wordSize + 1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> literalAt: anInteger [ ^ 'literal key' -> 'literal?' ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> methodOop [ ^ methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> methodOop: anObject [ methodOop := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> numLiterals [ ^ virtualMachine objectMemory literalCountOf: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st index 800da59986..05a1565127 100644 --- a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMCodeCompactionTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMCodeCompactionTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod [ "Create the root context with a valid method" @@ -34,7 +32,7 @@ VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod ] -{ #category : 'utils' } +{ #category : #utils } VMCodeCompactionTest >> createFillingMethods: anInteger [ | firstMethod | @@ -47,7 +45,7 @@ VMCodeCompactionTest >> createFillingMethods: anInteger [ ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> fillCodeZone [ | aMethod | @@ -63,13 +61,13 @@ VMCodeCompactionTest >> fillCodeZone [ ] -{ #category : 'running' } +{ #category : #running } VMCodeCompactionTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -112,7 +110,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenUsingPrimCallMayCallBackShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -151,7 +149,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToTheBeginning [ | firstMethod compactMethod methodOop | @@ -174,7 +172,7 @@ VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToThe ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ | firstMethod cogMethod methodOop | @@ -208,7 +206,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ | firstMethod cogMethod methodOop | @@ -241,7 +239,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ | firstMethod cogMethod methodOop | @@ -274,7 +272,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ equals: (interpreter cogMethodOf: methodOop) ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ | firstMethod callerMethodOop calleeCogMethod selector callerCogMethod calleeMethodOop | @@ -324,7 +322,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ equals: (interpreter cogMethodOf: calleeMethodOop) asInteger + cogit entryOffset ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -421,7 +419,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ equals: cogit ceCPICMissTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -511,7 +509,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbo equals: cogit cePICAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -585,7 +583,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsi equals: cogit cePICAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testRelocatingAMethodDoesNotAffectTheFrameCreationPushes [ | firstMethod compactMethod methodOop readOnlyObject | diff --git a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st index 1ba5d89ee9..8f8e44af1f 100644 --- a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMCogitHelpersTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMCogitHelpersTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'checkIsSmallInteger', 'checkNotSmallInteger' @@ -9,12 +9,10 @@ Class { 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -24,7 +22,7 @@ VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -34,7 +32,7 @@ VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -44,7 +42,7 @@ VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -54,14 +52,14 @@ VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> runUntilReturnFrom: anAddress [ self prepareCall. super runUntilReturnFrom: anAddress ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> setUp [ super setUp. @@ -92,7 +90,7 @@ VMCogitHelpersTest >> setUp [ ]. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ self assertNotInSmallIntegerRange: memory maxSmallInteger + 1. @@ -103,14 +101,14 @@ VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithValidSmallIntegers [ self denyIsNotInSmallIntegerRange: 0. self denyIsNotInSmallIntegerRange: memory maxSmallInteger. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ self denyIsInSmallIntegerRange: memory maxSmallInteger + 1. @@ -121,7 +119,7 @@ VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithValidSmallIntegers [ self assertIsInSmallIntegerRange: 0. diff --git a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st index a12f0e88c7..0daae71c73 100644 --- a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMCompiledCodeBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMCompiledCodeBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'slotSize', 'numberOfTemporaries', @@ -15,18 +15,16 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> address [ ^ method ] -{ #category : 'deprecated' } +{ #category : #deprecated } VMCompiledCodeBuilder >> build [ self @@ -36,14 +34,14 @@ VMCompiledCodeBuilder >> build [ ^ self buildMethod ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> buildMethod [ self instantiateMethod. self fillMethod. ^ method ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> buildMethodHeader [ ^ (numberOfArguments bitShift: 24) @@ -53,7 +51,7 @@ VMCompiledCodeBuilder >> buildMethodHeader [ + (isPrimitive asBit << 16) ] -{ #category : 'helper' } +{ #category : #helper } VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ | methodHeader | "1 based" @@ -63,17 +61,17 @@ VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> bytecodes [ ^ bytecodes ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> bytecodes: anObject [ bytecodes := anObject ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> classIndexToUse [ | newClass | memory nilObject = (memory splObj: 16) ifTrue: [ @@ -90,7 +88,7 @@ VMCompiledCodeBuilder >> classIndexToUse [ ^ memory classTagForClass: (memory splObj: 16) ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self newMethod. @@ -101,7 +99,7 @@ VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self fillLiteralsFromPharo: aCompiledMethod allLiterals ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ originalLiterals := pharoLiterals copy. @@ -109,14 +107,14 @@ VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillMethod [ self putHeaderInMethod. self putLiteralInMethod. self putBytecodesInMethod. ] -{ #category : 'initialization' } +{ #category : #initialization } VMCompiledCodeBuilder >> initialize [ bytecodes := #[1 2 3 4 5 6 7 8 9 0]. literals := OrderedCollection new. @@ -131,7 +129,7 @@ VMCompiledCodeBuilder >> initialize [ slotSize := nil. ] -{ #category : 'inspecting' } +{ #category : #inspecting } VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ @@ -159,7 +157,7 @@ VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ yourself ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> instantiateMethod [ slotSize := literals size + (bytecodes size / memory wordSize) ceiling @@ -172,73 +170,73 @@ VMCompiledCodeBuilder >> instantiateMethod [ method ifNotNil: [ memory fillObj: method numSlots: slotSize with: memory nilObject ]. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isPrimitive [ ^ isPrimitive ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isPrimitive: anObject [ isPrimitive := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isSmall [ ^ isSmall ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isSmall: anObject [ isSmall := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literalAt: anIndex put: anOop [ self collection: literals at: anIndex put: anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literals [ ^ literals ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literals: anObject [ literals := anObject. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> method [ ^ method ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> newMethod [ self initialize. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfArguments [ ^ numberOfArguments ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfArguments: anObject [ numberOfArguments := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfTemporaries [ ^ numberOfTemporaries ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfTemporaries: anObject [ numberOfTemporaries := anObject ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putBytecodesInMethod [ bytecodes doWithIndex:[ :aBytecode :anIndex | memory storeByte: @@ -251,7 +249,7 @@ VMCompiledCodeBuilder >> putBytecodesInMethod [ ] ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putHeaderInMethod [ memory storePointer: 0 ofObject: method @@ -259,7 +257,7 @@ VMCompiledCodeBuilder >> putHeaderInMethod [ ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putLiteralInMethod [ originalLiterals doWithIndex: [ :aLiteral :anIndex | @@ -277,7 +275,7 @@ VMCompiledCodeBuilder >> putLiteralInMethod [ memory storePointer: anIndex ofObject: method withValue: aLiteral ] ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ "In the case of CompiledBlocks we need to put the outerCode object (the last literal). @@ -286,7 +284,7 @@ VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ literals at: literals size put: aVMCompiledCodeBuilder address ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> slotSize [ "Do not set by hand !" ^ slotSize diff --git a/smalltalksrc/VMMakerTests/VMContext.class.st b/smalltalksrc/VMMakerTests/VMContext.class.st index 4458533aba..af9973c650 100644 --- a/smalltalksrc/VMMakerTests/VMContext.class.st +++ b/smalltalksrc/VMMakerTests/VMContext.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMContext', - #superclass : 'Object', + #name : #VMContext, + #superclass : #Object, #instVars : [ 'contextOop', 'interpreter' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^ self new contextOop: anInteger; @@ -21,7 +19,7 @@ VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSim yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> caller [ | senderContext | @@ -37,12 +35,12 @@ VMContext >> caller [ ^ VMContext newOnContext: senderContext withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> contextOop: anInteger [ contextOop := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> description [ | homeContextOop method selector | homeContextOop := interpreter findHomeForContext: contextOop. @@ -52,32 +50,32 @@ VMContext >> description [ ^ interpreter stringOf: selector ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> instructionPointer [ ^interpreter objectMemory fetchPointer: InstructionPointerIndex ofObject: contextOop. ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : 'testing' } +{ #category : #testing } VMContext >> isMarried [ ^interpreter isStillMarriedContext: contextOop. ] -{ #category : 'testing' } +{ #category : #testing } VMContext >> isNilObject [ ^interpreter objectMemory nilObject = contextOop. ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> receiver [ ^interpreter objectMemory fetchPointer: ReceiverIndex ofObject: contextOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> sender [ ^interpreter objectMemory fetchPointer: SenderIndex ofObject: contextOop. ] diff --git a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st index 24c05b336c..a43fdf619d 100644 --- a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st +++ b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMContextAccessTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMContextAccessTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: anIndex [ | originalPC copiedPC | @@ -19,7 +17,7 @@ VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: a self assert: copiedPC equals: originalPC ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> pushActiveContext [ interpreter pushActiveContextBytecode. @@ -27,7 +25,7 @@ VMContextAccessTest >> pushActiveContext [ ^ interpreter stackTop ] -{ #category : 'running' } +{ #category : #running } VMContextAccessTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -61,7 +59,7 @@ VMContextAccessTest >> setUp [ self initializeOldSpaceForFullGC ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectPC [ | contextOop newContext | @@ -75,7 +73,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPC [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ | contextOop newContext | @@ -93,7 +91,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ | contextOop newContext | @@ -108,7 +106,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectSenderWhenItIsNil [ | contextOop newContext | diff --git a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st index 052c3aafb4..a6cdd6a8b6 100644 --- a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMDivisionInstructionTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMDivisionInstructionTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotient remainer: remainer [ | expectedQuotient expectedRemainer | @@ -32,63 +30,63 @@ VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotien self assert: machineSimulator classRegisterValue equals: expectedRemainer ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 7 quotient: -1 remainer: -3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorAndDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -7 quotient: 1 remainer: -3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -7 quotient: -1 remainer: 3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 7 quotient: 1 remainer: 3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 2 quotient: 5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -2 quotient: -5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorAndDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -2 quotient: 5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 2 quotient: -5 remainer: 0. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMDivisionInstructionTest >> twoComplementOf: anInteger [ ^ self wordSize = 8 diff --git a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st index 0d7d7a6f1c..ad4a802dc9 100644 --- a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st @@ -1,29 +1,28 @@ Class { - #name : 'VMFFIArgumentMarshallingTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIArgumentMarshallingTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'private' } +{ #category : #private } VMFFIArgumentMarshallingTest class >> isAbstract [ ^ self == VMFFIArgumentMarshallingTest ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self subclassResponsibility ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self subclassResponsibility ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ | newLargeInteger byteSize class | @@ -44,7 +43,7 @@ VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ ^ newLargeInteger ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorrectly [ self @@ -53,7 +52,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorr expectedValue: 17 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrectly [ self @@ -62,7 +61,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrect expectedValue: 17.0 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectly [ self @@ -71,7 +70,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectl expectedValue: 17.0 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrectly [ self @@ -80,7 +79,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrec expectedValue: 17 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -89,7 +88,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -98,7 +97,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesBadArgument [ self @@ -108,7 +107,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesBadArgument [ self @@ -118,7 +117,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue aValueToStore | @@ -135,7 +134,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -150,7 +149,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -159,7 +158,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -168,7 +167,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesBadArgument [ | valueToStore | @@ -184,7 +183,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesBadArgument [ self @@ -194,7 +193,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue | @@ -206,7 +205,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -225,7 +224,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -238,7 +237,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveVa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -247,7 +246,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -256,7 +255,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -265,7 +264,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsM expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -274,7 +273,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsM expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBadArgument [ self @@ -284,7 +283,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBadArgument [ self @@ -294,7 +293,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -311,7 +310,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshall expectedValue: storedValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -328,7 +327,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalled expectedValue: storedValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFails [ self @@ -337,7 +336,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -346,7 +345,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIs expectedValue: 8 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self @@ -355,7 +354,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -370,7 +369,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -385,7 +384,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveVa expectedValue: 16r3FFFFFFF + 2 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFails [ self @@ -394,7 +393,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -403,7 +402,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ | valueToStore | @@ -418,7 +417,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -437,7 +436,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -449,7 +448,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFails [ self @@ -458,7 +457,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -467,7 +466,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFails [ self @@ -476,7 +475,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFail failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -485,7 +484,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsM expectedValue: 8 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self diff --git a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st index b5bcbc2d51..be1875a921 100644 --- a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFICallbacksTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFICallbacksTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ interpreter push: memory nilObject. @@ -17,7 +16,7 @@ VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -52,7 +51,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProc interpreter primitiveSameThreadCallout. ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcessesInReady [ | parametersArray tfExternalFunction callbackContext processBefore | @@ -78,7 +77,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcesse self assertCollection: self readyProcesses hasSameElements: processBefore ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -105,7 +104,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess self assert: interpreter activeProcess equals: oldActiveProcess. ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadReentrantCallbackRestoresCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext numberOfCallbacks innerCallbackContext tfExternalFunction2 | diff --git a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st index 8d27531029..57db1b5e98 100644 --- a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFIHelpersTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIHelpersTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> assertPopInEmptyStackFails [ [ interpreter popSameThreadCalloutSuspendedProcess. @@ -16,7 +15,7 @@ VMFFIHelpersTest >> assertPopInEmptyStackFails [ equals: 'SameThreadCalloutSuspendedProcessStack is empty' ] ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesError [ self assert: (memory splObj: SuspendedProcessInCallout) equals: memory nilObject. @@ -24,7 +23,7 @@ VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesEr self assertPopInEmptyStackFails ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcess [ | aProcess anotherProcess | @@ -42,7 +41,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -60,7 +59,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcess [ | aProcess anotherProcess | @@ -76,7 +75,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -92,7 +91,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresThePassedProcess [ | aProcess | @@ -105,7 +104,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresT ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdatesNextLinkWithNil [ | aProcess | @@ -118,7 +117,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdates ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackFails [ | aProcess | @@ -133,7 +132,7 @@ VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptySt ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsProcessWithNilInNextLink [ | aProcess | @@ -146,7 +145,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsPushedProcess [ | aProcess | @@ -159,7 +158,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testReadAddressReadsTheValidAddressValue [ | anExternalAddress | diff --git a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st index a3aefe8ff7..03182807ca 100644 --- a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st @@ -1,23 +1,22 @@ Class { - #name : 'VMFFIReturnMarshallingTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIReturnMarshallingTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'private' } +{ #category : #private } VMFFIReturnMarshallingTest class >> isAbstract [ ^ self = VMFFIReturnMarshallingTest ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ self subclassResponsibility ] -{ #category : 'utils' } +{ #category : #utils } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedLargeIntegerValue: expectedValue [ self @@ -37,7 +36,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedSmalltalkValue: expectedValue [ self @@ -51,7 +50,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteArray [ | valueToReturn | @@ -73,7 +72,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteAr ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatInStack [ self @@ -85,7 +84,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatI ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatInStack [ self @@ -97,7 +96,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatIn ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExternalAddress [ @@ -111,7 +110,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExtern ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallInteger [ self @@ -120,7 +119,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeInteger [ | value | @@ -132,7 +131,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallInteger [ | value | @@ -146,7 +145,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeInteger [ self @@ -155,7 +154,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallInteger [ self @@ -164,7 +163,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger [ self @@ -173,7 +172,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger expectedSmalltalkValue: INT8_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallInteger [ self @@ -182,7 +181,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeInteger [ | value | @@ -194,7 +193,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallInteger [ | value | @@ -208,7 +207,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeInteger [ self @@ -217,7 +216,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallInteger [ self @@ -226,7 +225,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT8PushSmallInteger [ self diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st index ba96a06ec5..d18e6ecd88 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadArgumentMarshallingTest', - #superclass : 'VMFFIArgumentMarshallingTest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadArgumentMarshallingTest, + #superclass : #VMFFIArgumentMarshallingTest, + #category : #VMMakerTests } -{ #category : 'implementation' } +{ #category : #implementation } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ | parametersArray tfExternalFunction savedValue | @@ -29,7 +28,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: savedValue equals: expectedValue. ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ | parametersArray tfExternalFunction savedValue | @@ -53,7 +52,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFISameThreadArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ | parametersArray tfExternalFunction functionCalled | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st index 4a8ee9389a..33727d32a7 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadCalloutTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadCalloutTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - callouts' } +{ #category : #'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess | @@ -25,7 +24,7 @@ VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProce self assert: interpreter activeProcess equals: oldActiveProcess ] -{ #category : 'tests - callouts' } +{ #category : #'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutShouldKeepTheNewMethodVariable [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st index 71a34defe3..bccbc9e6b1 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadReturnMarshallingTest', - #superclass : 'VMFFIReturnMarshallingTest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadReturnMarshallingTest, + #superclass : #VMFFIReturnMarshallingTest, + #category : #VMMakerTests } -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ | parametersArray tfExternalFunction | @@ -27,7 +26,7 @@ VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType aBlock value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st index 177e8e7463..884e602d1e 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerArgumentMarshallingTest', - #superclass : 'VMFFIArgumentMarshallingTest', + #name : #VMFFIWorkerArgumentMarshallingTest, + #superclass : #VMFFIArgumentMarshallingTest, #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -11,11 +11,10 @@ Class { 'task', 'savedValue' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -33,7 +32,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: savedValue equals: expectedValue ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -42,7 +41,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofType: argumentType [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. @@ -78,21 +77,21 @@ VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofTy interpreter primitiveWorkerCallout ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerArgumentMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'running' } +{ #category : #running } VMFFIWorkerArgumentMarshallingTest >> setUp [ super setUp. interpreter libFFI testWorker clear ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st index 0cabd48fa0..10fc6eeb4f 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerCalloutTest', - #superclass : 'VMAbstractFFITest', + #name : #VMFFIWorkerCalloutTest, + #superclass : #VMAbstractFFITest, #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -9,17 +9,16 @@ Class { 'workerOop', 'semaphoreIndex' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes [ ^ self doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: interpreter libFFI void ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: returnType [ aFunctionBlock := [ self fail: 'It should enqueue it, not execute it' ]. @@ -50,21 +49,21 @@ VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: ar interpreter primitiveWorkerCallout ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutEnqueuesOnlyOneTask [ self doWorkerCallWithArguments: {} ofTypes: {}. self assert: interpreter libFFI testWorker tasks size equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIfPrimitiveFails [ | previous | @@ -87,7 +86,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIf self assert: interpreter allocatedElements size equals: previous. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocateReturnHolder [ self doWorkerCallWithArguments: {} ofTypes: {}. @@ -95,7 +94,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocate self assert: interpreter libFFI testWorker tasks first returnHolderAddress isNil ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgumentHoldersAndReturnHolderInCHeap [ | previous | @@ -117,7 +116,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgum self assert: interpreter allocatedElements size equals: previous + 7. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithReturnAllocateJustOne [ | previous | @@ -128,7 +127,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithRetu self assert: interpreter allocatedElements size equals: previous + 1. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutReturnDoesNotAllocate [ | previous | @@ -139,7 +138,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutR self assert: interpreter allocatedElements size equals: previous. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersHasNilAsParametersPointer [ self doWorkerCallWithArguments: {} ofTypes: {}. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st index d413ef8af6..92a15a06fb 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerReturnMarshallingTest', - #superclass : 'VMFFIReturnMarshallingTest', + #name : #VMFFIWorkerReturnMarshallingTest, + #superclass : #VMFFIReturnMarshallingTest, #instVars : [ 'tfExternalFunction', 'returnHolder', @@ -12,11 +12,10 @@ Class { 'worker', 'workerOop' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ tfExternalFunction := self @@ -55,14 +54,14 @@ VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType ret aBlock value. ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st index dc8609f7ca..52f52916aa 100644 --- a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMForwardLiteralInMachineMethodTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMForwardLiteralInMachineMethodTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMForwardLiteralInMachineMethodTest >> initStack [ self createBaseFrame. @@ -24,13 +22,13 @@ VMForwardLiteralInMachineMethodTest >> initStack [ ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMForwardLiteralInMachineMethodTest >> methodWithGlobal [ ^ Smalltalk ] -{ #category : 'tests' } +{ #category : #tests } VMForwardLiteralInMachineMethodTest >> testForwardLiteralInMethod [ | machineCodeMethod literal methodOop array literalValue selector associationClass valueClass literalKey | diff --git a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st index 7716e906f5..a0768e8b2c 100644 --- a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st @@ -42,8 +42,8 @@ Configuring of the frame. When it links them, it gives the last frame the previous caller Frame, for debug purpose. " Class { - #name : 'VMFrameBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMFrameBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'method', 'context', @@ -61,12 +61,10 @@ Class { 'methodBuilder', 'isSuspended' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> adaptAddressToMemory: anInteger [ anInteger = memory nilObject ifTrue: [ ^ #nilObject ]. anInteger = memory trueObject ifTrue: [ ^ #trueObject ]. @@ -75,70 +73,70 @@ VMFrameBuilder >> adaptAddressToMemory: anInteger [ "^ memory integerObjectOf: anInteger" ] -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> adaptAddressToMemoryIfInteger: anAssociation [ anAssociation value isInteger ifTrue: [ anAssociation value: (self adaptAddressToMemory: anAssociation value) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> argumentSize [ ^ argumentSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> argumentSize: anObject [ argumentSize := anObject ] -{ #category : 'configuring' } +{ #category : #configuring } VMFrameBuilder >> beSuspended [ isSuspended := true ] -{ #category : 'configuring' } +{ #category : #configuring } VMFrameBuilder >> beSuspendedAt: anInstructionPointer [ instructionPointer := anInstructionPointer. self beSuspended ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> callerFrame [ ^ callerFrame ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> callerFrame: aFrame [ callerFrame := aFrame ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> context [ ^ context ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> context: anObject [ context := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> flags [ ^ flags ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> flags: anObject [ flags := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> framePointer [ ^ myFramePointer ] -{ #category : 'initialization' } +{ #category : #initialization } VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory andMethodBuilder: aMethodBuilder [ memory := aMemory. interpreter := anInterpreter. "allow to not care if it's for a cog or stack interpreter" @@ -155,7 +153,7 @@ VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory an argumentSize := 0. ] -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> inspectFrameIn: aBuilder [ @@ -186,12 +184,12 @@ VMFrameBuilder >> inspectFrameIn: aBuilder [ yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> instructionPointer [ ^ instructionPointer ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> isMarried [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -200,7 +198,7 @@ VMFrameBuilder >> isMarried [ ifFalse: [ interpreter isStillMarriedContext: contextOop ] ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> isSingle [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -211,43 +209,43 @@ VMFrameBuilder >> isSingle [ interpreter isSingleContext: contextOop ] ] -{ #category : 'testing' } +{ #category : #testing } VMFrameBuilder >> isSuspended [ ^ isSuspended ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> marryToContext [ interpreter ensureFrameIsMarried: myFramePointer SP: myStackPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> method [ ^ method ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> method: anOop [ method := anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> previousFrameArgsSize [ ^ previousFrameArgsSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> previousFrameArgsSize: anObject [ previousFrameArgsSize := anObject ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushCurrentFramesStack [ "push to the stack all objects in the frame stack" stack do: [ :oop | interpreter push: oop ]. ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushFlags [ "Flags: this stack frame is single. I.e., it has no context object. Otherwise GC fails with an assertion looking for it in the heap" @@ -258,14 +256,14 @@ VMFrameBuilder >> pushFlags [ interpreter push: flags ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushFrame [ interpreter push: receiver. temps do: [ :oop | interpreter push: oop ]. ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushYourself [ self setVariablesFromCompiledMethod. @@ -288,17 +286,17 @@ VMFrameBuilder >> pushYourself [ ^ myFramePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> receiver [ ^ receiver ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> receiver: anObject [ receiver := anObject ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setArgsFromMethod [ | argNumber | argNumber := interpreter argumentCountOf: method. @@ -309,7 +307,7 @@ VMFrameBuilder >> setArgsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of arguments from the method oop.' ]] ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ "If possible, setting IP to before the first bytecode, so it is ready for fetchNextBytecode" @@ -319,7 +317,7 @@ VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ interpreter instructionPointer: instructionPointer ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setTempsFromMethod [ | tempNumber | tempNumber := interpreter tempCountOf: method. @@ -330,7 +328,7 @@ VMFrameBuilder >> setTempsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of temporaries from the method oop.' ]] ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setVariablesFromCompiledMethod [ (memory isCompiledMethod: method) ifFalse: [ ^ self ]. @@ -339,43 +337,43 @@ VMFrameBuilder >> setVariablesFromCompiledMethod [ self setArgsFromMethod ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stack [ ^ stack ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stack: anObject [ stack := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stackPointer [ ^ myStackPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> tempAt: anIndex put: anOop [ self collection: temps at: anIndex put: anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> temps [ ^ temps ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> temps: anObject [ temps := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> vmMethodBuilder [ ^ vmMethodBuilder ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> vmMethodBuilder: anObject [ vmMethodBuilder := anObject diff --git a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st index 49fbba1248..c7610209f4 100644 --- a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMImageHeaderWritingTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #name : #VMImageHeaderWritingTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'running' } +{ #category : #running } VMImageHeaderWritingTest >> setUp [ super setUp. @@ -20,7 +18,7 @@ VMImageHeaderWritingTest >> setUp [ self saveImage. ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ | header permanentObject | @@ -37,7 +35,7 @@ VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ + (memory bytesInObject: permanentObject) + 16 "PermSpace has an empty object as first object.". ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ | header | @@ -47,7 +45,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ self assert: header oldBaseAddr equals: memory getMemoryMap oldSpaceStart ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ | header | @@ -57,7 +55,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ self assert: header freeOldSpaceInImage equals: memory bytesLeftInOldSpace ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ | header | @@ -67,7 +65,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ self assert: header hdrCogCodeSize equals: interpreter unknownShortOrCodeSizeInKs ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ | header | @@ -77,7 +75,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ self assert: header dataSize equals: memory imageSizeToWrite ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ | header | @@ -87,7 +85,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ self assert: header hdrEdenBytes equals: interpreter getDesiredEdenBytes ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages [ | header | @@ -97,7 +95,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages self assert: header hdrNumStackPages equals: interpreter getDesiredNumStackPages ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable [ | header | @@ -107,7 +105,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable self assert: header hdrMaxExtSemTabSize equals: (interpreter getMaxExtSemTabSizeSet ifTrue: [interpreter ioGetMaxExtSemTableSize] ifFalse: [0]) ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ | header | @@ -117,7 +115,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ self assert: header extraVMMemory equals: interpreter getExtraVMMemory ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ | header | @@ -127,7 +125,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ self assert: header firstSegSize equals: memory firstSegmentBytes ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ | header | @@ -137,7 +135,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ self assert: header headerFlags equals: interpreter getImageHeaderFlags ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ | header expectedHeaderSize | @@ -149,7 +147,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ self assert: header imageHeaderSize equals: expectedHeaderSize. ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ | header | @@ -159,7 +157,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ self assert: header imageFormat equals: interpreter imageFormatVersion ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ | header | @@ -169,7 +167,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ self assert: header imageVersion equals: interpreter getImageVersion ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ | header | @@ -179,7 +177,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ self assert: header hdrLastHash equals: memory lastHash ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop [ | header | @@ -189,7 +187,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop self assert: header initialSpecialObjectsOop equals: memory specialObjectsOop ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONHeader [ | header readHeader | @@ -203,7 +201,7 @@ VMImageHeaderWritingTest >> testWritingSTONHeader [ self assert: readHeader equals: (self stonPretty: header). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONPermSpace [ | writtenMetadata expectedPermSpaceMetadata | @@ -224,7 +222,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpace [ self assert: writtenMetadata equals: (self stonPretty: expectedPermSpaceMetadata). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ | writtenMetadata | @@ -238,7 +236,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ self assert: writtenMetadata equals: (self stonPretty: ComposedMetadataStruct new). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONSegment [ | header writtenHeader segmentMetadata | diff --git a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st index 382706b68a..3a913332a3 100644 --- a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMImageReadingTest', - #superclass : 'VMAbstractImageFormatTest', + #name : #VMImageReadingTest, + #superclass : #VMAbstractImageFormatTest, #instVars : [ 'originalNilObjectIdentityHash', 'permanentObject', 'originalPermanentObjectIdentityHash' ], - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'query' } +{ #category : #query } VMImageReadingTest >> dataFrom: fileName [ ^ self imageFileName asFileReference / fileName ] -{ #category : 'accessing' } +{ #category : #accessing } VMImageReadingTest >> initializationOptions [ ^ super initializationOptions , { #CloneOnGC. false. #CloneOnScavenge. false } ] -{ #category : 'utilities' } +{ #category : #utilities } VMImageReadingTest >> loadImage [ environmentBuilder := VMSimulatedEnvironmentBuilder new. @@ -42,7 +40,7 @@ VMImageReadingTest >> loadImage [ ] -{ #category : 'query' } +{ #category : #query } VMImageReadingTest >> metadataFrom: fileName [ | writtenHeader | @@ -50,7 +48,7 @@ VMImageReadingTest >> metadataFrom: fileName [ ^ STON fromString: writtenHeader ] -{ #category : 'utilities' } +{ #category : #utilities } VMImageReadingTest >> saveImage [ memory garbageCollectForSnapshot. @@ -63,7 +61,7 @@ VMImageReadingTest >> saveImage [ ] -{ #category : 'initialization' } +{ #category : #initialization } VMImageReadingTest >> setUp [ super setUp. @@ -76,7 +74,7 @@ VMImageReadingTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ | obj magicNumber initSegmentSize initPermSpaceSize finalSegmentSize finalPermSpaceSize | @@ -117,7 +115,7 @@ VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ self assert: (self metadataFrom: 'permSpace.ston') dataSize equals: finalPermSpaceSize ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testReadingSTONHeader [ | headerStruct headerFile | @@ -135,7 +133,7 @@ VMImageReadingTest >> testReadingSTONHeader [ self assert: (self stonPretty: headerStruct) equals: headerFile contents. ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self saveImage. @@ -144,7 +142,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self assert: originalNilObjectIdentityHash equals: (memory hashBitsOf: memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ "Only valid in the new format" @@ -160,7 +158,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ | firstNewSegmentSize secondNewSegmentSize obj newObj originalObjHash | @@ -192,7 +190,7 @@ VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ self assert: originalObjHash equals: (memory hashBitsOf: newObj). ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavingPermanentSpaceObjectsInSpurFormatFails [ imageWriterClass = SpurImageWriter ifFalse: [ ^ self skip ]. diff --git a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st index 9ead2ebb76..6837a56522 100644 --- a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st +++ b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMInterpreterTests', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMInterpreterTests, + #superclass : #VMSpurMemoryManagerTest, #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -25,7 +23,7 @@ VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : 'running' } +{ #category : #running } VMInterpreterTests >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -43,7 +41,7 @@ VMInterpreterTests >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMInterpreterTests >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" diff --git a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st index c1f9413e77..cdfda82889 100644 --- a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJITPrimitiveCallingTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJITPrimitiveCallingTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJITPrimitiveCallingTest >> initStack [ self createBaseFrame. @@ -21,7 +19,7 @@ VMJITPrimitiveCallingTest >> initStack [ ] -{ #category : 'running' } +{ #category : #running } VMJITPrimitiveCallingTest >> setUp [ super setUp. @@ -36,7 +34,7 @@ VMJITPrimitiveCallingTest >> setUp [ self createActiveProcess ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -56,7 +54,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNum ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -76,7 +74,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForT self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -96,7 +94,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidR self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidReceiverRunsFallbackCode [ | callingMethod | @@ -116,7 +114,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidRece ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntegerWillExecuteThePrimitiveAndReturnASmallInteger [ | callingMethod | @@ -136,7 +134,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntege ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntegerReceiverReturnsSmallInteger [ | callingMethod | @@ -156,7 +154,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntege ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -176,7 +174,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersE ] -{ #category : 'tests - without tracing' } +{ #category : #'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValidResult [ | callingMethod | @@ -196,7 +194,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValid self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - without tracing' } +{ #category : #'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -218,7 +216,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidN ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -238,7 +236,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePri self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -258,7 +256,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResult self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - newMethod' } +{ #category : #'tests - newMethod' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ | callingMethod | @@ -280,7 +278,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ ] -{ #category : 'tests - primitiveFunctionPointer' } +{ #category : #'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -302,7 +300,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerW ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -336,7 +334,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwa ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -359,7 +357,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutFo ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -393,7 +391,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithF ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -416,7 +414,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWitho ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -450,7 +448,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -473,7 +471,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -490,7 +488,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : 'tests - newMethod' } +{ #category : #'tests - newMethod' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ | callingMethod | @@ -512,7 +510,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ ] -{ #category : 'tests - primitiveFunctionPointer' } +{ #category : #'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -534,7 +532,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCa ] -{ #category : 'tests - error code' } +{ #category : #'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -573,7 +571,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : 'tests - error code' } +{ #category : #'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -612,7 +610,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: machineSimulator framePointerRegisterValue) equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -648,7 +646,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwarders ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -673,7 +671,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForward ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -709,7 +707,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwar ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -734,7 +732,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutFor ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -770,7 +768,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithFo ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -795,7 +793,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithou ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -812,7 +810,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : 'tests - fail fast' } +{ #category : #'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode [ | callingMethod | @@ -835,7 +833,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode ] -{ #category : 'tests - profile sampling' } +{ #category : #'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSample [ | callingMethod | @@ -861,7 +859,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSa self assert: interpreter nextProfileTick equals: 0 ] -{ #category : 'tests - profile sampling' } +{ #category : #'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoesNotTakeSample [ | callingMethod | @@ -885,7 +883,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoes self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42) ] -{ #category : 'tests - fail fast' } +{ #category : #'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithoutFunctionExecutesFallbackCode [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st index 38e3b8dd38..a12c1df861 100644 --- a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMJITVMPrimitiveTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJITVMPrimitiveTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> setUp [ super setUp. @@ -16,7 +14,7 @@ VMJITVMPrimitiveTest >> setUp [ self createBaseFrame ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod [ | methodToXray target | @@ -35,7 +33,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0111) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ | methodToXray target | @@ -54,7 +52,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0001) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ | methodToXray target | @@ -72,7 +70,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ | methodToXray target | @@ -91,7 +89,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0010) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasNotCompiled [ | methodToXray target | diff --git a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st index 5e0e973c35..0c20ab755d 100644 --- a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st +++ b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMJistMethodTestObject', - #superclass : 'Object', + #name : #VMJistMethodTestObject, + #superclass : #Object, #instVars : [ 'var1', 'var2', @@ -132,12 +132,10 @@ Class { 'var128', 'var129' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'initialization' } +{ #category : #initialization } VMJistMethodTestObject >> initialize [ super initialize. var1 := Array new. diff --git a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st index 7f09895aff..8e27c1cdd4 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJitMethodTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJitMethodTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ | tmp1 tmp2 | @@ -21,14 +19,14 @@ VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ ^ arg3 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> comparingSmallIntegers: aBitmap [ aBitmap size = 32768 ifTrue: [ ^ 17 ]. ^ 23 ] -{ #category : 'helpers' } +{ #category : #helpers } VMJitMethodTest >> initStack [ self createBaseFrame. @@ -43,13 +41,13 @@ VMJitMethodTest >> initStack [ ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> setUp [ super setUp. @@ -57,7 +55,7 @@ VMJitMethodTest >> setUp [ self installFloat64RegisterClass ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> setUpTrampolines [ super setUpTrampolines. @@ -69,7 +67,7 @@ VMJitMethodTest >> setUpTrampolines [ cogit ceReturnToInterpreterTrampoline: (self compileTrampoline: [ cogit Stop ] named:#ceReturnToInterpreterTrampoline). ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ | callingMethod parameter aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -104,7 +102,7 @@ VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ equals: 17 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ | callingMethod cm x y z | @@ -178,7 +176,7 @@ VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ | callingMethod cm x y z firstTerm size | @@ -250,7 +248,7 @@ VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ self assert: (memory fetchFloat64: 1 ofObject: z) equals: 22.0 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ | callingMethod | @@ -259,7 +257,7 @@ VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ self deny: callingMethod address equals: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testOnStackReplacementForLongRunningVectorAddMethod [ | callingMethod cm x y z firstTerm size frame | diff --git a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st index b80dc4405f..02dd237dfe 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st @@ -1,28 +1,26 @@ Class { - #name : 'VMJitMethodWithImmutabilityTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJitMethodWithImmutabilityTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMJitMethodWithImmutabilityTest >> initialCodeSize [ ^ 32 * 1024 ] -{ #category : 'initialization' } +{ #category : #initialization } VMJitMethodWithImmutabilityTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : 'initialization' } +{ #category : #initialization } VMJitMethodWithImmutabilityTest >> setUpTrampolines [ super setUpTrampolines. @@ -32,7 +30,7 @@ VMJitMethodWithImmutabilityTest >> setUpTrampolines [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodWithImmutabilityTest >> testCompileMethodWithALotOfAssignmentsToInstanceVariables [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st index 97a1aa0b1e..810ddfe30c 100644 --- a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st +++ b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMJitSimdBytecode', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJitSimdBytecode, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'running' } +{ #category : #running } VMJitSimdBytecode >> jitOptions [ ^ super jitOptions @@ -20,7 +18,7 @@ VMJitSimdBytecode >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -62,7 +60,7 @@ VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -97,7 +95,7 @@ VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -132,7 +130,7 @@ VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -163,7 +161,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -193,7 +191,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ self assert: (entry registerr) equals: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegisterContent [ | endInstruction primitiveAddress array | @@ -224,7 +222,7 @@ VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegister self assert: (memory fetchFloat64: 1 ofObject: array) equals: 4.0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testSubVectorStoreResultIntoVectorRegister [ | endInstruction primitiveAddress array register | diff --git a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st index beaecb6e12..88d625ab18 100644 --- a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMJittedBoxFloatPrimitivesTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedBoxFloatPrimitivesTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> setUp [ super setUp. @@ -24,7 +22,7 @@ VMJittedBoxFloatPrimitivesTest >> setUp [ named: 'ceCheckFeatures') ] ] -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> testAsFloat [ cogit receiverTags: memory smallIntegerTag. @@ -38,7 +36,7 @@ VMJittedBoxFloatPrimitivesTest >> testAsFloat [ equals: 27.0 ] -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> testAsFloatWhenThereIsNotSpaceFailsPrimitive [ | stop | diff --git a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st index 9ecec6897e..96c2a4c216 100644 --- a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedByteArrayAccessPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedByteArrayAccessPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'receiver', 'targetReceiver' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMJittedByteArrayAccessPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: bitSize [ ({ 8. 16. 32. 64 } includes: bitSize) ifFalse: [ self fail ]. @@ -44,7 +42,7 @@ VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: b ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ | endPart | @@ -56,7 +54,7 @@ VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is the same receiver" @@ -70,7 +68,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ targetReceiver := receiver ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: bitSize [ | complementedValue | @@ -92,7 +90,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: memory storeLong64: 0 ofObject: targetReceiver withValue: complementedValue ]. ] -{ #category : 'tests - load booleans' } +{ #category : #'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ | expectedValue | @@ -113,7 +111,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ ] -{ #category : 'tests - load booleans' } +{ #category : #'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ | expectedValue | @@ -134,7 +132,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ | expectedValue | @@ -155,7 +153,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ | expectedValue | @@ -176,7 +174,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ | expectedValue | @@ -197,7 +195,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ | expectedValue | @@ -218,7 +216,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ | expectedValue | @@ -239,7 +237,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ | expectedValue | @@ -260,7 +258,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue [ | expectedValue | @@ -281,7 +279,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue [ | expectedValue | @@ -302,7 +300,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue [ | expectedValue | @@ -323,7 +321,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue [ | expectedValue | @@ -344,7 +342,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue [ | expectedValue | @@ -365,7 +363,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue [ | expectedValue | @@ -386,7 +384,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue [ | expectedValue | @@ -407,7 +405,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue [ | expectedValue | @@ -428,7 +426,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ | expectedValue | @@ -449,7 +447,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ | expectedValue | @@ -470,7 +468,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ | expectedValue | @@ -491,7 +489,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ | expectedValue | @@ -512,7 +510,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ | expectedValue | @@ -533,7 +531,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ ] -{ #category : 'tests - store booleans' } +{ #category : #'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ self genPrimitive: #StoreBoolean8. @@ -549,7 +547,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ ] -{ #category : 'tests - store booleans' } +{ #category : #'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ self genPrimitive: #StoreBoolean8. @@ -565,7 +563,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ | expectedValue | @@ -585,7 +583,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ | expectedValue | @@ -605,7 +603,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ | expectedValue | @@ -625,7 +623,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ | expectedValue | @@ -644,7 +642,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNotOverwriteAfter [ | expectedValue | @@ -663,7 +661,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNo self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloatValue [ | expectedValue | @@ -682,7 +680,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloa ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ | expectedValue | @@ -701,7 +699,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeValue [ | expectedValue | @@ -721,7 +719,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValue [ | expectedValue | @@ -741,7 +739,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -763,7 +761,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeValue [ | expectedValue | @@ -783,7 +781,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValue [ | expectedValue | @@ -803,7 +801,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValueWithoutOverwriting [ | expectedValue | @@ -823,7 +821,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeValue [ | expectedValue | @@ -843,7 +841,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveValue [ | expectedValue | @@ -863,7 +861,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValue [ | expectedValue | @@ -883,7 +881,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValu ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValue [ | expectedValue | @@ -903,7 +901,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -925,7 +923,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ | expectedValue | @@ -945,7 +943,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ | expectedValue | @@ -965,7 +963,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ | expectedValue | @@ -985,7 +983,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ | expectedValue | @@ -1006,7 +1004,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ | expectedValue | @@ -1026,7 +1024,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> trailingName [ ^ 'Bytes' diff --git a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st index 70c9624404..47ffe36324 100644 --- a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMJittedExternalAddressAccessPrimitiveTest', - #superclass : 'VMJittedByteArrayAccessPrimitiveTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJittedExternalAddressAccessPrimitiveTest, + #superclass : #VMJittedByteArrayAccessPrimitiveTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'utils' } +{ #category : #utils } VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is a byteArray and the receiver to the primitive is an external address pointing to it" @@ -16,7 +14,7 @@ VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedExternalAddressAccessPrimitiveTest >> trailingName [ ^ 'ExternalAddress' diff --git a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st index e7ce707f38..4c246543ac 100644 --- a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedGeneralPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedGeneralPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ | lastOop | @@ -17,7 +15,7 @@ VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ ^ lastOop ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ "32 bits images does not have SmallFloats" @@ -42,7 +40,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self compile: [ | jump | @@ -62,7 +60,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self compile: [ | jump | @@ -82,7 +80,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self assert: machineSimulator receiverRegisterValue equals: 0 ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self compile: [ | jump | @@ -98,7 +96,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self compile: [ | jump | @@ -114,7 +112,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBoxedFloat [ self compile: [ | jump | @@ -130,7 +128,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBo self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSmallInteger [ self compile: [ | jump | @@ -146,7 +144,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSm self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterBoxedFloat [ self compile: [ | jump | @@ -162,7 +160,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterSmallInteger [ self compile: [ | jump | @@ -178,7 +176,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerBoxedFloat [ self compile: [ | jump | @@ -194,7 +192,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerSmallInteger [ self compile: [ | jump | @@ -210,7 +208,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self compile: [ | jump | @@ -226,7 +224,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self compile: [ | jump | @@ -242,7 +240,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self compile: [ | jump | @@ -258,7 +256,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self compile: [ | jump | @@ -274,7 +272,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat [ self compile: [ | jump | @@ -290,7 +288,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallInteger [ self compile: [ | jump | @@ -306,7 +304,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallIntege self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self compile: [ @@ -319,7 +317,7 @@ VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17). ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self compile: [ | jump | @@ -332,7 +330,7 @@ VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self assert: machineSimulator receiverRegisterValue equals: 17. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self compile: [ | jump | @@ -345,7 +343,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self assert: machineSimulator receiverRegisterValue equals: (memory classIndexOf: memory falseObject) ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self compile: [ @@ -358,7 +356,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self assert: machineSimulator arg0RegisterValue equals: classFloat ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self compile: [ @@ -372,7 +370,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding [ self compile: [ @@ -386,7 +384,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self compile: [ @@ -400,7 +398,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 4 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding [ self compile: [ @@ -414,7 +412,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: (7 * 4 roundUpTo: self wordSize) "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ | desiredSlots | @@ -432,7 +430,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: (desiredSlots * 8 / self wordSize) ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self compile: [ @@ -446,7 +444,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self compile: [ @@ -460,7 +458,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self compile: [ | jump | @@ -475,7 +473,7 @@ VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self assert: machineSimulator doublePrecisionFloatingPointRegister0Value equals: Float fmax. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -488,7 +486,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -505,7 +503,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -522,7 +520,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -539,7 +537,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegativ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -550,7 +548,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -567,7 +565,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 94). ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -585,7 +583,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -265). ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -598,7 +596,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagI self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -611,7 +609,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsS self assert: result equals: 0. "Incomplete Primitive, if the float cannot be allocated, it executes the C code" ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -631,7 +629,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ self assert: self machineSimulator receiverRegisterValue equals: (memory floatObjectOf: 42.0) ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -654,7 +652,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmal equals: 8589934592 asFloat ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerReceiver [ | result | @@ -667,7 +665,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -680,7 +678,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -696,7 +694,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -714,7 +712,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerReceiver [ | result | @@ -727,7 +725,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerRece self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -740,7 +738,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallInteg self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -756,7 +754,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerA self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -774,7 +772,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerReceiver [ | result | @@ -787,7 +785,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerR self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -800,7 +798,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIn self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBiggerThanSmallIntegerBits [ | primitiveAddress endInstruction | @@ -818,7 +816,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBigge self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -834,7 +832,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ | primitiveAddress endInstruction | @@ -852,7 +850,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ | primitiveAddress endInstruction | @@ -874,7 +872,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ equals: (memory integerObjectOf: memory maxSmallInteger >> 1 << 1) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWithShiftRight [ | primitiveAddress endInstruction | @@ -896,7 +894,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWit equals: (memory integerObjectOf: 17) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBiggerThanNumSmallIntegerBits [ | primitiveAddress endInstruction | @@ -918,7 +916,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBi equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ | primitiveAddress endInstruction | @@ -936,7 +934,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 128) ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerReceiver [ | result | @@ -949,7 +947,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -962,7 +960,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -978,7 +976,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -996,7 +994,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ | endInstruction primitiveAddress | @@ -1014,7 +1012,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -1031,7 +1029,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1044,7 +1042,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1061,7 +1059,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1078,7 +1076,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1089,7 +1087,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1106,7 +1104,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1124,7 +1122,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1141,7 +1139,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1154,7 +1152,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIs self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -1171,7 +1169,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1188,7 +1186,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallIn self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1205,7 +1203,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1216,7 +1214,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSm self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1233,7 +1231,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1251,7 +1249,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1268,7 +1266,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1281,7 +1279,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsN self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1298,7 +1296,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInt self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1309,7 +1307,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSma self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1326,7 +1324,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1344,7 +1342,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNum self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1357,7 +1355,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfRecei self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1374,7 +1372,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1385,7 +1383,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceive self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1402,7 +1400,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1420,7 +1418,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNe self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1433,7 +1431,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1450,7 +1448,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1461,7 +1459,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1478,7 +1476,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1496,7 +1494,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveHashMultiply' } +{ #category : #'tests - primitiveHashMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHashMultiply [ | result primitiveAddress | @@ -1513,7 +1511,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHash self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50 hashMultiply). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1526,7 +1524,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1543,7 +1541,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1554,7 +1552,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1571,7 +1569,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1589,7 +1587,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1602,7 +1600,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1619,7 +1617,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1630,7 +1628,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1647,7 +1645,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1665,7 +1663,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1678,7 +1676,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1695,7 +1693,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflows [ | endInstruction primitiveAddress | @@ -1712,7 +1710,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ | endInstruction primitiveAddress | @@ -1731,7 +1729,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ | endInstruction primitiveAddress | @@ -1750,7 +1748,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -1767,7 +1765,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1778,7 +1776,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallInteger [ | endInstruction primitiveAddress | @@ -1795,7 +1793,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallIntege self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -84). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1812,7 +1810,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 84). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1830,7 +1828,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17424). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand [ | endInstruction primitiveAddress | @@ -1848,7 +1846,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop instanceVariableCount | @@ -1874,7 +1872,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ equals: memory nilObject ] ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop arraySize | @@ -1904,7 +1902,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectlyWhenNotAligned [ | endInstruction primitiveAddress class newOop arraySize | @@ -1935,7 +1933,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1948,7 +1946,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1965,7 +1963,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1976,7 +1974,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1993,7 +1991,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2011,7 +2009,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -2029,7 +2027,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -2046,7 +2044,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2059,7 +2057,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2076,7 +2074,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -2093,7 +2091,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2104,7 +2102,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2121,7 +2119,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2139,7 +2137,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -2156,7 +2154,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ @@ -2175,7 +2173,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ @@ -2194,7 +2192,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ @@ -2213,7 +2211,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ @@ -2232,7 +2230,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -1). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ @@ -2250,7 +2248,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2263,7 +2261,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2280,7 +2278,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -2297,7 +2295,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -2314,7 +2312,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2325,7 +2323,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2342,7 +2340,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -10). ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2360,7 +2358,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallIntegers [ | result | @@ -2372,7 +2370,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallI self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentDoesNotReturn [ "If the argument is not an small integer, flow jumps and return does not (yet) happen" @@ -2398,7 +2396,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentD self assert: machineSimulator arg0RegisterValue equals: self memory falseObject. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self compile: [ @@ -2420,7 +2418,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsTrue [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st index c78d8ff140..5d37bd7ef3 100644 --- a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMJittedLookupTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMJittedLookupTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'methodOop', 'selectorOop', 'receiver', 'receiverClass' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -27,7 +25,7 @@ VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -40,7 +38,7 @@ VMJittedLookupTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -53,7 +51,7 @@ VMJittedLookupTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setUpClassAndMethod [ @@ -65,7 +63,7 @@ VMJittedLookupTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" @@ -92,7 +90,7 @@ VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ | superclass superclassMethodDictionary foundMethod | @@ -125,7 +123,7 @@ VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ self assert: foundMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> testLookUpMNUWithAnyNonMethodObjectShouldNotJItCompile [ | superclass superclassMethodDictionary foundMethod | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st index 76898f93d9..7f9a69d72f 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedPrimitiveAtPutTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveAtPutTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtPutTest >> setUp [ super setUp. @@ -23,7 +21,7 @@ VMJittedPrimitiveAtPutTest >> setUp [ bytecodes: 10. ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtPutTest >> setUpTrampolines [ super setUpTrampolines. @@ -32,7 +30,7 @@ VMJittedPrimitiveAtPutTest >> setUpTrampolines [ ] -{ #category : 'tests' } +{ #category : #tests } VMJittedPrimitiveAtPutTest >> testPrimitiveAtPut32bitIndexableWithLargeNumberShouldStoreValue [ | integerArray offset expectedValue | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st index e36762ff81..18d5ef041c 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedPrimitiveAtTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveAtTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitiveAtTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMJittedPrimitiveAtTest >> setUp [ bytecodes: 10. ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -43,7 +41,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -59,7 +57,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -75,7 +73,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBounds self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ | integerArray offset | @@ -102,7 +100,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -118,7 +116,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -144,7 +142,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShouldFallThrough [ | integerArray offset | @@ -160,7 +158,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShou self assertFallsThrough ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -176,7 +174,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ | integerArray offset | @@ -201,7 +199,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -230,7 +228,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -246,7 +244,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32BitsShouldFallthrough [ | integerArray offset | @@ -263,7 +261,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32Bits self assertFallsThrough ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldReturnValue [ | integerArray offset | @@ -290,7 +288,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldRe equals: SmallInteger maxVal + 1 ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldReturnValue [ | integerArray offset | @@ -317,7 +315,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldRe equals: (memory integerObjectOf: 17) ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -332,7 +330,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -347,7 +345,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -362,7 +360,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -377,7 +375,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThro self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -392,7 +390,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -407,7 +405,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBounds self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ | integerArray offset | @@ -433,7 +431,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -448,7 +446,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -463,7 +461,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -489,7 +487,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldRetu equals: expectedValue ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ | offset array | @@ -502,7 +500,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ | offset array | @@ -516,7 +514,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShouldFallThrough [ | objectWithInstanceVariables | @@ -533,7 +531,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShould self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShouldFallThrough [ | objectWithNoInstanceVariables | @@ -548,7 +546,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShou self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ machineSimulator receiverRegisterValue: (memory characterObjectOf: $a codePoint). @@ -557,7 +555,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -569,7 +567,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtSmallIntegerShouldFallThrough [ machineSimulator receiverRegisterValue: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st index 9771567a95..f1948eec9d 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedPrimitiveSizeTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveSizeTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitiveSizeTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveSizeTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMJittedPrimitiveSizeTest >> setUp [ bytecodes: 10. ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf16bitSlots [ | integerArray | @@ -43,7 +41,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf32bitSlots [ | integerArray | @@ -59,7 +57,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShouldReturnNumberOf32bitSlots [ | integerArray aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -85,7 +83,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShoul equals: 32768 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf64bitSlots [ | integerArray | @@ -101,7 +99,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8bitSlots [ | integerArray | @@ -117,7 +115,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8 equals: 7 ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots [ | array | @@ -131,7 +129,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 7) ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ | objectWithInstanceVariables | @@ -146,7 +144,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThrough [ self prepareStackForSendReceiver: (memory characterObjectOf: $a codePoint). @@ -154,7 +152,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThroug self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -165,7 +163,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateIntegerShouldFallThrough [ self prepareStackForSendReceiver: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st index 99c580ac58..c306428b27 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st @@ -1,23 +1,21 @@ Class { - #name : 'VMJittedPrimitivesTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMJittedPrimitivesTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'classFloat' ], #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'private' } +{ #category : #private } VMJittedPrimitivesTest class >> isAbstract [ ^ self == VMJittedPrimitivesTest ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -30,7 +28,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: argumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -43,7 +41,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument ] -{ #category : 'utils' } +{ #category : #utils } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: firstArgumentOop and: secondArgumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -56,13 +54,13 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument self runUntilReturn ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st index 17c2d6be67..94945ee4fb 100644 --- a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedSmallFloatPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedSmallFloatPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ "SmallFloats only exist in 64bits systems" @@ -17,7 +15,7 @@ VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -31,7 +29,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFl self assert: machineSimulator receiverRegisterValue equals: (self memory floatObjectOf: 3.0) ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -47,7 +45,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmal equals: 0.5 ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -63,7 +61,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse equals: memory falseObject ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -79,7 +77,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -95,7 +93,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -111,7 +109,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -127,7 +125,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenEqual [ cogit receiverTags: memory smallFloatTag. @@ -143,7 +141,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -159,7 +157,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -175,7 +173,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -191,7 +189,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -207,7 +205,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -223,7 +221,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -239,7 +237,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -255,7 +253,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -271,7 +269,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -287,7 +285,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASm equals: 6.0 ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -303,7 +301,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -319,7 +317,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : 'tests - primitiveSquareRoot' } +{ #category : #'tests - primitiveSquareRoot' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -334,7 +332,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASm equals: 2.0 sqrt ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSubtractTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. diff --git a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st index a1b3df39a5..63226acbf5 100644 --- a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMLiterRulesTest', - #superclass : 'TestCase', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMLiterRulesTest, + #superclass : #TestCase, + #category : #VMMakerTests } -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ | ast | @@ -21,7 +20,7 @@ VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ ast pragmas first). ] -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ | ast | @@ -32,7 +31,7 @@ VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ ast pragmas first) ] -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangTypeDeclarationForVariable [ | ast | diff --git a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st index 48bc2548f9..7094ce4b0e 100644 --- a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMLookUpTest', - #superclass : 'VMInterpreterTests', + #name : #VMLookUpTest, + #superclass : #VMInterpreterTests, #instVars : [ 'methodOop', 'selectorOop', @@ -14,12 +14,10 @@ Class { 'VMBasicConstants', 'VMBytecodeConstants' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest class >> testParameters [ ^ super testParameters * (ParametrizedTestMatrix new @@ -28,7 +26,7 @@ VMLookUpTest class >> testParameters [ yourself) ] -{ #category : 'assertions' } +{ #category : #assertions } VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ | length | @@ -39,19 +37,19 @@ VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ self deny: (memory isForwarded: selector) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMLookUpTest >> linearSearchLimit [ ^ linearSearchLimit ] -{ #category : 'accessing' } +{ #category : #accessing } VMLookUpTest >> linearSearchLimit: anObject [ linearSearchLimit := anObject ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -64,7 +62,7 @@ VMLookUpTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -77,7 +75,7 @@ VMLookUpTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : 'running' } +{ #category : #running } VMLookUpTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -133,7 +131,7 @@ VMLookUpTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setUpClassAndMethod [ @@ -145,7 +143,7 @@ VMLookUpTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ "We set a smallInteger class into the classTable" @@ -155,7 +153,7 @@ VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ equals: receiverClass ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsForwardedMethod [ | aMethodDictionary | @@ -171,7 +169,7 @@ VMLookUpTest >> testLookUpFindsForwardedMethod [ self assert: interpreter newMethod equals: methodOop. ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodInClass [ | aMethodDictionary | @@ -186,7 +184,7 @@ VMLookUpTest >> testLookUpFindsMethodInClass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodInSuperclass [ | superclass superclassMethodDictionary | @@ -211,7 +209,7 @@ VMLookUpTest >> testLookUpFindsMethodInSuperclass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ | aMethodDictionary | @@ -228,7 +226,7 @@ VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ self assertNonForwardedSelectorsIn: aMethodDictionary ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ | aMethodDictionary | @@ -243,7 +241,7 @@ VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -285,7 +283,7 @@ VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -321,7 +319,7 @@ VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ | superclass superclassMethodDictionary | @@ -343,7 +341,7 @@ VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ | nonExistingSelector superclass superclassMethodDictionary dnuMethodOop dnuSelectorOop | @@ -381,7 +379,7 @@ VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ | nonExistingSelector aMethodDictionary | @@ -402,7 +400,7 @@ VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ self should: [interpreter lookupMethodInClass: receiverClass] raise: Error. ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -436,7 +434,7 @@ VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ "There is no superclass, so no cannotInterpret: to call" @@ -458,7 +456,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ self should: [ interpreter lookupMethodInClass: receiverClass ] raise: Error ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUMethod [ "Class has a nil methodDictionary, so `cannotInterpret:` is send. But superclass does not understand it, so `doesNotUnderstand:` is called instead." @@ -504,7 +502,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUM self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -544,7 +542,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ self assert: interpreter newMethod equals: cannotInterpretMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ | aMethodDictionary receiverOop frame | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." @@ -569,7 +567,7 @@ VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformExecutes [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -587,7 +585,7 @@ VMLookUpTest >> testPrimitivePerformExecutes [ self assert: interpreter stackTop equals: receiverOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformFindsMethodOop [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -608,7 +606,7 @@ VMLookUpTest >> testPrimitivePerformFindsMethodOop [ "(1) the Instruction Pointer is set to be just before the bytecode to execute, so fetchNextBytecode will fetch the first bytecode ( #justActivateNewMethod: )" ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformSetsIPBeforeFirstBytecode [ | aMethodDictionary receiverOop | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." diff --git a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st index acd7a0e1c3..245cbd43ed 100644 --- a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st @@ -1,47 +1,46 @@ Class { - #name : 'VMMASTTranslationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMMASTTranslationTest, + #superclass : #TestCase, + #category : #VMMakerTests } -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> + arg [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> emptyBlockHasSingleNilStatement [ [ ] value ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineMethodWithLoop [ self methodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineSecondLevelMethodWithLoop [ self inlineMethodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineTwiceMethodWithLoop [ self methodWithLoop. self methodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineTwiceSecondLevelMethodWithLoop [ self inlineMethodWithLoop. self inlineMethodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ @@ -51,17 +50,17 @@ VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithArgument: anArgument [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithExpressionInLoopCondition [ 1 to: self something - 10 do: [ :i | self foo: i ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNil [ self something @@ -69,7 +68,7 @@ VMMASTTranslationTest >> methodWithIfNil [ ifNotNil: [ 2 ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNil [ self something @@ -78,7 +77,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNil [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ self something @@ -86,7 +85,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNil [ self something @@ -94,7 +93,7 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNil [ ifNil: [ 2 ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ self something @@ -102,14 +101,14 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ ifNil: [ ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilWithArgument [ self something ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ @@ -118,17 +117,17 @@ VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ self inlinedMethodWithLocalWithSameName. ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithLoop [ 1 to: 10 do: [ :i | self foo: i ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithNoArguments [ ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testArgumentIsNoTemp [ | translation method | @@ -138,7 +137,7 @@ VMMASTTranslationTest >> testArgumentIsNoTemp [ self deny: (translation locals includes: method methodNode arguments first name) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -175,7 +174,7 @@ VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -212,7 +211,7 @@ VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -244,7 +243,7 @@ VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ | translation method codeGenerator block | @@ -260,7 +259,7 @@ VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ self assert: block statements first value equals: nil ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ | translation | @@ -269,7 +268,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ self assert: translation statements first selector equals: #ifTrue:ifFalse: ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ | translation | @@ -289,7 +288,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ | translation | @@ -309,7 +308,7 @@ VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -324,7 +323,7 @@ VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ self assert: (translation locals includesAll: inlinedMethod locals) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -340,7 +339,7 @@ VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVar self assert: translation locals asSet size equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -355,7 +354,7 @@ VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVari self assert: translation locals asSet size equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -371,7 +370,7 @@ VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopInd self assert: translation locals asSet size equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ | method codeGenerator methodTranslation inlinedMethod inlinedMethodTranslation | @@ -391,7 +390,7 @@ VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ self assert: (methodTranslation declarations at: #cond2) equals: 'pthread_cond_t cond2' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testKeywordMethodHasArgument [ | translation method | @@ -401,7 +400,7 @@ VMMASTTranslationTest >> testKeywordMethodHasArgument [ self assert: (translation args includes: method methodNode arguments first name) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ | translation method loop | @@ -412,7 +411,7 @@ VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ self assert: loop arguments size equals: 4 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable [ | translation method loop | @@ -423,7 +422,7 @@ VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable self assert: loop arguments size equals: 6 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ | translation method block | @@ -434,7 +433,7 @@ VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ self deny: (translation locals includes: block arguments first) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid [ | translation codeGenerator | @@ -451,7 +450,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid self assert: translation returnType equals: #void ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ | translation codeGenerator | @@ -468,7 +467,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ self assert: translation returnType equals: #void ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ | translation | @@ -477,7 +476,7 @@ VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ self assert: translation selector equals: #+. ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ | translation method | @@ -487,7 +486,7 @@ VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ self assert: translation selector equals: method selector. ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateUnaryMethodHasSameName [ | translation method | diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st index 74591986af..bc7e61b968 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMMachineCodeFrameBuilderForTest', - #superclass : 'Object', + #name : #VMMachineCodeFrameBuilderForTest, + #superclass : #Object, #instVars : [ 'test', 'returnAddress', @@ -10,21 +10,20 @@ Class { 'spouseContext', 'method' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> arguments [ ^ arguments ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> arguments: anObject [ arguments := anObject ] -{ #category : 'building' } +{ #category : #building } VMMachineCodeFrameBuilderForTest >> buildFrame [ | methodAddress | @@ -55,13 +54,13 @@ VMMachineCodeFrameBuilderForTest >> buildFrame [ test cogit needsFrame: true. ] -{ #category : 'testing' } +{ #category : #testing } VMMachineCodeFrameBuilderForTest >> hasSpouseContext [ ^ spouseContext notNil ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ self test: aTest. @@ -71,63 +70,63 @@ VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ temporaries := #(). ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> method [ ^ method ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> method: anObject [ method := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> receiver [ ^ receiver ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> receiver: anObject [ receiver := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> returnAddress [ ^ returnAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> returnAddress: anObject [ returnAddress := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> spouseContext [ ^ spouseContext ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> spouseContext: aContextOop [ spouseContext := aContextOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> temporaries [ ^ temporaries ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> temporaries: anObject [ temporaries := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> test [ ^ test ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> test: anObject [ test := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st index b46584b7c3..a4ead00b02 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMMachineCodeMethod', - #superclass : 'Object', + #name : #VMMachineCodeMethod, + #superclass : #Object, #instVars : [ 'virtualMachine', 'cogMethodSurrogate' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogate: aCogMethodSurrogate [ ^ self new @@ -22,17 +20,17 @@ VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogat yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> cogMethodSurrogate [ ^ cogMethodSurrogate ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> cogMethodSurrogate: anObject [ cogMethodSurrogate := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> disassemble [ | methodEntry instructions | methodEntry := cogMethodSurrogate asInteger + virtualMachine cogit entryOffset. @@ -44,12 +42,12 @@ VMMachineCodeMethod >> disassemble [ ' join: (instructions collect: [:i | i assemblyCodeString]) ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st index b0cf51c095..bedd8c02a5 100644 --- a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMMachineSimulatorTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMMachineSimulatorTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogAbstractRegisters' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - instruction exception' } +{ #category : #'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ | label lastInstruction subInstruction breakInstruction | @@ -38,7 +36,7 @@ VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ ] -{ #category : 'tests - instruction exception' } +{ #category : #'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ | label lastInstruction subInstruction breakInstruction | @@ -67,7 +65,7 @@ VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -95,7 +93,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ | label lastInstruction invalidAddressHandled addInstruction jumpInstruction expectedAddress | @@ -139,7 +137,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ equals: expectedAddress ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ | label lastInstruction invalidAddressHandled | @@ -183,7 +181,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ ^ self ] ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespected [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -219,7 +217,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self temporaryRegisterValue equals: 1 ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespectedCorrectInstructionPointer [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -255,7 +253,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self machineSimulator instructionPointerRegisterValue equals: jumpInstruction address ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -282,7 +280,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -308,7 +306,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -335,7 +333,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -361,7 +359,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled exptectedAddress | @@ -397,7 +395,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAd self assert: invalidAddressHandled ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ | label lastInstruction subInstruction | @@ -423,7 +421,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstructionPointer [ | label lastInstruction subInstruction jumpInstruction | @@ -448,7 +446,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstru ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ | label lastInstruction | @@ -470,7 +468,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ self fail. ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPointer [ | label lastInstruction | @@ -494,7 +492,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPoi self fail. ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionUntilAddressIsRespected [ | label lastInstruction | diff --git a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st index 15c0afc846..be3b8ddce2 100644 --- a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st +++ b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMMockCodeGenerator', - #superclass : 'Object', + #name : #VMMockCodeGenerator, + #superclass : #Object, #instVars : [ 'interpreter', 'addedPrimitives' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ ^ self new @@ -18,13 +16,13 @@ VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ yourself ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> accessorDepthCalculator [ ^ self ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> accessorDepthForSelector: aString [ ^ addedPrimitives at: aString @@ -32,31 +30,31 @@ VMMockCodeGenerator >> accessorDepthForSelector: aString [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector [ self addPrimitive: aSelector accessorDepth: -1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector accessorDepth: aDepth [ addedPrimitives at: aSelector put: aDepth ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> exportedPrimitiveNames [ ^ (addedPrimitives keys collect: [ :e | e -> e ]) asDictionary ] -{ #category : 'initialization' } +{ #category : #initialization } VMMockCodeGenerator >> initialize [ addedPrimitives := Dictionary new ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> initializeWithPrimitiveTable [ interpreter primitiveTable @@ -64,7 +62,7 @@ VMMockCodeGenerator >> initializeWithPrimitiveTable [ thenDo: [ :aSelector | self addPrimitive: aSelector ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> interpreter: aCogVMSimulatorLSB [ interpreter := aCogVMSimulatorLSB. diff --git a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st index acfab19b5c..42382cc3ae 100644 --- a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMObjectAccessorIdentificationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests-Simulation', - #package : 'VMMakerTests', - #tag : 'Simulation' + #name : #VMObjectAccessorIdentificationTest, + #superclass : #TestCase, + #category : #'VMMakerTests-Simulation' } -{ #category : 'tests' } +{ #category : #tests } VMObjectAccessorIdentificationTest >> testObjectAccessorMessagesAreCorrectlyDetected [ | knownSelectors nonAccessorSelectors | diff --git a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st index 54dd7eedd7..5419d39e53 100644 --- a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st @@ -1,19 +1,17 @@ Class { - #name : 'VMObjectLayoutTests', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-ObjectLayoutTests', - #package : 'VMMakerTests', - #tag : 'ObjectLayoutTests' + #name : #VMObjectLayoutTests, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-ObjectLayoutTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMObjectLayoutTests >> formatFromInstSpec: instSpecInt instSize: instSizeInt [ "A class format is composed by" "<5 bits inst spec><16 bits inst size>" ^ instSpecInt << 16 + instSizeInt ] -{ #category : 'helpers' } +{ #category : #helpers } VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSize: aSizeInt [ | class | class := self @@ -23,7 +21,7 @@ VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSi ^class ] -{ #category : 'helper' } +{ #category : #helper } VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ | objSize | "always have at least one slot for forwarders" @@ -39,7 +37,7 @@ VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testCharacterIsImmediate [ | char | char := memory characterObjectOf: $a asInteger. @@ -47,7 +45,7 @@ VMObjectLayoutTests >> testCharacterIsImmediate [ self assert: (memory fetchClassTagOf: char) equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ | class objOop | 0 to: 254 do: [ :slots | @@ -63,19 +61,19 @@ VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ equals: objSize ] ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesInRange [ self assert: (memory isIntegerValue: memory minSmallInteger) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesNotInRange [ "An integer smaller than the smallest integer is not in a valid range" self deny: (memory isIntegerValue: memory minSmallInteger - 1) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectAlignment [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -86,7 +84,7 @@ VMObjectLayoutTests >> testObjectAlignment [ self assert: objOop2 \\ 8 equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ | class objOop header | 0 to: 254 do: [ :slots | @@ -97,7 +95,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ | class objOop header classIndex | 0 to: 10 do: [ :slots | @@ -110,7 +108,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ | class objOop header classInstSpec | "instSpec: @@ -125,7 +123,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout16Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 12-15 = 16-bit indexable @@ -147,7 +145,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout32Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 10-11 = 32-bit indexable @@ -167,7 +165,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout8Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 16-23 = 8-bit indexable @@ -194,7 +192,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayout [ | class objOop header classInstSpec instSpec | instSpec := 2. "instSpec for indexable objects with no inst vars (Array et al)" @@ -208,7 +206,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayo ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectMinimumSize [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -218,7 +216,7 @@ VMObjectLayoutTests >> testObjectMinimumSize [ self assert: objOop2 - objOop1 equals: 16 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ | class slots obj1oop obj2oop | "objects always are allocated with at least one slots for forwarding" @@ -229,7 +227,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ self assert: obj2oop - obj1oop equals: self objectHeaderSize + memory allocationUnit ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForwarding [ | class slots oop | slots := 0. @@ -238,7 +236,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForw self assert: (memory bytesInObject: oop) equals: self objectHeaderSize + memory allocationUnit. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ | class objOop slots | slots := 255. @@ -253,7 +251,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ | class objOop bigOopHeader mask numSlots | mask := 16rFFFFFFFFFFFFFF. @@ -267,7 +265,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ self assert: numSlots equals: slots ] ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ "Test of the border case when int = 2r000111111... . The highest possible value using usqInt encoding is (2**61) -1 since (2**61) can be confused with a pointer (on a 64 bits machine) Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guarantees the portability @@ -276,25 +274,25 @@ VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ self deny: (memory isIntegerValue: memory maxCInteger >> memory numSmallIntegerTagBits) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase2 [ "Test of the border case when int = 2r111000000 ... . Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guaranties the portability of the test on 32 and 64 bit computer. " self deny: (memory isIntegerValue: (memory maxCInteger >> memory numSmallIntegerTagBits) bitInvert) "<=> isIntegerValue: (0001111) bitInvert" ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesInRange [ self assert: (memory isIntegerValue: memory maxSmallInteger) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesNotInRange [ self deny: (memory isIntegerValue: memory maxSmallInteger + 1) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testSmallIntegerIsImmediate [ | int | int := memory integerObjectOf: 42. @@ -302,7 +300,7 @@ VMObjectLayoutTests >> testSmallIntegerIsImmediate [ self assert: (memory fetchClassTagOf: int) equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testVariableObjectWithInstVarsHasTheRightSize [ | class objOop fixedFieldsSize indexableSize | indexableSize := 12. diff --git a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st index c780fcb9c2..b3400f900f 100644 --- a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMObjectStackTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMObjectStackTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ @@ -14,7 +12,7 @@ VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ self assert: memory mournQueue equals: (memory objStackAt: 4098"MournQueueRootIndex") ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testNewMournQueueIsEmpty [ | objStack | @@ -24,7 +22,7 @@ VMObjectStackTest >> testNewMournQueueIsEmpty [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testNewObjectStackIsEmpty [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -35,7 +33,7 @@ VMObjectStackTest >> testNewObjectStackIsEmpty [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ | objStack | @@ -48,7 +46,7 @@ VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ ]. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -62,7 +60,7 @@ VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ ]. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopMournQueueReducesSize [ | objStack | @@ -72,7 +70,7 @@ VMObjectStackTest >> testPopMournQueueReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ | objStack | @@ -81,7 +79,7 @@ VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -91,7 +89,7 @@ VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectStackReducesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -102,14 +100,14 @@ VMObjectStackTest >> testPopObjectStackReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjects: n [ "Create an object stack at the position of the mark stack in the class table (4096)" self testPushObjects: n inStackAtIndex: 4096 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ memory ensureRoomOnObjStackAt: objectStackIndex. @@ -121,19 +119,19 @@ VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ self assert: (memory sizeOfObjStack: (memory objStackAt: objectStackIndex)) equals: n ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjectsAboveObjectStackLimit [ self testPushObjects: memory objectStackPageLimit + 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjectsToObjectStackLimit [ self testPushObjects: memory objectStackPageLimit ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushToMournQueueIncreasesSize [ | objStack | @@ -142,7 +140,7 @@ VMObjectStackTest >> testPushToMournQueueIncreasesSize [ self assert: (memory sizeOfObjStack: objStack) equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushToObjectStackIncreasesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st index 996a095879..71dbc2dd40 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPermanentSpaceImageReadingTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #name : #VMPermanentSpaceImageReadingTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-PermSpace' } -{ #category : 'utilities' } +{ #category : #utilities } VMPermanentSpaceImageReadingTest >> loadImage [ | memoryClass isa | @@ -40,7 +38,7 @@ VMPermanentSpaceImageReadingTest >> loadImage [ ] -{ #category : 'initialization' } +{ #category : #initialization } VMPermanentSpaceImageReadingTest >> setUp [ super setUp. @@ -52,7 +50,7 @@ VMPermanentSpaceImageReadingTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpaceImageReadingTest >> testLoadingImageHasEmptyPermSpaceWhenImageDoesNotHave [ self saveImage. diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st index 288eaf2d29..49cf813a85 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPermanentSpaceMemoryTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #name : #VMPermanentSpaceMemoryTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-PermSpace' } -{ #category : 'running' } +{ #category : #running } VMPermanentSpaceMemoryTest >> setUp [ super setUp. @@ -14,7 +12,7 @@ VMPermanentSpaceMemoryTest >> setUp [ self createWeakArrayClass ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ | permanentObject allInstances | @@ -27,7 +25,7 @@ VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ self assert: (memory fetchPointer: 0 ofObject: allInstances) equals: permanentObject. ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ | permanentObject oldObject youngReplacement arrFrom arrTo ec | @@ -54,7 +52,7 @@ VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ self deny: ec equals: PrimNoErr ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenModified [ | oldObject1 permanentObject1 | @@ -75,7 +73,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenMoving [ | oldObject1 permanentObject1 | @@ -96,7 +94,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ | permanentObject newObject | @@ -114,7 +112,7 @@ VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ | permanentObject oldObject | @@ -132,7 +130,7 @@ VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ | oldObject youngObject permanentObject | @@ -161,7 +159,7 @@ VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememberedSet [ | permanentObject youngObject rootObject| @@ -177,7 +175,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememb self assert: (memory getFromPermToNewSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRememberedSet [ | permanentObject oldObject rootObject| @@ -194,7 +192,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRemembe self assert: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded [ | permanentObject oldObject rootObject| @@ -217,7 +215,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ | permanentObject oldObject | @@ -232,7 +230,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesArray [ | permanentObject youngObject rootObject anArray| @@ -256,7 +254,7 @@ VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesAr self assert: (memory getMemoryMap isPermanentObject: youngObject). ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ | permanentObject | @@ -266,7 +264,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ self assert: permanentObject equals: memory getMemoryMap permSpaceStart + 16 "There is a zero-slot objects always in the perm space" ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ | permanentObject | @@ -276,7 +274,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ self deny: (memory getMemoryMap isYoungObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ | permanentObject | @@ -286,7 +284,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ self deny: (memory getMemoryMap isOldObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ | permanentObject | @@ -296,7 +294,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ self assert: (memory getMemoryMap isPermanentObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ | permanentObject nextObject | @@ -308,7 +306,7 @@ VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ | oldObject1 permanentObject1 oldObject2 youngObject | @@ -345,7 +343,7 @@ VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRememberedSetAndThenRemoved [ | oldObject1 oldObject2 permObject2 | @@ -369,7 +367,7 @@ VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRemembered self assert: memory getFromPermToNewSpaceRememberedSet rememberedSetSize equals: 0. ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ @@ -387,7 +385,7 @@ VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 array | @@ -408,7 +406,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInReme ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTheRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array youngObject | @@ -440,7 +438,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTh ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array | @@ -463,7 +461,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFro self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -483,7 +481,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -501,7 +499,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememb ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForwarderInOldSpace [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -516,7 +514,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForw self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: oldObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarderInScanvenge [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -533,7 +531,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarde self deny: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderInGC [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -550,7 +548,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderIn self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompactingForSaving [ | oldObject1 permanentObject1 oldObject2 oldObject2Hash | @@ -574,7 +572,7 @@ VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompa self assert: (memory hashBitsOf: (memory fetchPointer: 0 ofObject: permanentObject1)) equals: oldObject2Hash ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ | permanentObject oldObject oldClass oldClassHash found | @@ -600,7 +598,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ self assert: found ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered [ @@ -613,7 +611,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemembered [ @@ -626,7 +624,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ @@ -638,7 +636,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ @@ -651,7 +649,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedWhenPointingToMachineCodeMethod [ @@ -673,7 +671,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedW ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRememberedSet [ @@ -695,7 +693,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRemem ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -721,7 +719,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | @@ -750,7 +748,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNille ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -773,7 +771,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFire ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st index 5ba4cc63d3..7393d6f584 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st @@ -1,17 +1,15 @@ Class { - #name : 'VMPermanentSpacePrimitiveTest', - #superclass : 'VMAbstractPrimitiveTest', + #name : #VMPermanentSpacePrimitiveTest, + #superclass : #VMAbstractPrimitiveTest, #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #category : #'VMMakerTests-PermSpace' } -{ #category : 'configuring' } +{ #category : #configuring } VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ super configureEnvironmentBuilder. @@ -19,7 +17,7 @@ VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ environmentBuilder permSpaceSize: 10*1024*1024. ] -{ #category : 'initialization' } +{ #category : #initialization } VMPermanentSpacePrimitiveTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMPermanentSpacePrimitiveTest >> setUp [ self createWeakArrayClass. ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ interpreter push: (memory integerObjectOf: 42). @@ -37,7 +35,7 @@ VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ interpreter push: (self newZeroSizedObject). @@ -47,7 +45,7 @@ VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ interpreter push: (self newOldSpaceObjectWithSlots: 0). @@ -57,7 +55,7 @@ VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ | oldObj permObject | @@ -71,7 +69,7 @@ VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ | oldObject | @@ -86,7 +84,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ | oldObject | @@ -101,7 +99,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ | newObject | @@ -116,7 +114,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ | oldObject | @@ -131,7 +129,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksWithByteArray [ | oldObject | diff --git a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st index f23f44e730..2b4eea4684 100644 --- a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMPinnedObjectTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMPinnedObjectTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> lastAliveObject [ ^ self keptObjectInVMVariable2 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> lastPinnedObject [ ^ self keptObjectInVMVariable1 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newAliveObject [ | newAliveObject | newAliveObject := self newOldSpaceObjectWithSlots: 1. @@ -25,12 +23,12 @@ VMPinnedObjectTest >> newAliveObject [ ^ newAliveObject ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newDeadObject [ ^ self newOldSpaceObjectWithSlots: 1 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newKeptPinnedObject [ | newPinned | newPinned := self newOldSpaceObjectWithSlots: 1. @@ -40,7 +38,7 @@ VMPinnedObjectTest >> newKeptPinnedObject [ ^ newPinned ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed aliveHash | "D = Dead @@ -70,7 +68,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOld self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPinnedObject [ | aliveObject destination | "D = Dead @@ -98,7 +96,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPi self assert: self lastAliveObject equals: destination. ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -128,7 +126,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStar self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBeforeFirstPinned [ | aliveObject destination | "D = Dead @@ -156,7 +154,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBefore self assert: self lastAliveObject equals: destination. ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -186,7 +184,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfO self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDead [ | destination aliveObject aliveObjectHash | "D = Dead @@ -212,7 +210,7 @@ VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDea self assert: (memory isFreeObject: (memory objectAfter: self lastPinnedObject)). ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ "if we follow the forwarder, the object is in the old space" | obj | @@ -223,7 +221,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ self assert: (memory isInOldSpace: (memory followForwarded: obj)) ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForwarderBehind [ | obj | obj := self newObjectWithSlots: 0. @@ -233,7 +231,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForward self assert: (memory isForwarded: obj) ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinnedObjectShouldNotBeMovedByGC [ | pinned | self newOldSpaceObjectWithSlots: 0. "deadObject, that differenciate the start of the old space to the pin" diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st index 87474aad24..1c7a580223 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st @@ -1,17 +1,15 @@ Class { - #name : 'VMPrimitiveCallAbstractTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMPrimitiveCallAbstractTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'baseMethodIP', 'baseFrame', 'baseMethod' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver arguments: arguments returnAddress: returnAddress [ machineSimulator receiverRegisterValue: receiver. @@ -34,19 +32,19 @@ VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver a ] -{ #category : 'helpers' } +{ #category : #helpers } VMPrimitiveCallAbstractTest >> findMethod: aSelector [ ^ self class lookupSelector: aSelector ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> jitOptions [ ^ super jitOptions @@ -54,13 +52,13 @@ VMPrimitiveCallAbstractTest >> jitOptions [ yourself ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodReturningNil [ ^ nil ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ "This method is used to test sends. @@ -68,7 +66,7 @@ VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ ^ self methodWithSend: $7 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ "This method is used to test sends. @@ -76,7 +74,7 @@ VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ ^ self methodWithSend: Object ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ "This method is used to test sends. @@ -84,7 +82,7 @@ VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ ^ self methodWithSend: nil ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ "This method is used to test the invocation of a primitive. @@ -94,7 +92,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ ^ 84 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ "This method is used to test the invocation of a primitive. @@ -104,7 +102,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ ^ 84 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ @@ -112,7 +110,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ "This method is used to test the invocation of a primitive. @@ -122,7 +120,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ "This method is used to test the invocation of a primitive. @@ -132,13 +130,13 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodToCompile1 [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend [ "This method is used to test sends. @@ -146,7 +144,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend [ ^ self send ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend: arg [ "This method is used to test sends. @@ -154,7 +152,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend: arg [ ^ arg send ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveCallAbstractTest >> setUp [ | primitiveAccessorDepthTable | @@ -179,7 +177,7 @@ VMPrimitiveCallAbstractTest >> setUp [ ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveCallAbstractTest >> setUpTrampolines [ super setUpTrampolines. diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st index 084419c9cc..384475fb9b 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPrimitiveCallingTest', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #name : #VMPrimitiveCallingTest, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -28,7 +26,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLongStore [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -50,7 +48,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLong self assert: interpreter fetchByte equals: 16rF4 ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -72,7 +70,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: interpreter framePointer) equals: (memory integerObjectOf: -1) ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTempWithInternalActivation [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st index a0493b49f3..6ecb274692 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMPrimitiveTest', - #superclass : 'VMInterpreterTests', + #name : #VMPrimitiveTest, + #superclass : #VMInterpreterTests, #instVars : [ 'imageName' ], @@ -9,12 +9,10 @@ Class { 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'asserting' } +{ #category : #asserting } VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ | numSlotOop numSlotOopToCompare | @@ -28,7 +26,7 @@ VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMPrimitiveTest >> fillNewSpace [ "Allocate enough space to generate a full new space" @@ -40,7 +38,7 @@ VMPrimitiveTest >> fillNewSpace [ classIndex: memory arrayClassIndexPun) isNotNil ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -51,7 +49,7 @@ VMPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -78,7 +76,7 @@ VMPrimitiveTest >> setUp [ imageName := VMPrimitiveTest name ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> setUpForwardedObjects [ | class1 class2 object1 object2 array1 array2 | @@ -102,14 +100,14 @@ VMPrimitiveTest >> setUpForwardedObjects [ ^ object1. ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveTest >> tearDown [ imageName ifNotNil: [ imageName asFileReference ensureDeleteAll ]. super tearDown ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -122,7 +120,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -135,7 +133,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ | string | @@ -151,7 +149,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ interpreter push: (memory integerObjectOf: 1). @@ -166,7 +164,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -183,7 +181,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflow [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -196,7 +194,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflow [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ | maxSmallInt | @@ -214,7 +212,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -235,7 +233,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferen self assert: (memory isForwarded: object2) equals: true ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -256,7 +254,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ self assert: (memory fetchClassOf: object2) equals: class1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -277,7 +275,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSi self assert: (memory fetchClassOf: (memory followForwarded: object2)) equals: class1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -299,7 +297,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ self assert: (memory fetchInteger: 0 ofObject: object2) equals: 42. ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -325,7 +323,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferen self assert: (memory fetchInteger: 0 ofObject: (memory followForwarded: object2)) equals: 42 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -348,7 +346,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ self assert: (memory rawHashBitsOf: object2) equals: hash1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDifferentSize [ | class1 class2 object1 object2 hash1 hash2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -372,7 +370,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDiff self assert: (memory rawHashBitsOf: (memory followForwarded: object2)) equals: hash1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ | class immediate array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -391,7 +389,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -412,7 +410,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ self assert: interpreter primFailCode equals: PrimErrNoModification ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -432,7 +430,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ self assert: interpreter primFailCode equals: PrimErrObjectIsPinned ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNotCopyHash [ | class object1 object2 hash2BeforeBecome array1 array2 object2FromForwarder | class := self @@ -455,7 +453,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNot self assert: (memory hashBitsOf: object2) equals: hash2BeforeBecome ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -478,7 +476,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHa self deny: (memory hashBitsOf: object2) equals: hash2 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOriginalObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -498,7 +496,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOrigi self assert: (memory followForwarded: object1) equals: object2 ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacter [ interpreter push: (memory integerObjectOf: 65). @@ -508,7 +506,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacter [ self assert: interpreter stackTop equals: (memory characterObjectOf: 65). ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ | invalidNumber | @@ -527,7 +525,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ interpreter push: memory trueObject. @@ -538,7 +536,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -562,7 +560,7 @@ VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: interpreter stackTop. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -573,7 +571,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -588,7 +586,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -602,7 +600,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ | class objectInstance biggerClass objectForwarded array1 array2 | "Forwarding an object happens when becoming it with a bigger object" @@ -632,7 +630,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -644,7 +642,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ | class objectInstance | "I don't know how to force a bad argument count." @@ -667,7 +665,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -683,7 +681,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -698,7 +696,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ | class object slotIndex objectToPutInSlot | @@ -721,7 +719,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ self assert: interpreter primFailCode equals: 2. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -745,7 +743,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ self assert: interpreter primFailCode equals: PrimErrNoModification. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -761,7 +759,7 @@ VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -784,7 +782,7 @@ VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger >> memory numSmallIntegerTagBits)). @@ -795,7 +793,7 @@ VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -806,7 +804,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -817,7 +815,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ | string | @@ -834,7 +832,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ | string | @@ -848,7 +846,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -859,7 +857,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ "This insures the fact that no data is lost during the processing of usqInt by the primitive" @@ -875,7 +873,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ "111... 010110 -> -42 000... 010110 -> 21""" @@ -888,7 +886,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: 21). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -899,7 +897,7 @@ VMPrimitiveTest >> testPrimitiveBitOr1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -914,7 +912,7 @@ VMPrimitiveTest >> testPrimitiveBitOr2 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr3 [ interpreter push: (memory integerObjectOf: 16r0). @@ -929,7 +927,7 @@ VMPrimitiveTest >> testPrimitiveBitOr3 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr4 [ "This is to insure that primitiveBitOr executes a logical Or and not an XOr" @@ -945,7 +943,7 @@ VMPrimitiveTest >> testPrimitiveBitOr4 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ interpreter push: memory trueObject. @@ -959,7 +957,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -970,7 +968,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -981,7 +979,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ "This insure the fact that no data is lost during the processing of usqInt by the primitive" @@ -997,7 +995,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ interpreter push: (memory integerObjectOf: -73). @@ -1008,7 +1006,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> memory numSmallIntegerTagBits) - 1)). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShift1 [ interpreter push: (memory integerObjectOf: 2). @@ -1019,7 +1017,7 @@ VMPrimitiveTest >> testPrimitiveBitShift1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1032,7 +1030,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -1045,7 +1043,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ interpreter push: memory trueObject. @@ -1058,7 +1056,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftLeft [ interpreter push: (memory integerObjectOf: 16). @@ -1069,7 +1067,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftLeft [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftRight [ interpreter push: (memory integerObjectOf: 16). @@ -1080,7 +1078,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftRight [ self assert: interpreter stackTop equals: (memory integerObjectOf: 8). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ memory wordSize = 8 ifFalse: [ ^ self ]. "The 32 bits version of the primitive doesn't handle the negativ number case" @@ -1092,7 +1090,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ equals: (memory integerObjectOf: 16r1C00000000000000) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ "Insures no data is lost when bitshift overflows the integer type." @@ -1104,7 +1102,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ self assert: (interpreter stackTop) > (memory maxSmallInteger). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1115,7 +1113,7 @@ VMPrimitiveTest >> testPrimitiveBitXor1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor2 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1126,7 +1124,7 @@ VMPrimitiveTest >> testPrimitiveBitXor2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor3 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1137,7 +1135,7 @@ VMPrimitiveTest >> testPrimitiveBitXor3 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor4 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1148,7 +1146,7 @@ VMPrimitiveTest >> testPrimitiveBitXor4 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ interpreter push: memory trueObject. @@ -1162,7 +1160,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1173,7 +1171,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1184,7 +1182,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ "This guarantees the fact that no data is lost during the processing of usqInt by the primitive" "111... 111 @@ -1204,7 +1202,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> (memory numSmallIntegerTagBits + 1)))). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ interpreter push: (memory integerObjectOf: -42). @@ -1215,7 +1213,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 40). ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqualsZero [ interpreter push: self setUpForwardedObjects. @@ -1229,7 +1227,7 @@ VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqu ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZero [ interpreter push: self setUpForwardedObjects. @@ -1244,7 +1242,7 @@ VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZ ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ interpreter push: memory trueObject. @@ -1256,7 +1254,7 @@ VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDiv [ interpreter push: (memory integerObjectOf: 15). @@ -1269,7 +1267,7 @@ VMPrimitiveTest >> testPrimitiveDiv [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ interpreter push: (memory trueObject). @@ -1282,7 +1280,7 @@ VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1293,7 +1291,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1304,7 +1302,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ "In the primitive implementation of quo, it doesnt push the rest of the operation on the stack" @@ -1316,7 +1314,7 @@ VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1327,7 +1325,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1338,7 +1336,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 4). @@ -1349,7 +1347,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -1360,7 +1358,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1375,7 +1373,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivide [ interpreter push: (memory integerObjectOf: 4). @@ -1386,7 +1384,7 @@ VMPrimitiveTest >> testPrimitiveDivide [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 2). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ interpreter push: (memory trueObject). @@ -1398,7 +1396,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ "The interpreter fails because 42%4 != 0" @@ -1412,7 +1410,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1423,7 +1421,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1434,7 +1432,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1445,7 +1443,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1456,7 +1454,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 6). @@ -1467,7 +1465,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -42). @@ -1478,7 +1476,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -21). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self installFloatClass. @@ -1491,7 +1489,7 @@ VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1502,7 +1500,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 15). @@ -1513,7 +1511,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 15). @@ -1524,7 +1522,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1539,7 +1537,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory falseObject). @@ -1550,7 +1548,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -1561,7 +1559,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - Float64Array' } +{ #category : #'tests - primitiveAdd - Float64Array' } VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ | x y z result firstTerm size | @@ -1585,7 +1583,7 @@ VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 22.0. ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ interpreter push: (memory integerObjectOf: 1). @@ -1594,7 +1592,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1607,7 +1605,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1621,7 +1619,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1635,7 +1633,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1646,7 +1644,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1657,7 +1655,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1668,7 +1666,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1679,7 +1677,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -1690,7 +1688,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1701,7 +1699,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1716,7 +1714,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1727,7 +1725,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1738,7 +1736,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1749,7 +1747,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1760,7 +1758,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1771,7 +1769,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ interpreter push: (memory integerObjectOf: -1000). @@ -1782,7 +1780,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1793,7 +1791,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1808,7 +1806,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectWithArgCountLessThanOne [ |object1| "Tests the case where objectArg = 1 and: isOopFowarded: stackTop" @@ -1825,7 +1823,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectW self deny: interpreter failed. ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ |object1| "Tests the case where objectArg > 1 and: isOopFowarded: stackTop" @@ -1844,7 +1842,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ |object1| @@ -1860,7 +1858,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ interpreter push: memory trueObject. @@ -1872,7 +1870,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButDifferentType [ | object1 object2 | @@ -1891,7 +1889,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButD ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ | object | @@ -1907,7 +1905,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ | object | @@ -1921,7 +1919,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameValue [ | object1 object2 | @@ -1937,7 +1935,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameV ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ interpreter push: (memory trueObject). @@ -1950,7 +1948,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ interpreter push: (memory characterObjectOf: 66). @@ -1963,7 +1961,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ interpreter push: (memory integerObjectOf: 0). @@ -1976,7 +1974,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -1989,7 +1987,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -2004,7 +2002,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2019,7 +2017,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat . @@ -2035,7 +2033,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2051,7 +2049,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2067,7 +2065,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2092,7 +2090,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedBool [ interpreter push: (memory trueObject). @@ -2103,7 +2101,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedBool [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -2114,7 +2112,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ interpreter push: (memory integerObjectOf: 16). @@ -2125,7 +2123,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2136,7 +2134,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2147,7 +2145,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2158,7 +2156,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2169,7 +2167,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2180,7 +2178,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2195,7 +2193,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2206,7 +2204,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory trueObject). @@ -2217,7 +2215,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2228,7 +2226,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2239,7 +2237,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2250,7 +2248,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2261,7 +2259,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2272,7 +2270,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2283,7 +2281,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2294,7 +2292,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2309,7 +2307,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ | class array | @@ -2329,7 +2327,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ | class array | @@ -2347,7 +2345,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 0.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ | class array | @@ -2367,7 +2365,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ | class array | @@ -2387,7 +2385,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ | class array | @@ -2407,7 +2405,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ | class array | @@ -2427,7 +2425,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ | class array | @@ -2447,7 +2445,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ | class array | @@ -2469,7 +2467,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveMod [ interpreter push: (memory integerObjectOf: 16). @@ -2482,7 +2480,7 @@ VMPrimitiveTest >> testPrimitiveMod [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ interpreter push: (memory trueObject). @@ -2497,7 +2495,7 @@ VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2508,7 +2506,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 42). @@ -2520,7 +2518,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModNegativeValue [ interpreter push: (memory integerObjectOf: 16). @@ -2533,7 +2531,7 @@ VMPrimitiveTest >> testPrimitiveModNegativeValue [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ interpreter push: (memory integerObjectOf: memory maxCInteger >> memory numSmallIntegerTagBits). @@ -2546,7 +2544,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -2557,7 +2555,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2568,7 +2566,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ interpreter push: (memory trueObject). @@ -2581,7 +2579,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ interpreter push: (memory integerObjectOf: 16). @@ -2594,7 +2592,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2609,7 +2607,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -2620,7 +2618,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ interpreter push: (memory integerObjectOf: 16). @@ -2632,7 +2630,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ self assert: (interpreter stackValue: 2) equals: (memory integerObjectOf: 16). ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2644,7 +2642,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ | class | class := self newClassInOldSpaceWithSlots: 4 instSpec: memory nonIndexablePointerFormat. @@ -2655,7 +2653,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: interpreter stackTop) equals: 4 ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ | class | @@ -2669,7 +2667,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ | class | @@ -2683,7 +2681,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2694,7 +2692,7 @@ VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ self deny: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2706,7 +2704,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -2722,7 +2720,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2734,7 +2732,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2746,7 +2744,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2759,7 +2757,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2772,7 +2770,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2785,7 +2783,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ | newObj class | @@ -2802,7 +2800,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: newObj) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ | newObj class | @@ -2818,7 +2816,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: newObj) equals: 7 ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ | newObj class | @@ -2836,7 +2834,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ self assert: (memory getMemoryMap isOldObject: newObj) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ | class | @@ -2852,7 +2850,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ | class | @@ -2866,7 +2864,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ | class | @@ -2881,7 +2879,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ | class | @@ -2897,7 +2895,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ | class | @@ -2911,7 +2909,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ self assert: interpreter primFailCode equals: PrimErrBadArgument ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2922,7 +2920,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ | class | "class object with no slots, so no format" @@ -2934,7 +2932,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ | class | "class with nil used as format" @@ -2947,7 +2945,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2958,7 +2956,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2969,7 +2967,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 16). @@ -2980,7 +2978,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2991,7 +2989,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3006,7 +3004,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -3017,7 +3015,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -3028,7 +3026,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -3039,7 +3037,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ interpreter push: (memory integerObjectOf: 16). @@ -3050,7 +3048,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ interpreter push: (memory instantiateClass: (self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat)). @@ -3062,7 +3060,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ |object object2| @@ -3081,7 +3079,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ self assert: (memory isPinned: object2). ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ |object| @@ -3101,7 +3099,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ |object| @@ -3121,7 +3119,7 @@ VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuo [ interpreter push: (memory integerObjectOf: 15). @@ -3131,7 +3129,7 @@ VMPrimitiveTest >> testPrimitiveQuo [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ interpreter push: (memory trueObject). @@ -3144,7 +3142,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -3155,7 +3153,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -3166,7 +3164,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ "Tests that the rest of the integer division is not pushed into the stack, as this is not expected in a primitive behavior" interpreter push: (memory integerObjectOf: 16). @@ -3178,7 +3176,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ self assert: (interpreter stackValue: 1) equals: (memory integerObjectOf: 16). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ interpreter push: (memory integerObjectOf: 42). @@ -3189,7 +3187,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -3200,7 +3198,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -3211,7 +3209,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ interpreter push: (memory integerObjectOf: -13). @@ -3222,7 +3220,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 6). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -3233,7 +3231,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3248,7 +3246,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ interpreter push: (memory integerObjectOf: 1). @@ -3258,7 +3256,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ self assert: interpreter failed ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ | class object | @@ -3273,7 +3271,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ self assert: (memory isImmutable: object) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ | method | @@ -3288,7 +3286,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ | array1 | @@ -3301,7 +3299,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ | method | @@ -3316,7 +3314,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ | array1 array2 arrayForwarder arrayForwardee | @@ -3341,7 +3339,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderResolutionAndCallPrimitiveAgain [ | array1 array2 arrayForwarder arrayForwardee | @@ -3368,7 +3366,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderReso ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ | class objectInstance | "Forwarding an object happens when becoming it with a bigger object" @@ -3384,7 +3382,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3399,7 +3397,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3414,7 +3412,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3430,7 +3428,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3446,7 +3444,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3462,7 +3460,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3484,7 +3482,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3501,7 +3499,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ equals: (memory smallFloatObjectOf: 10.0) ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3518,7 +3516,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPre self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3535,7 +3533,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3549,7 +3547,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3563,7 +3561,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3581,7 +3579,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3598,7 +3596,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ equals: (memory smallFloatObjectOf: 1.0) ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3615,7 +3613,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeError self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3632,7 +3630,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErro self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3650,7 +3648,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStac self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 0.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3664,7 +3662,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3678,7 +3676,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperan self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3691,7 +3689,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3709,7 +3707,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3724,7 +3722,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3739,7 +3737,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3753,7 +3751,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3767,7 +3765,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3784,7 +3782,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3803,7 +3801,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3818,7 +3816,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3833,7 +3831,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3850,7 +3848,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3867,7 +3865,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithT self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3884,7 +3882,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWith self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3898,7 +3896,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirs self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3912,7 +3910,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSeco self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3932,7 +3930,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3947,7 +3945,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3962,7 +3960,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3979,7 +3977,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3996,7 +3994,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4010,7 +4008,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4024,7 +4022,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4043,7 +4041,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4058,7 +4056,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4073,7 +4071,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4088,7 +4086,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4105,7 +4103,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4122,7 +4120,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4136,7 +4134,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4150,7 +4148,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4169,7 +4167,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4184,7 +4182,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4201,7 +4199,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4217,7 +4215,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOpera ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4233,7 +4231,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOper ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4252,7 +4250,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesSta ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4274,7 +4272,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4290,7 +4288,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4307,7 +4305,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ equals: (memory smallFloatObjectOf: 100.0) ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4326,7 +4324,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErr ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4345,7 +4343,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeEr ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4359,7 +4357,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4373,7 +4371,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4391,7 +4389,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4406,7 +4404,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4421,7 +4419,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4438,7 +4436,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErr self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4455,7 +4453,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4469,7 +4467,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4483,7 +4481,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4502,7 +4500,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4517,7 +4515,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4532,7 +4530,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4549,7 +4547,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4563,7 +4561,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4577,7 +4575,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4596,7 +4594,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ | method frame contextOop contextIdentityHash suspendedContext | @@ -4629,7 +4627,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ equals: contextIdentityHash ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ | method | @@ -4651,7 +4649,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ interpreter imageReader validateImage: imageName ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ | method object objectHash | @@ -4678,7 +4676,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ equals: objectHash ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ | class array | @@ -4699,7 +4697,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ | class array | @@ -4720,7 +4718,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ | class array | @@ -4739,7 +4737,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ | class array | @@ -4758,7 +4756,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ | class array | @@ -4777,7 +4775,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ | class array | @@ -4796,7 +4794,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ | class array | @@ -4815,7 +4813,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4831,7 +4829,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4848,7 +4846,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4866,7 +4864,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonC self assert: string contentEquals: (self newString: 'po') ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4881,7 +4879,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4904,7 +4902,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4922,7 +4920,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonChar self assert: string contentEquals: (self newString: 'po') ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -4942,7 +4940,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4962,7 +4960,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4982,7 +4980,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5002,7 +5000,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ | byteSymbol asciiOrder | @@ -5021,7 +5019,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -5034,7 +5032,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -5047,7 +5045,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ | string | @@ -5062,7 +5060,7 @@ VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ interpreter push: (memory integerObjectOf: 2). @@ -5077,7 +5075,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -5094,7 +5092,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ interpreter push: (memory integerObjectOf: memory minSmallInteger). @@ -5105,7 +5103,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ | minSmallInt | @@ -5123,7 +5121,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ interpreter setImageVersion: 110. @@ -5138,7 +5136,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 110). ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ | slots | @@ -5164,7 +5162,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ memory okayOop: (memory fetchPointer: i ofObject: interpreter stackTop) ] ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterSetsImageVersion [ interpreter push: memory nilObject. diff --git a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st index 895ba3b5f2..8ec7e8c742 100644 --- a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMPushThisContextRoutineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMPushThisContextRoutineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> setUp [ | contextClass | @@ -29,7 +27,7 @@ VMPushThisContextRoutineTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | @@ -74,7 +72,7 @@ VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ equals: contextOop ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -107,7 +105,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: LargeContextSlots. ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -142,7 +140,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: SmallContextSlots ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments expectedStackPointer | @@ -179,7 +177,7 @@ VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ | isLargeContext isInBlock routine numberOfArguments | @@ -216,7 +214,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ self assert: (memory fetchPointer: Context allSlots size +2 ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: 3). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ | isLargeContext isInBlock routine numberOfArguments | @@ -250,7 +248,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ | isLargeContext isInBlock routine numberOfArguments | @@ -285,7 +283,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop expectedStackPointer | @@ -323,7 +321,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ | isLargeContext isInBlock routine numberOfArguments | @@ -358,7 +356,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ self assert: (memory fetchPointer: ReceiverIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ | isLargeContext isInBlock routine numberOfArguments | @@ -398,7 +396,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ self assert: (memory fetchPointer: Context allSlots size + numberOfArguments + 3 ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testSingleContextReturnsNewSpouseInNewSpace [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | diff --git a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st index b5bfa609cb..9edefda0ad 100644 --- a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSegmentsImageFormatTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #name : #VMSegmentsImageFormatTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegment [ | header newSegmentSize | @@ -25,7 +23,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegme equals: (memory segmentManager segments at: 0) segSize ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage [ | header newSegmentSize | @@ -48,7 +46,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage equals: header firstSegSize + newSegmentSize ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBigger [ | newSegmentSize | @@ -61,7 +59,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBi self assert: newSegmentSize >= memory growHeadroom ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSmaller [ | newSegmentSize | @@ -76,7 +74,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSm self assert: newSegmentSize >= memory growHeadroom ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testMinimalImageHasASingleSegment [ diff --git a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st index 9b55da5b97..8a162f9399 100644 --- a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMSelectorIndexDereferenceRoutineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSelectorIndexDereferenceRoutineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ "32 bit platforms use a direct selector reference and not an index" @@ -20,7 +18,7 @@ VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ self assert: cogit ceDereferenceSelectorIndex isNil ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -31,7 +29,7 @@ VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ self assert: cogit ceDereferenceSelectorIndex notNil ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSpecialSelectorTable [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -60,7 +58,7 @@ VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSp self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> testPositiveSelectorIndexIsLookedUpInMethodLiterals [ "64 bit platforms use a selector index and a routine to map it to the real selector" diff --git a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st index 34f53a536e..8e4b9726e7 100644 --- a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSessionIdTest', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #name : #VMSessionIdTest, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMSessionIdTest >> testGlobalSessionID [ "The globalSessionID is stored as a 64 bit number, but for compatibility with older plugins, is restricted to postive signed 32 bit values" | vm predicted diff | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st index c9037f3998..1a7faad9a6 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimpleStackBasedCogitAbstractTest', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMSimpleStackBasedCogitAbstractTest, + #superclass : #VMSpurMemoryManagerTest, #instVars : [ 'cogit', 'codeSize', @@ -31,12 +31,10 @@ Class { 'VMBytecodeConstants', 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ ^ { @@ -44,7 +42,7 @@ VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ } ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ ^ ParametrizedTestMatrix new @@ -53,7 +51,7 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ yourself ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ ^ ParametrizedTestMatrix new @@ -62,26 +60,26 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ yourself ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSizeParameters [ ^ self wordSize64Parameters + self wordSize32Parameters ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> ISA: anISA [ isa := anISA ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> abstractInstructions [ ^ (0 to: cogit getOpcodeIndex - 1) collect: [ :i | cogit abstractOpcodes at: i ] ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure [ | before after | @@ -93,7 +91,7 @@ VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure self assert: (self readMemoryAt: after) equals: anOop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlockClosure [ | before | @@ -105,17 +103,17 @@ VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlock equals: before ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> callerAddress [ ^ callerAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> cogit [ ^ cogit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ "Compiles some native code using the code inside the block closure as builder. This version assumes the block has a single 1-bytecode statement @@ -124,13 +122,13 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ ^ self compile: aBlockClosure bytecodes: 2 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes [ ^ self compile: aBlockClosure bytecodes: bytecodes headerSize: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes headerSize: headerSize [ "Compiles some native code using the code inside the block closure as builder. @@ -155,7 +153,7 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecod ^ allocatedAddress ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ "We will call to this address" @@ -167,7 +165,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ sendAddress := self compile: [ cogit genSpecialSelectorSend ]. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampolineName [ | startAddress | @@ -187,7 +185,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampol ^ startAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytecodes: bytecodes [ "Call a compilation block initializing the compiler before. @@ -205,7 +203,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytec ^ aBlockClosure value ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ "Create the root context with a valid method" @@ -241,7 +239,7 @@ VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ baseFrame := interpreter framePointer ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ self @@ -251,13 +249,13 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ temporaries: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments [ self createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for machine code. @@ -288,7 +286,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress rec builder buildFrame ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ self @@ -297,7 +295,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ arguments: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress receiver: receiver arguments: arguments [. "I create a frameless call @@ -324,7 +322,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress re ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for interpreter. @@ -365,7 +363,7 @@ VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: return cogit needsFrame: true. ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ | specialObjectsOop | @@ -382,19 +380,19 @@ VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ memory specialObjectsOop: specialObjectsOop. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassemble [ ^ self disassembleFrom: cogInitialAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex [ ^ self disassembleFrom: anIndex opcodes: opcodes ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ machineSimulator disassembler @@ -407,25 +405,25 @@ VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberO pc: 0 ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue [ ^ machineSimulator framePointerRegisterValue ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue: aValue [ machineSimulator framePointerRegisterValue: aValue ] -{ #category : 'configuration' } +{ #category : #configuration } VMSimpleStackBasedCogitAbstractTest >> generateCaptureCStackPointers [ ^ true ] -{ #category : 'helpers - cog methods' } +{ #category : #'helpers - cog methods' } VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector: anSelectorOop [ | targetCog allocatedAddress | @@ -444,18 +442,18 @@ VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> getLastAddress [ ^ machineSimulator getLastAddress: self abstractInstructions. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initialCodeSize [ ^ 4 * 1024 ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ "I will create the initial stack with a well-known caller address so we know if the code comes back @@ -467,7 +465,7 @@ VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ | page | @@ -480,31 +478,31 @@ VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ machineSimulator framePointerRegisterValue: page baseAddress. ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> instructionPointer [ ^ self readRegister: machineSimulator instructionPointerRegister ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> interpreterClass [ ^ CogVMSimulatorLSB ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> jitCompilerClass [ ^ SimpleStackBasedCogit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod [ ^ self jitMethod: aHostCompiledMethod selector: memory nilObject ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: aSelectorOop [ | methodOop | @@ -514,7 +512,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: ^ cogit cog: methodOop selector: aSelectorOop ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> jitOptions [ ^ Dictionary newFromPairs: { @@ -524,7 +522,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitOptions [ #ObjectMemory. self memoryClass name } ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ | builder | @@ -533,12 +531,12 @@ VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ ^ builder ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> machineSimulator [ ^ machineSimulator ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ^ self wordSize = 4 @@ -546,7 +544,7 @@ VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ifFalse: [ Spur64BitCoMemoryManager ] ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ | compiler | @@ -561,13 +559,13 @@ VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> openMachineDebugger [ self openMachineDebuggerAt: cogInitialAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ ^ VMMachineCodeDebugger new @@ -578,7 +576,7 @@ VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ openWithSpec. ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pop [ | stackAddressIntegerValue poppedByteArray | @@ -595,13 +593,13 @@ VMSimpleStackBasedCogitAbstractTest >> pop [ ^ poppedByteArray ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> popAddress [ ^ self pop integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareCall [ machineSimulator hasLinkRegister @@ -614,13 +612,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareCall [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver arguments: arguments [ machineSimulator baseRegisterValue: cogit varBaseAddress. @@ -637,13 +635,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver ar self prepareCall ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> primitiveTraceLogSize [ ^ 256 * 8 "word size" ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ | stackAddressIntegerValue | @@ -664,7 +662,7 @@ VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ | aByteArray | @@ -673,7 +671,7 @@ VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ self push: aByteArray ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ | bytes | @@ -681,7 +679,7 @@ VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ ^ bytes integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ registerValue := ByteArray new: self wordSize. @@ -689,7 +687,7 @@ VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ " @@ -712,26 +710,26 @@ VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ ^ self readMemoryAt: machineSimulator framePointerRegisterValue - ((3 + anIndex) * self wordSize) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> receiverRegister: anInteger [ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> returnValue [ ^ self readRegister: machineSimulator receiverRegister ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress [ ^ self runFrom: startAddress until: endAddress timeout: 100000. "microseconds" ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress timeout: microseconds [ machineSimulator startAt: startAddress @@ -740,7 +738,7 @@ VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress t count: 0. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ "The different platforms generates code in a different way, so the number of opcodes can not be valid. Eg: ARM generates more instructions per opcode. It has to calculate the instructions to run differently" @@ -751,7 +749,7 @@ VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ count: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ machineSimulator startAt: cogInitialAddress @@ -761,7 +759,7 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ machineSimulator startAt: anAddress @@ -771,17 +769,17 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> sentSelector [ ^ sentSelector ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> sentSelector: anObject [ sentSelector := anObject ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUp [ super setUp. @@ -824,7 +822,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUp [ self initializeInitialStackFrame. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit allocateOpcodes: 80 bytecodes: 0 ifFail: [ self error: 'Could not allocate opcodes' ]. @@ -841,7 +839,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit methodZone manageFrom: cogit methodZoneBase to: memory getMemoryMap codeZoneEnd. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ "Create a send trampoline so we can stop..." @@ -868,7 +866,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ ^ (self stackAt: index) @@ -877,7 +875,7 @@ VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ signed: false ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ | stackAddressIntegerValue | @@ -887,37 +885,37 @@ VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ ^ machineSimulator memoryAt: stackAddressIntegerValue readNext: self wordSize. ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue: aValue [ machineSimulator stackPointerRegisterValue: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> temporaryRegisterValue [ ^ self machineSimulator temporaryRegisterValue ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> top [ ^ self stackAt: 0 ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> topAddress [ ^ self top integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st index c43441d889..da38e1895e 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitBytecodeTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitBytecodeTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -27,7 +25,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVa self runGeneratedCode. ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrameful onBlock: generationBlock [ | oldFP oldSP | @@ -47,7 +45,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrame self assert: oldSP equals: self stackPointerRegisterValue. ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister: anAddress withFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -60,7 +58,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister self assert: machineSimulator receiverRegisterValue equals: anAddress ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -71,50 +69,50 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isF self runUntilReturn. ] -{ #category : 'tests - extended store bytecode - store inst var' } +{ #category : #'tests - extended store bytecode - store inst var' } VMSimpleStackBasedCogitBytecodeTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable1 [ self testExtendedPushPushesInstanceVariable: 1 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable2 [ self testExtendedPushPushesInstanceVariable: 2 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable3 [ self testExtendedPushPushesInstanceVariable: 3 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable32 [ self testExtendedPushPushesInstanceVariable: 32 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable64 [ self testExtendedPushPushesInstanceVariable: 64 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable: instanceVariableToWrite [ self testExtendedPushPushesVariableType: 0 "Instance variable type" index: instanceVariableToWrite ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type index: instanceVariableToWrite [ "Type = 0 is instance variable" @@ -138,7 +136,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - jumps' } +{ #category : #'tests - jumps' } VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ | firstBytecode | @@ -178,67 +176,67 @@ VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ equals: memory trueObject ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempPopsValue [ self testPopIntoTempPopsValueAt: 3 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 3 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempPopsValue [ self testPopIntoTempPopsValueAt: 4 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 4 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempPopsValue [ self testPopIntoTempPopsValueAt: 5 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 5 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempPopsValue [ self testPopIntoTempPopsValueAt: 6 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 6 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempPopsValue [ self testPopIntoTempPopsValueAt: 7 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 7 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -246,7 +244,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -254,7 +252,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -262,19 +260,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempPopsValue [ self testPopIntoTempPopsValueAt: 1 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 1 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -282,55 +280,55 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresEigthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFifthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFirstInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFourthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSecondInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSeventhInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSixthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresThirdInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite. @@ -339,7 +337,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStores self assert: (memory fetchPointer: instanceVariableToWrite - 1 ofObject: obj) equals: memory falseObject ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -347,19 +345,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempPopsValue [ self testPopIntoTempPopsValueAt: 2 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 2 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -367,7 +365,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecod self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -375,7 +373,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableUnderTest [ | temporaries | @@ -402,7 +400,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableU self assert: self popAddress equals: memory trueObject ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVariableUnderTest [ | temporaries | @@ -427,7 +425,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVar self assert: (self readTemporaryValueAt: tempVariableUnderTest) equals: memory falseObject ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -435,157 +433,157 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 10 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 10 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 11 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 11 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 12 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 12 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 13 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 13 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 14 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 14 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 15 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 15 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush3rdTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 3 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 4 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 4 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 5 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 5 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 6 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 6 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 7 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 7 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 8 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 8 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 9 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 9 ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse [ self compile: [ cogit genPushConstantFalseBytecode ]. @@ -594,7 +592,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - two bytecodes' } +{ #category : #'tests - two bytecodes' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self compile: [ @@ -606,7 +604,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self assert: machineSimulator receiverRegisterValue equals: memory nilObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self compile: [ cogit genPushConstantNilBytecode ]. @@ -615,7 +613,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self assert: self popAddress equals: memory nilObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self compile: [ cogit genPushConstantTrueBytecode ]. @@ -624,7 +622,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self assert: self popAddress equals: memory trueObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallIntegerZero [ self compile: [ cogit genPushConstantZeroBytecode ]. @@ -633,19 +631,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallI self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 1 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 1 ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusOne [ cogit byte0: 116. @@ -656,7 +654,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusO self assert: self popAddress equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ cogit byte0: 118. @@ -667,7 +665,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ self assert: self popAddress equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ cogit byte0: 119. @@ -678,7 +676,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ self assert: self popAddress equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ cogit byte0: 117. @@ -689,7 +687,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver [ machineSimulator receiverRegisterValue: 75. @@ -700,103 +698,103 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver self assert: self popAddress equals: 75 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEighthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 8 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEleventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 11 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 15 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 5 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFirstVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 1 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 14 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 4 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesNinthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 9 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSecondVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 2 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSeventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 7 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 16 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 6 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 10 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirdVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 3 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 13 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTwelfthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 12 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -815,19 +813,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushe self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 2 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 2 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tempVariableUnderTest [ | arguments | @@ -850,7 +848,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tempVariableUnderTest [ | temporaries | @@ -875,13 +873,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushThirdTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 3 ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -920,7 +918,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFr equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -958,7 +956,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallF equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFrameCallsLargeMethodTrampoline [ | numberOfArguments methodObject method | @@ -995,7 +993,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFram equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFrameCallsSmallMethodTrampoline [ | numberOfArguments methodObject method | @@ -1032,13 +1030,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFram equals: numberOfArguments ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnRegister [ self @@ -1047,19 +1045,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnReg onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRegister [ self @@ -1068,13 +1066,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRe onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInReturnRegister [ self @@ -1085,7 +1083,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInRet cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ @@ -1093,7 +1091,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ @@ -1101,7 +1099,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ @@ -1109,7 +1107,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInReturnRegister [ self @@ -1120,7 +1118,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInRe cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ @@ -1128,7 +1126,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ self @@ -1136,7 +1134,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInReturnRegister [ self @@ -1146,7 +1144,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInR cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ self @@ -1154,7 +1152,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ self @@ -1162,7 +1160,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectInReturnRegister [ self @@ -1172,7 +1170,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectIn cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ self @@ -1180,7 +1178,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1194,7 +1192,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsP equals: memory trueObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1209,7 +1207,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjec equals: memory falseObject ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1246,7 +1244,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector literalIndex | @@ -1274,7 +1272,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesReceiverFromStackTopIntoReceiverRegister [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1298,7 +1296,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesRecei equals: memory falseObject ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1325,7 +1323,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector | @@ -1352,7 +1350,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesReturnValueFromReceiverRegisterAfterReturn [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1381,7 +1379,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesRetu self assert: self popAddress equals: (memory integerObjectOf: 42) ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1396,7 +1394,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjec equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1411,7 +1409,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalOb equals: memory trueObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1431,7 +1429,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1456,7 +1454,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #+. @@ -1471,7 +1469,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1490,7 +1488,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelector equals: selectorAtIndex ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #+. @@ -1509,7 +1507,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1530,7 +1528,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1556,7 +1554,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #at:put:. @@ -1572,7 +1570,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ | signed | @@ -1598,7 +1596,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelector equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #at:put:. @@ -1618,7 +1616,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1637,7 +1635,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMoves equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64Bits [ | signed | @@ -1661,7 +1659,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegated equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #atEnd. @@ -1675,7 +1673,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceive self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelectorIntoClassRegisterIn32Bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1693,7 +1691,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelecto equals: selectorAtIndex ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #atEnd. diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st index c69374a214..e471e136aa 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st @@ -1,21 +1,19 @@ Class { - #name : 'VMSimpleStackBasedCogitCoggedMethods', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitCoggedMethods, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogMethodConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitCoggedMethods >> setUp [ super setUp. self setUpCogMethodEntry. ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndContinue [ | cogMethod otherBlock | @@ -30,7 +28,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: otherBlock ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndGoesToAbort [ | cogMethod otherBlock | @@ -45,7 +43,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: cogit ceMethodAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingNoCheckEntryDoesNotCheckClassTag [ | cogMethod otherBlock | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st index e2345429d5..021b93d5c5 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMSimpleStackBasedCogitMegamorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitMegamorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMMethodCacheConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ | specialSelectorsArray | @@ -27,7 +25,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ cogit generateOpenPICPrototype. ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICReturnsPIC [ | selector createdPic specialObjectsArray | @@ -38,13 +36,13 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICRet self assert: (cogit methodZone openPICWithSelector: selector) equals: createdPic. ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupNonExistingMegamorphicPICReturnsNil [ self assert: (cogit methodZone openPICWithSelector: memory trueObject) equals: nil ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ "We have to call the pic and see if it reaches the abort trampoline" @@ -76,7 +74,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ self assert: machineSimulator sendNumberOfArgumentsRegisterValue equals: createdPic address ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectPicAbortTrampoline [ | createdPic selector | @@ -89,7 +87,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectP equals: (cogit picAbortTrampolineFor: 1) ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numArgs [ | selector createdPic | @@ -98,43 +96,43 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numAr self assert: createdPic cmNumArgs equals: numArgs ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith1 [ self testNewMegamorphicPICNumArgs: 1 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith16 [ self testNewMegamorphicPICNumArgs: 16 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith2 [ self testNewMegamorphicPICNumArgs: 2 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith4 [ self testNewMegamorphicPICNumArgs: 4 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith8 [ self testNewMegamorphicPICNumArgs: 8 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWithoutArgs [ self testNewMegamorphicPICNumArgs: 0 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ | createdPic selector | @@ -143,7 +141,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ self assert: createdPic selector equals: selector ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ | createdPic selector | @@ -152,7 +150,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ self assert: createdPic blockSize equals: cogit openPICSize. ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ | selector createdPic | @@ -162,7 +160,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testRelinkCallSiteToMegamorphicPICCallsNewPIC [ | selector literalIndex method createdPic returnAfterCallAddress patchedCogMethod startAddress | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st index e1ff4724cd..64f66063c8 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitMonomorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitMonomorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ "Calculate the size of the Closed Pic" @@ -16,7 +14,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ self assert: cogit closedPICSize isNotNil ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineReplacesTheCallTargetWithTheCogMethodAddress [ "This is for the monomorphic case" @@ -66,7 +64,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineR self deny: executedTheTrampoline ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testObtainInlineCacheFromLinkedCall [ | sendingMethod targetCog selector executedTheTrampoline | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st index 2d4f3a96ab..1aba76164e 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimpleStackBasedCogitPolymorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitPolymorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'selector', 'numArgs', @@ -14,12 +14,10 @@ Class { #pools : [ 'CogMethodConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ ^ super testParameters * @@ -28,7 +26,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ yourself) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ | pic | "Only run this test if the test is configured for so much cases" @@ -39,7 +37,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ self assertPIC: pic hits: (cogMethods at: aCase) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ "Receiver is nil, class tag of the first entry is the receiver's class tag. - the receiver matches class tag for case 0 @@ -61,7 +59,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ "Receiver is nil, class tag of the first entry is 1 (a small integer). @@ -82,19 +80,19 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases [ ^ configuredPicCases ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases: aNumber [ configuredPicCases := aNumber ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ cogit @@ -104,7 +102,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ isMNUCase: false. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ | pic | @@ -119,7 +117,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ ^ pic ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ super setUp. @@ -160,7 +158,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ cogMethods at: index - 1 put: cogMethod ] "Maximum polymorphic cases" ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ | pic | @@ -169,7 +167,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ self assert: pic cPICNumCases equals: self configuredPicCases ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ | pic | pic := self makePolymorphicPIC. @@ -177,43 +175,43 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ self assert: (cogit backend callTargetFromReturnAddress: pic asInteger + cogit missOffset) equals: (cogit picAbortTrampolineFor: numArgs) ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase0 [ self assertHitAtCase: 0 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase1 [ self assertHitAtCase: 1 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase2 [ self assertHitAtCase: 2 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase3 [ self assertHitAtCase: 3 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase4 [ self assertHitAtCase: 4 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase5 [ "This is the last case. Cog PICs have 6 cases (0-based)" self assertHitAtCase: 5 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ | pic | pic := self makePolymorphicPIC. @@ -221,7 +219,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ self assert: pic cmType equals: CMPolymorphicIC. ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ | pic | @@ -231,7 +229,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ self assertPICMiss: pic ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ | pic | @@ -240,7 +238,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ self assert: pic cmNumArgs equals: numArgs ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEntryOffset [ | pic methodCheckEntryPoint methodNoCheckEntryPoint passedByCheckEntryPoint | @@ -271,7 +269,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEnt self deny: passedByCheckEntryPoint ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testSelectorInHeader [ | pic | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st index 00fe287064..7ab3e09968 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitRememberedSetTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitRememberedSetTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: value shouldCallTrampoline: shouldCallTrampoline [ | trampoline afterBytecode | @@ -30,14 +28,14 @@ VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: valu ] -{ #category : 'initialization' } +{ #category : #initialization } VMSimpleStackBasedCogitRememberedSetTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesNotCallTrampoline [ | newObject otherNewObject | @@ -50,7 +48,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesN shouldCallTrampoline: false ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesCallTrampoline [ | oldObject otherNewObject | @@ -64,7 +62,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesC shouldCallTrampoline: true ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesNotCallTrampoline [ | oldObject otherOldObject | @@ -78,7 +76,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesN shouldCallTrampoline: false ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInPermObjectDoesCallTrampoline [ | permObject otherPermObject | diff --git a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st index a3b6237cbb..b3b1b69113 100644 --- a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimulatedEnvironmentBuilder', - #superclass : 'Object', + #name : #VMSimulatedEnvironmentBuilder, + #superclass : #Object, #instVars : [ 'interpreter', 'interpreterClass', @@ -18,19 +18,17 @@ Class { 'permSpaceSize', 'allocateMemory' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> build [ self doBuildSimulator. self doBuild ] -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> doBuild [ "100 k at least to put the class table in the old space. @@ -87,7 +85,7 @@ VMSimulatedEnvironmentBuilder >> doBuild [ ] -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> doBuildSimulator [ objectMemory := objectMemoryClass simulatorClass new. @@ -102,17 +100,17 @@ VMSimulatedEnvironmentBuilder >> doBuildSimulator [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> initialCodeSize: anInteger [ initialCodeSize := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> initializationOptions: aCollection [ initializationOptions := aCollection ] -{ #category : 'initialization' } +{ #category : #initialization } VMSimulatedEnvironmentBuilder >> initialize [ super initialize. @@ -120,58 +118,58 @@ VMSimulatedEnvironmentBuilder >> initialize [ permSpaceSize := 0. ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> interpreter [ ^ interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> interpreterClass: aClass [ interpreterClass := aClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> memoryInitialAddress [ ^ initialAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> methodCacheSize [ ^ methodCacheSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> newSpaceSize [ ^ newSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> objectMemory [ ^ objectMemory ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> objectMemoryClass: aClass [ objectMemoryClass := aClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> oldSpaceSize [ ^ oldSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> permSpaceSize: anInteger [ permSpaceSize := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> primitiveTraceLogSize: anInteger [ primitiveTraceLogSize := anInteger ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ "Unicorn simulator requires mapped memory to be multiple of 4096" @@ -183,7 +181,7 @@ VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ ^ anInteger + (pageSize - remainder) ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ^ 4096. @@ -191,12 +189,12 @@ VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> stackSpaceSize [ ^ stackSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> wordSize: anInteger [ wordSize := anInteger ] diff --git a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st index 007b9984d9..f1c4a88d03 100644 --- a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimulationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests-Simulation', - #package : 'VMMakerTests', - #tag : 'Simulation' + #name : #VMSimulationTest, + #superclass : #TestCase, + #category : #'VMMakerTests-Simulation' } -{ #category : 'tests' } +{ #category : #tests } VMSimulationTest >> testSetUpJITSimulationReadsImage [ | options c | @@ -29,7 +27,7 @@ VMSimulationTest >> testSetUpJITSimulationReadsImage [ extraMemory: 100000. ] -{ #category : 'tests' } +{ #category : #tests } VMSimulationTest >> testSetUpNonJITSimulationReadsImage [ | options c | diff --git a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st index f09dcfb865..746c298210 100644 --- a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSistaSuperSendsTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSistaSuperSendsTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSistaSuperSendsTest >> jitOptions [ ^ super jitOptions @@ -14,7 +12,7 @@ VMSistaSuperSendsTest >> jitOptions [ yourself ] -{ #category : 'tests - sends/super' } +{ #category : #'tests - sends/super' } VMSistaSuperSendsTest >> testSuperSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector binding literalVariableIndex literalSelectorIndex startPC receiver expectedSelector | diff --git a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st index bcaf2eb03b..d5644e8ee9 100644 --- a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSistaTrampolineTest', - #superclass : 'VMTrampolineTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSistaTrampolineTest, + #superclass : #VMTrampolineTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSistaTrampolineTest >> jitOptions [ ^ super jitOptions @@ -14,7 +12,7 @@ VMSistaTrampolineTest >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMSistaTrampolineTest >> testSendTrampolineWithFourArguments [ | trampolineStart receiver | diff --git a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st index 45d181195e..f4a16ac4a2 100644 --- a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpecialSendArithmethicTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSpecialSendArithmethicTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpecialSendArithmethicTest class >> testParameters [ ^ super testParameters * { @@ -15,7 +13,7 @@ VMSpecialSendArithmethicTest class >> testParameters [ } ] -{ #category : 'running' } +{ #category : #running } VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop [ self assert: machineSimulator instructionPointerRegisterValue equals: sendTrampolineAddress. @@ -23,7 +21,7 @@ VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop self assert: machineSimulator arg0RegisterValue equals: argOop. ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTrampoline [ self @@ -33,7 +31,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTram shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoline [ self @@ -44,7 +42,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -54,7 +52,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCa shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCallsTrampoline [ self @@ -64,7 +62,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCalls shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsTrampoline [ self @@ -75,7 +73,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsT shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -85,7 +83,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSmallInteger [ self @@ -96,7 +94,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSm shouldPerformOperationReturning: expectedResult ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -106,7 +104,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgument shouldCallTrampolineWith: (memory integerObjectOf: value1) and: (memory integerObjectOf: value2) ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstReturnsSmallInteger [ self @@ -116,7 +114,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstRet shouldPerformOperationReturning: expectedResult. ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTrampoline [ self @@ -126,7 +124,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTra shouldCallTrampolineWith: (memory integerObjectOf: value2) and: memory trueObject ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -136,7 +134,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampo shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampoline [ self @@ -147,7 +145,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampol shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -158,7 +156,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentRet ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturnsSmallInteger [ self @@ -168,7 +166,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturn ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -179,7 +177,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturns ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampoline [ @@ -190,7 +188,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampo shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampoline [ self @@ -200,7 +198,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampolin ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline [ @@ -211,7 +209,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -222,7 +220,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentRetu shouldPerformOperationReturning: expectedResult ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturnsSmallInteger [ self @@ -233,7 +231,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturns ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -243,7 +241,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsS shouldPerformOperationReturning: expectedReflexiveResult ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampoline [ self @@ -254,7 +252,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampol shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline [ self @@ -264,7 +262,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ self @@ -274,7 +272,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ self @@ -283,7 +281,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ self @@ -293,7 +291,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampoline [ self @@ -303,7 +301,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampo shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampoline [ self @@ -312,7 +310,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampolin shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline [ self @@ -322,7 +320,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ self @@ -333,7 +331,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ self @@ -343,7 +341,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampoline [ self @@ -354,7 +352,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampol shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline [ self @@ -364,7 +362,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusTrueSelfCallsTrampoline [ self diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st index 494fea69d6..400872c055 100644 --- a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMSpurEphemeronsAlgorithmTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurEphemeronsAlgorithmTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'ephemeronObjectOopOne', 'ephemeronObjectOopTwo', 'nonEphemeronObjectOopOne', 'nonEphemeronObjectOopTwo' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'helper' } +{ #category : #helper } VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ memory storePointer: 0 @@ -24,7 +22,7 @@ VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ withValue: nonEphemeronObjectOopTwo ] -{ #category : 'helper' } +{ #category : #helper } VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ "Force ephemerons to not be collected by putting them in special variables" @@ -32,7 +30,7 @@ VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ self keepObjectInVMVariable2: ephemeronObjectOopTwo ] -{ #category : 'helper' } +{ #category : #helper } VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ "In pharo Ephemerons have 3 slots" @@ -41,7 +39,7 @@ VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : 'running' } +{ #category : #running } VMSpurEphemeronsAlgorithmTest >> setUp [ super setUp. @@ -49,7 +47,7 @@ VMSpurEphemeronsAlgorithmTest >> setUp [ self createEphemeronClass ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -72,7 +70,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -95,7 +93,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -119,7 +117,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -143,7 +141,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : 'tests - ephemerons with same key' } +{ #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ ephemeronObjectOopOne := self newEphemeronObject. @@ -161,14 +159,14 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect non ephemeoron objetc" + "Collect ephemerons" memory doScavenge: 1. self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : 'tests - ephemerons with same key' } +{ #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ ephemeronObjectOopOne := self newEphemeronObject. @@ -193,7 +191,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : 'tests - ephemerons with same key' } +{ #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ ephemeronObjectOopOne := self newEphemeronObject. @@ -211,14 +209,14 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect non ephemeron object" + "Collect ephemerons" memory fullGC. self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : 'tests - ephemerons with same key' } +{ #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -243,7 +241,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : 'tests - ephemerons with same key' } +{ #category : #'tests - ephemerons with same key' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ ephemeronObjectOopOne := self newEphemeronObjectOldSpace. @@ -268,7 +266,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ ephemeronObjectOopOne := self newEphemeronObject. @@ -292,7 +290,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ ephemeronObjectOopOne := self newEphemeronObject. @@ -316,7 +314,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ self assert: memory dequeueMourner equals: ephemeronObjectOopOne ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ ephemeronObjectOopOne := self newEphemeronObject. @@ -339,7 +337,7 @@ VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ self assert: memory dequeueMourner equals: ephemeronObjectOopTwo ] -{ #category : 'tests - finalization - algorithm' } +{ #category : #'tests - finalization - algorithm' } VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoungInverse [ ephemeronObjectOopOne := self newEphemeronObject. diff --git a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st index 6dc630f31b..1965e24efa 100644 --- a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMSpurInitializedOldSpaceTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurInitializedOldSpaceTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'testing' } +{ #category : #testing } VMSpurInitializedOldSpaceTest class >> isAbstract [ ^ self == VMSpurInitializedOldSpaceTest ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> assertFreeListEmpty: aFreeListOop [ self assert: aFreeListOop equals: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createEphemeronClass [ ourEphemeronClass := self createEphemeronClassForSlots: 3 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ | theNewClass formatWithSlots hash | @@ -40,7 +38,7 @@ VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ ^ theNewClass ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ | address | @@ -49,24 +47,24 @@ VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ ^ address ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> denyFreeListEmpty: aFreeListOop [ self deny: aFreeListOop equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurInitializedOldSpaceTest >> forgetObject3 [ memory coInterpreter profileMethod: memory nilObject ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeListForSize: allocationSize [ ^ memory freeLists at: allocationSize / memory allocationUnit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ "Initially the old space has a single big chunk of free memory and no small free chunks. @@ -79,7 +77,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ ^ memory freeLists at: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ "The free tree lists stores the oop of free tree nodes. @@ -90,7 +88,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ ^ memory startOfObject: self freeTreeRootOop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ^ memory @@ -98,7 +96,7 @@ VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ | class | @@ -109,14 +107,14 @@ VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" ^ self newOldEphemeronObjectWithSlots: 3 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ | class | @@ -127,7 +125,7 @@ VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -146,7 +144,7 @@ VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ ^ oop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ^ memory @@ -154,7 +152,7 @@ VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ^ memory @@ -162,7 +160,7 @@ VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ^ memory @@ -170,7 +168,7 @@ VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'running' } +{ #category : #running } VMSpurInitializedOldSpaceTest >> setUp [ super setUp. @@ -180,7 +178,7 @@ VMSpurInitializedOldSpaceTest >> setUp [ memory classByteArray: (self newClassInOldSpaceWithSlots: 0 instSpec: (memory byteFormatForNumBytes: 0)). ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> smallerNodeOf: aNode [ ^ memory diff --git a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st index a63471fcdc..8019a6749c 100644 --- a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSpurMemoryManagerTest', - #superclass : 'ParametrizedTestCase', + #name : #VMSpurMemoryManagerTest, + #superclass : #ParametrizedTestCase, #instVars : [ 'memory', 'interpreter', @@ -24,12 +24,10 @@ Class { 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> imageFormatParameters [ ^ { @@ -38,13 +36,13 @@ VMSpurMemoryManagerTest class >> imageFormatParameters [ } ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> testParameters [ ^ self wordSizeParameters * self imageFormatParameters ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -52,7 +50,7 @@ VMSpurMemoryManagerTest class >> wordSizeParameters [ yourself ] -{ #category : 'configuring' } +{ #category : #configuring } VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ environmentBuilder @@ -64,7 +62,7 @@ VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ primitiveTraceLogSize: self primitiveTraceLogSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createActiveProcess [ | processorOopAssociation processorOop processorListsArray priorities | @@ -86,7 +84,7 @@ VMSpurMemoryManagerTest >> createActiveProcess [ memory storePointer: ActiveProcessIndex ofObject: processorOop withValue: (self newArrayWithSlots: 4). ] -{ #category : 'initialization' } +{ #category : #initialization } VMSpurMemoryManagerTest >> createArrayClass [ | ourArrayClass | @@ -104,7 +102,7 @@ VMSpurMemoryManagerTest >> createArrayClass [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createEphemeronClass [ ourEphemeronClass := self newObjectWithSlots: 3. memory @@ -114,7 +112,7 @@ VMSpurMemoryManagerTest >> createEphemeronClass [ memory ensureBehaviorHash: ourEphemeronClass. ] -{ #category : 'utils' } +{ #category : #utils } VMSpurMemoryManagerTest >> createLargeIntegerClasses [ | classLargeInteger classLargeNegativeInteger | @@ -135,7 +133,7 @@ VMSpurMemoryManagerTest >> createLargeIntegerClasses [ withValue: classLargeNegativeInteger. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ | methodOop | @@ -145,7 +143,7 @@ VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ ^ methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> createWeakArrayClass [ ourWeakClass := self newObjectWithSlots: 3. memory @@ -156,43 +154,43 @@ VMSpurMemoryManagerTest >> createWeakArrayClass [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> emptyObjectSize [ "It is the header plus a word, padded to 8 bytes alignment" ^ self objectHeaderSize + "memory wordSize" 8 ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageReaderClass [ ^ imageReaderClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageReaderClass: anObject [ imageReaderClass := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageWriterClass [ ^ imageWriterClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageWriterClass: anObject [ imageWriterClass := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> initialCodeSize [ ^ 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializationOptions [ ^ { @@ -206,7 +204,7 @@ VMSpurMemoryManagerTest >> initializationOptions [ imageWriterClass name } ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ | ourArrayClass | @@ -228,7 +226,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ memory flushNewSpace. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ | freeListOop firstClassTablePage | @@ -292,7 +290,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ self deny: memory needGCFlag ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> initializeSpecialSelectors [ | specialSelectorsArrayOop | @@ -308,7 +306,7 @@ VMSpurMemoryManagerTest >> initializeSpecialSelectors [ memory splObj: SpecialSelectors put: specialSelectorsArrayOop ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMSpurMemoryManagerTest >> installFloat64RegisterClass [ | registerClass | @@ -327,7 +325,7 @@ VMSpurMemoryManagerTest >> installFloat64RegisterClass [ ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMSpurMemoryManagerTest >> installFloatClass [ | classFloat | @@ -343,52 +341,52 @@ VMSpurMemoryManagerTest >> installFloatClass [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" ] -{ #category : 'accessor' } +{ #category : #accessor } VMSpurMemoryManagerTest >> interpreter [ ^ interpreter ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> interpreterClass [ ^ StackInterpreterSimulatorLSB ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable1: anOop [ interpreter newMethod: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable2: anOop [ interpreter profileSemaphore: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable3: anOop [ interpreter profileMethod: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable1 [ ^ interpreter newMethod ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable2 [ ^ interpreter profileSemaphore ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable3 [ ^ interpreter profileMethod ] -{ #category : 'accessor' } +{ #category : #accessor } VMSpurMemoryManagerTest >> memory [ ^ memory ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> memoryClass [ ^ self wordSize = 4 @@ -396,13 +394,13 @@ VMSpurMemoryManagerTest >> memoryClass [ ifFalse: [ Spur64BitMemoryManager ] ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new16BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 2 format: memory firstShortFormat ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ | indexable | @@ -412,13 +410,13 @@ VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ ^ indexable ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new32BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 4 format: memory firstLongFormat ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ | indexable | @@ -428,31 +426,31 @@ VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ ^ indexable ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new64BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 8 format: memory sixtyFourBitIndexableFormat ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new8BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 1 format: memory firstByteFormat ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots [ ^ self newArrayWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: memory arrayFormat classIndex: anIndex ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSlot format: format [ | padding numberOfWordSizeSlots desiredByteSize | @@ -465,7 +463,7 @@ VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSl classIndex: self nextOrdinaryClassIndex ] -{ #category : 'asd' } +{ #category : #asd } VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ | oop | @@ -483,7 +481,7 @@ VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ ^ oop ] -{ #category : 'helpers - classes' } +{ #category : #'helpers - classes' } VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: format [ | newClass formatWithSlots | @@ -501,7 +499,7 @@ VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: ^ newClass ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -512,7 +510,7 @@ VMSpurMemoryManagerTest >> newEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arguments [ | method methodHeader | @@ -533,13 +531,13 @@ VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arg ^ method ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots [ ^ self newObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ | format | @@ -550,7 +548,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: format classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -562,7 +560,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: ^ oop ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -581,7 +579,7 @@ VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ ^ oop ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ ^ self @@ -589,13 +587,13 @@ VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots [ ^ self newOldSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -607,7 +605,7 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -619,13 +617,13 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat cla ^ oop ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentObjectWithSlots: slots [ ^ self newPermanentSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -639,7 +637,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: a classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -651,7 +649,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aForm ^ oop ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -697,7 +695,7 @@ VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newString: aString [ | vmString | @@ -716,7 +714,7 @@ VMSpurMemoryManagerTest >> newString: aString [ ^ vmString ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ ^ self @@ -725,7 +723,7 @@ VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ classIndex: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newZeroSizedObject [ ^ memory @@ -734,7 +732,7 @@ VMSpurMemoryManagerTest >> newZeroSizedObject [ classIndex: self zeroSizedObjectClassIndex. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ^ nextIndex @@ -742,18 +740,18 @@ VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ifNotNil: [ nextIndex := nextIndex + 1 ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> objectHeaderSize [ ^ memory baseHeaderSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> primitiveTraceLogSize [ ^ 0 ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ | aClass | aClass := self @@ -766,7 +764,7 @@ VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ withValue: aClass ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ | aClass | aClass := self @@ -779,7 +777,7 @@ VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ | class | @@ -803,7 +801,7 @@ VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUp [ super setUp. @@ -830,7 +828,7 @@ VMSpurMemoryManagerTest >> setUp [ memory lastHash: 1. ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUpScheduler [ "The ScheduleAssocation should be initialized to a valid Processor object" @@ -858,7 +856,7 @@ VMSpurMemoryManagerTest >> setUpScheduler [ memory memoryActiveProcess: activeProcessOop. ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUpUsingImage [ "/!\ Only runnable with a wordsize equals to your image's (needs disabling parametizing of wordsize) /!\" @@ -891,25 +889,25 @@ VMSpurMemoryManagerTest >> setUpUsingImage [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> sizeOfObjectWithSlots: slots [ ^ self objectHeaderSize + ((slots min: 1 "at least one for the forwarder pointer") * memory wordSize "bytes") ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> wordSize [ ^ wordSize ifNil: [ 8 ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> wordSize: aWordSize [ wordSize := aWordSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> zeroSizedObjectClassIndex [ ^ zeroSizedObjectClassIndex ifNil: [ self nextOrdinaryClassIndex ] diff --git a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st index 2617ab3f77..db41fee015 100644 --- a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurNewSpaceStructureTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurNewSpaceStructureTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> fillEden [ "Allocate enough objects to fill the eden." @@ -15,7 +13,7 @@ VMSpurNewSpaceStructureTest >> fillEden [ do: [ :index | self newZeroSizedObject ] ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject [ | freeStartBefore | @@ -26,7 +24,7 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAfterObject [ | freeStartBefore | @@ -37,38 +35,38 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAft self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenEndIsAtTheStartOfOldSpace [ self assert: memory scavenger eden limit equals: memory getMemoryMap newSpaceEnd ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenIsRestOfNewSpace [ self assert: memory scavenger eden size > (environmentBuilder newSpaceSize - memory scavenger pastSpace size - memory scavenger futureSpace size - interpreter interpreterAllocationReserveBytes) ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFreeStartIsEdenStart [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceEndIsAtTheStartOfEden [ self assert: memory scavenger futureSpace limit equals: memory scavenger eden start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger futureSpace size equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceStart [ "The future survivor start indicates during the execution of the scavenger, where the next free space in future space starts." @@ -76,13 +74,13 @@ VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceSt self assert: memory scavenger futureSurvivorStart equals: memory scavenger futureSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceEndIsAtTheStartOfFutureSpace [ self assert: memory scavenger pastSpace limit equals: memory scavenger futureSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart [ " - pastSpaceStart points to where the free space in the past space starts => it **does** move @@ -91,19 +89,19 @@ VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsAtTheStartOfNewSpace [ self assert: memory scavenger pastSpace start equals: memory getMemoryMap newSpaceStart ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger pastSpaceBytes equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ "Allocate enough objects to fill the eden." @@ -117,7 +115,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ self assert: error messageText equals: 'no room in eden for allocateNewSpaceSlots:format:classIndex:' ] ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ | futureSpaceStartBefore | @@ -127,7 +125,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ self assert: memory scavenger futureSurvivorStart equals: futureSpaceStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ | pastSpaceStartBefore | @@ -137,7 +135,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ self assert: memory pastSpaceStart equals: pastSpaceStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -148,7 +146,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ self assert: oop equals: freeStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -159,7 +157,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeade self assert: oop equals: freeStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testScavengeThresholdIsInsideTheEden [ self assert:(memory scavengeThreshold diff --git a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st index 04a758a911..9eb2876f3f 100644 --- a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurObjectAllocationTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurObjectAllocationTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ | oldFreeStart | @@ -16,7 +14,7 @@ VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ self assert: memory freeStart > oldFreeStart ] -{ #category : 'tests' } +{ #category : #tests } VMSpurObjectAllocationTest >> testAllocateObjectInOldSpaceMovesFreeStart [ | oldFreeStart | diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st index b86ff4e514..2e6576bb9a 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurOldSpaceBootstrapTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceBootstrapTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ | tableRoot | @@ -31,7 +29,7 @@ VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ equals: memory classTableRootSlots + memory hiddenRootSlots ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ | freeListOop | @@ -40,7 +38,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ self assert: (memory numSlotsOf: freeListOop) equals: memory numFreeLists ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ | freeListOop | @@ -49,7 +47,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ self assert: (memory formatOf: freeListOop) equals: memory wordIndexableFormat ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ | freeListOop | @@ -59,14 +57,14 @@ VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ self assert: (memory fetchPointer: i ofObject: freeListOop) equals: 0 ] ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid [ memory initializeFreeList. memory validFreeTree ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid2 [ memory initializeFreeList. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index a0dfca3596..0830123f51 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -1,20 +1,18 @@ Class { - #name : 'VMSpurOldSpaceGarbageCollectorTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurOldSpaceGarbageCollectorTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'objectStackLimit' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'assertion' } +{ #category : #assertion } VMSpurOldSpaceGarbageCollectorTest >> assertHashOf: anOop equals: aHash [ self assert: (memory hashBitsOf: anOop) equals: aHash ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ | initialSpace lastObjectToBeRemembered sizeOfLastObject | "The planning compactor frees object by sliding, and therefore does not reclaim memory if there is only dead objects in the oldspace." @@ -35,34 +33,34 @@ VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ ^ initialSpace - sizeOfLastObject - memory totalFreeListBytes ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> initializationOptions [ ^ super initializationOptions , { #ObjStackPageSlots . objectStackLimit } ] -{ #category : 'testing' } +{ #category : #testing } VMSpurOldSpaceGarbageCollectorTest >> isValidFirstBridge [ ^ memory segmentManager isValidSegmentBridge: (memory segmentManager bridgeAt: 0) ] -{ #category : 'running' } +{ #category : #running } VMSpurOldSpaceGarbageCollectorTest >> runCaseManaged [ ^ self runCase ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> setUp [ objectStackLimit := 10. super setUp. ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpace [ | anObjectOop slotsNumber | @@ -73,7 +71,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: anObjectOop isNil ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpaceShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -84,7 +82,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: memory needGCFlag ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFreeChunk [ | chuckSize chunk next object free | @@ -119,7 +117,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFr self assert: (memory isFreeObject: free). ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ | anObjectOop slotsNumber | @@ -130,7 +128,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ self assert: anObjectOop isNotNil ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldBeZero [ | anObjectOop slotsNumber | @@ -141,7 +139,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldB self assert: memory totalFreeOldSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -152,7 +150,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldP self assert: memory needGCFlag ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollected [ | deltaFreeSpace | @@ -162,7 +160,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollec self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShouldBeCollected [ | deltaFreeSpace | @@ -175,7 +173,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShou self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPermObjectShouldBeKept [ | oldObjectSize deltaFreeSpace | @@ -188,7 +186,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPer self assert: deltaFreeSpace equals: oldObjectSize ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedCycleObjectShouldBeCollected [ | deltaFreeSpace | @@ -202,7 +200,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedC self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeKept [ | oldOop objectSize deltaFreeSpace | @@ -216,7 +214,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assert: deltaFreeSpace equals: objectSize ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeMoved [ | anObjectOop hash | @@ -235,7 +233,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assertHashOf: self keptObjectInVMVariable1 equals: hash ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantained [ | deltaFreeSpace arrayOfPerms objectsSize aPermObject anOldObject originalRememberedSetSize afteRememberedSetSize numberOfObjects originalNewRememberedSetSize afteNewRememberedSetSize | @@ -262,7 +260,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: deltaFreeSpace equals: objectsSize + (afteRememberedSetSize - originalRememberedSetSize) + (afteNewRememberedSetSize - originalNewRememberedSetSize) ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantainedWhenObjectsMoved [ | numberOfObjects originalHashes permArray anOldObject | @@ -285,7 +283,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: (originalHashes at: i) equals: (memory hashBitsOf: (memory fetchPointer: i - 1 ofObject: permArray))] ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ | ephemeron | @@ -307,7 +305,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ | ephemeron | @@ -337,7 +335,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ memory fullGC. @@ -348,7 +346,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ self deny: (memory isFreeObject: (memory freeListsObj)). ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ | obj1 obj2 obj3 arrFrom arrTo arrFrom2 arrTo2 | @@ -380,7 +378,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ self assert: (memory isRemembered: arrTo2). ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ | roots ephemeron1 ephemeron2 ephemeron3 key1 key2 key3 | @@ -443,7 +441,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -481,7 +479,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQue equals: numberJustOverLimit ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail [ | ephemeron1 key | @@ -499,7 +497,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ | freespace freespace2 slotsNumber anObjectOop | @@ -520,7 +518,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ self assert: freespace equals: memory totalFreeOldSpace. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ | roots keyObj ephemeronObj | @@ -539,7 +537,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ self assert: memory dequeueMourner equals: nil. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ | roots keyObj ephemeronObj keyObj2 ephemeronObj2 | @@ -566,7 +564,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ self assert: memory dequeueMourner equals: nil. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -604,7 +602,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ equals: numberJustOverLimit ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronAsKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -619,7 +617,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronA memory fullGC ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -633,7 +631,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemer memory fullGC ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -650,7 +648,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEph memory fullGC ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testPageLimitMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st index 11d8661998..33212d0b85 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMSpurOldSpaceStructureTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceStructureTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceShouldHaveOneSegment [ self assert: memory segmentManager numSegments equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSameSizeAsOldSpace [ self @@ -20,7 +18,7 @@ VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSam equals: memory oldSpaceSize ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSizeShouldBeAskedMemory [ self assert: memory oldSpaceSize equals: oldSpaceSize diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st index 131ffcdd73..b923eade30 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurOldSpaceTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ memory allocateOldSpaceChunkOfBytes: memory totalFreeListBytes. @@ -14,7 +12,7 @@ VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ self assert: memory totalFreeListBytes equals: 0 ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self createFreeChunkOfSize: 120. @@ -26,7 +24,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: 24) ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists [ self createFreeChunkOfSize: 120. @@ -38,7 +36,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists self assertFreeListEmpty: (self freeListForSize: 120) ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ | smallerAddress newAddress | @@ -51,7 +49,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ self assert: newAddress equals: smallerAddress ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self createFreeChunkOfSize: 120. @@ -63,7 +61,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self denyFreeListEmpty: (self freeListForSize: 160) ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ | someBytes freeBytesBefore | @@ -74,7 +72,7 @@ VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ self assert: memory totalFreeListBytes equals: freeBytesBefore - someBytes ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ | secondAddress newAddress | @@ -85,7 +83,7 @@ VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ self deny: newAddress equals: secondAddress ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self createFreeChunkOfSize: 160. @@ -97,7 +95,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self denyFreeListEmpty: (self freeListForSize: 200) ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ | secondAddress | @@ -108,7 +106,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ self assert: (self freeListForSize: 160) equals: 0 ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ | secondAddress newAddress | @@ -118,7 +116,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ self assert: newAddress equals: secondAddress ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ memory allocateOldSpaceChunkOfBytes: (memory bytesInObject: self freeTreeRootOop). @@ -126,7 +124,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ self assert: self freeTreeRootOop equals: 0 ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -137,7 +135,7 @@ VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ | size childAddress smallerChildOop largerChildOop aBitBiggerThanHalf | @@ -156,7 +154,7 @@ VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ self assert: (memory bytesInObject: largerChildOop) equals: aBitBiggerThanHalf ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ | freeRootOopBeforeAllocation | @@ -167,7 +165,7 @@ VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ self deny: freeRootOopBeforeAllocation equals: self freeTreeRootOop ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ "Allocation should be contiguous because we have a single big chunk of memory to take memory from" @@ -178,7 +176,7 @@ VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ | address | @@ -187,7 +185,7 @@ VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ self assert: address isNil ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRoot [ | leftOverSize | @@ -197,7 +195,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRo self assert: (memory bytesInObject: self freeTreeRootOop) equals: leftOverSize ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList [ | leftOverSize | @@ -207,7 +205,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -220,7 +218,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ | sizeToAllocate powerOfSizeToAllocate leftOverSize | @@ -233,7 +231,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ | sizeToAllocate powerOfSizeToAllocate nonMultipleAddress newAddress | @@ -255,7 +253,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ self deny: newAddress equals: nonMultipleAddress. ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ | sizeToAllocate powerOfSizeToAllocate | @@ -267,7 +265,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ self assertFreeListEmpty: (self freeListForSize: powerOfSizeToAllocate) ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ | sizeToAllocate freeMultipleAddress newAddress powerOfSizeToAllocate | @@ -279,7 +277,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ self assert: newAddress equals: freeMultipleAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ | secondAddress newAddress | @@ -290,7 +288,7 @@ VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ self assert: newAddress equals: secondAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ | secondAddress thirdAddress | @@ -301,7 +299,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ self assert: secondAddress < thirdAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ | freeChunkStartAddress allocatedSize | @@ -313,7 +311,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ equals: freeChunkStartAddress + allocatedSize ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted [ | freeChunkStartAddressBeforeAllocation allocatedAddress | @@ -324,7 +322,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted equals: freeChunkStartAddressBeforeAllocation ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ | firstAddress byteSize smallerNodeOop | @@ -337,7 +335,7 @@ VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ self assert: smallerNodeOop equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian [ | newAddress freeLargeSpaceAddressBeforeAllocation freeAddress | @@ -351,7 +349,7 @@ VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian self assert: newAddress equals: freeLargeSpaceAddressBeforeAllocation ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ | smallerChild freeTreeRoot parentNode | @@ -364,7 +362,7 @@ VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ self assert: parentNode equals: freeTreeRoot ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ | freeTreeRoot size child1 child2 nextChildOop child3 siblingOop previousOop | @@ -391,7 +389,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ self assert: previousOop equals: nextChildOop. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ | freeTreeRoot size child1 child2 nextChildOop child3 largerOop largerThanSmaller siblingOop | @@ -423,7 +421,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ self assert: largerOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ | freeTreeRoot size child1 child2 nextChild child3 parentOop | @@ -450,7 +448,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ self assert: parentOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ | freeTreeRoot size child1 child2 nextChildOop child3 smallerOop smallerThanSmaller siblingOop | @@ -482,7 +480,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ self assert: smallerOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ | freeRoot address | @@ -494,7 +492,7 @@ VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ self assert: freeRoot equals: (memory freeLists at: 0) ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead [ | smallerChild freeTreeRoot size child1 child2 nextChild child3 | @@ -516,7 +514,7 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead self assert: nextChild equals: child2. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ | smallerChild freeTreeRoot size child1 child2 nextChild | @@ -534,13 +532,13 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ self assert: nextChild equals: child2. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testFalseObjectIsNotAnArray [ self deny: (memory isArray: memory falseObject). ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ | firstAddress secondAddress freeListHead chunkSize | chunkSize := 32. @@ -554,7 +552,7 @@ VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ self assert: freeListHead equals: secondAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ | secondAddress | @@ -564,7 +562,7 @@ VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ self assert: memory allFreeObjects size equals: 2 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize | allocationSize := 32. @@ -580,7 +578,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ self assert: nextFreeChunk equals: firstAddress ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize previousFreeChunk | allocationSize := 32. @@ -597,7 +595,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ self assert: previousFreeChunk equals: freeListHead ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChunks [ | secondAddress newAddress | @@ -609,7 +607,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChu self assert: memory allFreeObjects size equals: 3 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ | secondAddress allocationSize firstAddress | allocationSize := 32. @@ -622,7 +620,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ self assert: memory allFreeListHeads size equals: 1 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ | firstAddress freeListHead | @@ -638,7 +636,7 @@ VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ ] ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ 2 to: memory numFreeLists - 1 do: [ :numberOfSlots | @@ -648,7 +646,7 @@ VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ ] ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ | bigChunk nextNode | @@ -658,7 +656,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ | bigChunk nextNode | @@ -668,7 +666,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ | bigChunk nextNode | @@ -678,7 +676,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ | bigChunk nextNode | @@ -688,7 +686,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ | bigChunk nextNode | @@ -698,13 +696,13 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootIsFreeObject [ self assert: (memory isFreeObject: self freeTreeRootOop) ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ self @@ -712,7 +710,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ equals: memory totalFreeListBytes ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ | firstAddress byteSize smallerNodeOop | @@ -725,7 +723,7 @@ VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ self assert: (memory startOfObject: smallerNodeOop) equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop | @@ -746,7 +744,7 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ self assert: (memory startOfObject: largerChildOop) equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop parentNodeOop | @@ -768,13 +766,13 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ self assert: parentNodeOop equals: newRoot ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testNewMemoryShouldHaveSingleFreeObject [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ | oop | @@ -783,19 +781,19 @@ VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ self assert: (memory getMemoryMap isOldObject: oop) ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectIsNotAnArray [ self deny: (memory isArray: memory nilObject). ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectObjectFormatIsZero [ self assert: (memory formatOf: memory nilObject) equals: 0. ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFreeList [ | secondAddress freeChunksBefore | @@ -808,7 +806,7 @@ VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFr self assert: memory allFreeObjects size equals: freeChunksBefore. ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ | secondAddress | @@ -819,7 +817,7 @@ VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -831,7 +829,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ self assert: (self nextNodeOf: freeListHead) equals: 0 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -843,7 +841,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ self assert: (self previousNodeOf: freeListHead) equals: 0 ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ | smallerChild freeTreeRoot parentNode smallerSize rootSize | @@ -860,7 +858,7 @@ VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ self assert: parentNode equals: freeTreeRoot ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testTrueObjectIsNotAnArray [ self deny: (memory isArray: memory trueObject). diff --git a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st index dd5b734300..674b31f591 100644 --- a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurRememberedSetTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurRememberedSetTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests - from old to new' } +{ #category : #'tests - from old to new' } VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ | oldObjectAddress rememberedObjectAddress | @@ -24,7 +22,7 @@ VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ ] -{ #category : 'tests - from old to perm' } +{ #category : #'tests - from old to perm' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNewRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -42,7 +40,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNew ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress referencedOldObjectAddress | @@ -65,7 +63,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberP ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOldRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -84,7 +82,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOld ] -{ #category : 'tests - from perm to new' } +{ #category : #'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRememberedToo [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -101,7 +99,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRemembered ] -{ #category : 'tests - from perm to new' } +{ #category : #'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRememberedSet [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -119,7 +117,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRem ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ | oldObjectAddress | @@ -128,7 +126,7 @@ VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ | oldObjectRootAddress originalLimit youngObjectAddress | @@ -158,7 +156,7 @@ VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ self assert: memory getFromOldSpaceRememberedSet rememberedSetLimit equals: originalLimit * 2 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone [ | oldObjectAddress storedOldObjectAddress | @@ -172,7 +170,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: storedOldObjectAddress). ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress | @@ -188,7 +186,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObjec self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyone [ | oldObjectAddress youngObjectAddress | @@ -202,7 +200,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyon self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests - from old to perm' } +{ #category : #'tests - from old to perm' } VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone [ | permObjectAddress oldObjectAddress | @@ -216,7 +214,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests - from perm to perm' } +{ #category : #'tests - from perm to perm' } VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyone [ | permObjectAddress referencedPermObjectAddress | @@ -230,7 +228,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyon self deny: (memory isRemembered: referencedPermObjectAddress). ] -{ #category : 'tests - from new to perm' } +{ #category : #'tests - from new to perm' } VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyone [ | permObjectAddress youngObjectAddress | @@ -244,7 +242,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyo self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress youngObjectAddress | @@ -269,7 +267,7 @@ VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberP ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObject [ | oldObjectAddress youngObjectAddress | @@ -283,7 +281,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObjec self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObject [ | permObjectAddress youngObjectAddress | @@ -297,7 +295,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObj self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAnyone [ | youngObjectAddress storedYoungObjectAddress | @@ -311,7 +309,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAny self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testYoungObjectIsNotRemembered [ | newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st index 634ab1b369..665359f03f 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurScavengeEphemeronTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengeEphemeronTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'initialization' } +{ #category : #initialization } VMSpurScavengeEphemeronTest >> setUp [ super setUp. @@ -14,7 +12,7 @@ VMSpurScavengeEphemeronTest >> setUp [ self createEphemeronClass ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmptyMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -34,7 +32,7 @@ VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmpty self assert: memory dequeueMourner equals: nil ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ | numberOfEphemerons ephemeronKey | @@ -70,7 +68,7 @@ VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ withValue: memory nilObject ] ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeronClass [ | ephemeronObjectOop | @@ -81,7 +79,7 @@ VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeron equals: ourEphemeronClass ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -104,7 +102,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalO equals: memory nonIndexablePointerFormat ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -125,7 +123,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -152,7 +150,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -181,7 +179,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSu equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -202,7 +200,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAft equals: memory nonIndexablePointerFormat ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -221,7 +219,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -243,7 +241,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -267,7 +265,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorSho equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInEden [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -298,7 +296,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInPastSpace [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -340,7 +338,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlyOneEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -372,7 +370,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: nil ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlySecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -402,7 +400,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldBeQueuedAfterConsumingMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -440,7 +438,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldLeaveFirstOneAsEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -470,7 +468,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: (memory isEphemeron: ephemeronObjectOop) ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldScavengeKeyOfSecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -502,7 +500,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi equals: (memory remapObj: nonEphemeronObjectOop) ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeZeroSizedEphemeronShouldTreatItAsNormalObject [ | ephemeronObjectOop zeroSizedEphemeronClass hashBefore addressBefore | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st index 56c08746b3..ae428a6af8 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurScavengeWeakTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengeWeakTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'test-format' } +{ #category : #'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ | weakObjectOop | @@ -16,7 +14,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ self assert: (memory fetchClassOfNonImm: weakObjectOop) equals: ourWeakClass ] -{ #category : 'test-format' } +{ #category : #'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ | weakObjectOop classIndex | @@ -28,7 +26,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ self assert: classIndex equals: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash nilHash | @@ -52,7 +50,7 @@ VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldB equals: nilHash ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nilHash | @@ -72,7 +70,7 @@ VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNi equals: nilHash ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingSurvivorShouldLeaveWeakObjectAsIs [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st index 08ac1152d9..94f56ee281 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st @@ -1,19 +1,17 @@ Class { - #name : 'VMSpurScavengerTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengerTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'asserting' } +{ #category : #asserting } VMSpurScavengerTest >> assertPastSpaceIsEmpty [ self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurScavengerTest >> fullNewSpace [ | rootObjectAddress referencedObjectAddress freeStartAtBeginning | @@ -39,7 +37,7 @@ VMSpurScavengerTest >> fullNewSpace [ self error: 'New space is not full!' ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop receiver: aReceiverOop args: argsOops andStack: stackOops [ | page pointer | @@ -87,7 +85,7 @@ VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop withValue: (memory coInterpreter withSmallIntegerTags: page baseFP) ] ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScavenge [ | times | @@ -99,7 +97,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScaveng self deny: memory needGCFlag ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ | times anObjectOop | @@ -110,7 +108,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ self assert: (memory getMemoryMap isYoungObject: anObjectOop) ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ | times anObject | @@ -128,7 +126,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ self assert: (memory getMemoryMap isOldObject: anObject) ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge [ | times | @@ -146,7 +144,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge self assert: memory needGCFlag ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -167,7 +165,7 @@ VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ | rootObjectAddress | @@ -183,7 +181,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0 "Past space keep not full -> Not tenure next pass" ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ | rootObjectAddress | @@ -198,7 +196,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0.1 "Past space is full -> Tenure next pass" ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -221,7 +219,7 @@ VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -240,7 +238,7 @@ VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -259,7 +257,7 @@ VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -278,7 +276,7 @@ VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -297,7 +295,7 @@ VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -316,7 +314,7 @@ VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -338,7 +336,7 @@ VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ | rootObjectAddress newRootObjectAddress referencedObjectAddress referencedObjectHash | @@ -361,7 +359,7 @@ VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ equals: referencedObjectHash ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -381,7 +379,7 @@ VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress maybeMappedReferenceToYoungObject | @@ -401,7 +399,7 @@ VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterS self assert: maybeMappedReferenceToYoungObject equals: newRememberedObjectAddress ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferencedObjectIsInTheOldSpace [ | permObjectAddress youngObject otherOldObjectAddress | @@ -428,7 +426,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferenced ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceWhenMutatedToPointAPermObject [ | permObjectAddress youngObject otherPermObjectAddress | @@ -452,7 +450,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceW ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -472,7 +470,7 @@ VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ | rootObjectAddress rootObjectHash newRootObjectAddress referencedObjectAddress referencedObjectHash newReferencedObjectAddress | @@ -495,7 +493,7 @@ VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ self assert: (memory hashBitsOf: newReferencedObjectAddress) equals: referencedObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ | youngObjectAddress oneOldObjectAddress otherOldObjectAddress | @@ -520,7 +518,7 @@ VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces [ | oldPastSpaceStart oldFutureSpaceStart | @@ -533,7 +531,7 @@ VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces self assert: memory scavenger futureSpace start equals: oldPastSpaceStart. ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ "Nil should survive." "A new object not referenced should not survive." @@ -544,7 +542,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPastSpace [ "Only Nil should survive." @@ -556,7 +554,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPast self assertPastSpaceIsEmpty ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -581,7 +579,7 @@ VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBefo self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -606,7 +604,7 @@ VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInS self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -623,7 +621,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVar self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -640,7 +638,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObject self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ "Nil should survive. It is referenced by the roots because many of their slots are nilled." @@ -649,7 +647,7 @@ VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ memory doScavenge: 1 "TenureByAge". @@ -657,7 +655,7 @@ VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAndForth [ | oldPastSpaceStart oldFutureSpaceStart | @@ -670,7 +668,7 @@ VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAnd self assert: memory scavenger futureSpace start equals: oldFutureSpaceStart. ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder [ | rootObjectAddress objectThatShouldGoSecond objectThatShouldGoFirst | @@ -688,7 +686,7 @@ VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder self assert: (memory remapObj: objectThatShouldGoFirst) < (memory remapObj: objectThatShouldGoSecond) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects [ | firstRootObjectAddress nonRootObjectAddress secondRootObjectAddress | @@ -706,7 +704,7 @@ VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects self assert: (memory remapObj: secondRootObjectAddress) < (memory remapObj: nonRootObjectAddress) ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ | firstObjectAddress secondObjectAddress | @@ -738,7 +736,7 @@ VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ | rootObjectAddress newRootObjectAddress | @@ -762,7 +760,7 @@ VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ self assert: (memory isInOldSpace: newRootObjectAddress) ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ | objectA objectB | objectA := self newObjectWithSlots: 1. @@ -781,7 +779,7 @@ VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ | unreferencedRootObjectAddress referencedObjectAddress | unreferencedRootObjectAddress := self newObjectWithSlots: 1. @@ -796,7 +794,7 @@ VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -814,7 +812,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanve self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurviveScanvenge [ | permObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -832,7 +830,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurvive self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testYoungObjectsFromPermanentSpaceAreRemapped [ | newObjectOop newObjectHash permObject newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st index 6c7bc93c59..3b597fa124 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMSpurTreeAllocationStrategyForLargeTreeTest', - #superclass : 'VMSpurTreeAllocationStrategyForSmallTreeTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurTreeAllocationStrategyForLargeTreeTest, + #superclass : #VMSpurTreeAllocationStrategyForSmallTreeTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ " 1120 @@ -54,7 +52,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -62,7 +60,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWit self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -70,7 +68,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -78,7 +76,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWithChildrenShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -86,7 +84,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWit self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -94,7 +92,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTree self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -104,7 +102,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTree self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -112,7 +110,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTree self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -120,7 +118,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeN self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -130,7 +128,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeN self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -138,7 +136,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeN self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -146,7 +144,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSm self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -156,7 +154,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSm self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -164,7 +162,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSm self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -172,7 +170,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSma self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -181,7 +179,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSma self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSmallerLeafTreeNodeShouldShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -189,7 +187,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSma self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -197,7 +195,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLa self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -207,7 +205,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLa self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -215,7 +213,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLa self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. @@ -223,7 +221,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLar self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -233,7 +231,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLar self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test37AllocateBestFitLargerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st index 4340d04dd7..8fe74cb50a 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMSpurTreeAllocationStrategyForSmallTreeTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurTreeAllocationStrategyForSmallTreeTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationStrategyForSmallTreeTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUp [ super setUp. self setUpTree. ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ " 560 @@ -63,13 +61,13 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationStrategyForSmallTreeTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -77,7 +75,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithC self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 8. @@ -86,7 +84,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliput self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -94,7 +92,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -105,7 +103,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1152 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -113,7 +111,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRootAddress [ | desiredAddress allocatedAddress | @@ -123,7 +121,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2). @@ -131,7 +129,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNo self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseLargestSmallerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 8. @@ -140,7 +138,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -150,7 +148,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNo self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -161,7 +159,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1088 - allocatedSize) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3). @@ -169,7 +167,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNod self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseSmallerThanRootAddress [ | desiredAddress allocatedAddress | @@ -179,7 +177,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -189,7 +187,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNod self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldUseIntermediateNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -199,7 +197,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4). @@ -207,7 +205,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmal self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | allocatedSize := (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -217,7 +215,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1056 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -227,7 +225,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmal self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldUseRootNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 8. @@ -237,7 +235,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanL self assert: (memory bytesInObject: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 3) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5). @@ -245,7 +243,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmall self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -256,7 +254,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanL self denyFreeListEmpty: (self freeListForSize: 1120 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -265,7 +263,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmall self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldUseLargestLeafNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 8. @@ -274,7 +272,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6). @@ -282,7 +280,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLarg self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -294,7 +292,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1216 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -304,7 +302,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLarg self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldUseIntermediateLargerNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 8. @@ -313,7 +311,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7). @@ -321,7 +319,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLarge self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -333,7 +331,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1184 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -343,7 +341,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLarge self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateSmallerThanLiliputianDiffFromLargestLeaShouldFindNoMemory [ self assert: (memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 8) equals: nil diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st index 09933d96de..de185856c6 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMSpurTreeAllocationWithBigNodesTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurTreeAllocationWithBigNodesTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationWithBigNodesTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationWithBigNodesTest >> setUp [ " Allocate a tree that has a large child large enough so a remainder could still be larger than the root @@ -47,13 +45,13 @@ VMSpurTreeAllocationWithBigNodesTest >> setUp [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationWithBigNodesTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: 16. @@ -62,7 +60,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShould self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: 1008 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShouldBeInsertedInLarger [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) + 16. @@ -71,7 +69,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShou self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: 4080 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test03LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) * 2 + 16. diff --git a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st index bd476b58e7..03868c02d3 100644 --- a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st @@ -27,25 +27,23 @@ Types are not the exact types used. " Class { - #name : 'VMStackBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMStackBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'page', 'frames', 'args', 'methodBuilder' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'frames' } +{ #category : #frames } VMStackBuilder >> addFrame: aFrame [ frames add: aFrame ] -{ #category : 'frames' } +{ #category : #frames } VMStackBuilder >> addNewFrame [ | frame | "'add' a new frame in the sense of an OrderedCollection, which will be iterated with #do: @@ -55,17 +53,17 @@ VMStackBuilder >> addNewFrame [ ^ frame "the frame is then configured by the caller" ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> args [ ^ args ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> args: anObject [ args := anObject ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> buildStack [ self createStackPage. self preparePage. @@ -74,7 +72,7 @@ VMStackBuilder >> buildStack [ ^ frames last ] -{ #category : 'stack' } +{ #category : #stack } VMStackBuilder >> createStackPage [ | sp | frames ifEmpty:[ self error ]. @@ -85,17 +83,17 @@ VMStackBuilder >> createStackPage [ interpreter stackPointer: sp. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> frames [ ^ frames ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> frames: anObject [ frames := anObject ] -{ #category : 'initialization' } +{ #category : #initialization } VMStackBuilder >> initialize [ super initialize. frames := OrderedCollection new. "will be treated in reverse" @@ -105,35 +103,35 @@ VMStackBuilder >> initialize [ page := nil. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> lastFrame [ ^ frames last ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> methodBuilder [ ^ methodBuilder ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> methodBuilder: anObject [ methodBuilder := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> page [ ^ page ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> page: anObject [ page := anObject ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> preparePage [ "Page setup before the base frame" interpreter push: memory nilObject. "receiver" @@ -144,7 +142,7 @@ VMStackBuilder >> preparePage [ ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushAllButFirstFrames [ 2 to: frames size do: [ :anIndex | | aFrame | aFrame := frames at: anIndex. @@ -158,19 +156,19 @@ VMStackBuilder >> pushAllButFirstFrames [ ] ] -{ #category : 'initialization' } +{ #category : #initialization } VMStackBuilder >> pushArgs [ args do: [ :anArg | interpreter push: anArg ] ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushBaseFrame [ frames first previousFrameArgsSize: args size. self pushFrame: frames first. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushFrame: aFrame [ interpreter framePointer: interpreter stackPointer. @@ -180,18 +178,18 @@ VMStackBuilder >> pushFrame: aFrame [ page headSP: interpreter stackPointer. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushFrames [ self pushBaseFrame. self pushAllButFirstFrames. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMStackBuilder >> reset [ self initialize. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> setInterpreterVariables [ | lastFrame | interpreter setStackPageAndLimit: page. @@ -206,7 +204,7 @@ VMStackBuilder >> setInterpreterVariables [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> topFrame [ ^ frames last ] diff --git a/smalltalksrc/VMMakerTests/VMStackFrame.class.st b/smalltalksrc/VMMakerTests/VMStackFrame.class.st index 81b9be1e5e..ec06607f85 100644 --- a/smalltalksrc/VMMakerTests/VMStackFrame.class.st +++ b/smalltalksrc/VMMakerTests/VMStackFrame.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMStackFrame', - #superclass : 'Object', + #name : #VMStackFrame, + #superclass : #Object, #instVars : [ 'framePointer', 'interpreter' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^self new framePointer: anInteger; @@ -21,19 +19,19 @@ VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpre yourself ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMStackFrame class >> virtualMachine: aVirtualMachine fp: anInteger [ ^ self newFramePointer: anInteger withInterpreter: aVirtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> bytecodeMethod [ ^ VMBytecodeMethod newOnInterpreter: interpreter methodOop: self method ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> caller [ | callerContext | @@ -67,41 +65,41 @@ VMStackFrame >> caller [ ^ VMContext newOnContext: callerContext withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> callerContext [ ^ interpreter frameCallerContext: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> callerFP [ ^ interpreter frameCallerFP: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> context [ ^VMContext newOnContext: (interpreter frameContext: framePointer) withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> description [ | selector | selector := interpreter findSelectorOfMethod: self methodOop. ^ interpreter stringOf: selector ] -{ #category : 'accesing' } +{ #category : #accesing } VMStackFrame >> framePointer: anInteger [ framePointer := anInteger ] -{ #category : 'testing' } +{ #category : #testing } VMStackFrame >> hasContext [ ^interpreter frameHasContext: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> instructionPointer [ ^ interpreter framePointer = framePointer @@ -109,50 +107,50 @@ VMStackFrame >> instructionPointer [ ifFalse: [ interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : 'acccessing' } +{ #category : #acccessing } VMStackFrame >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : 'testing' } +{ #category : #testing } VMStackFrame >> isMachineCodeFrame [ ^ interpreter isMachineCodeFrame: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> machineCodeMethod [ | methodSurrogate | methodSurrogate := interpreter cogMethodZone methodFor: self method. ^ VMMachineCodeMethod newOnInterpreter: interpreter cogMethodSurrogate: methodSurrogate ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> method [ ^ interpreter iframeMethod: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> methodOop [ ^ interpreter frameMethodObject: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> receiver [ ^ interpreter framePointer = framePointer ifTrue: [ interpreter receiver ] ifFalse: [ self halt. interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> sender [ ^ VMStackFrame newFramePointer:(interpreter frameCallerFP: framePointer) withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> sourceCode [ ^ self isMachineCodeFrame @@ -160,7 +158,7 @@ VMStackFrame >> sourceCode [ ifFalse: [ self bytecodeMethod disassemble ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> stack [ | stack currentFrame | stack := OrderedCollection new. @@ -171,7 +169,7 @@ VMStackFrame >> stack [ ^ stack ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> stackPage [ ^interpreter stackPages stackPageFor: framePointer. ] diff --git a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st index 2e9960b95e..4a73d7c65e 100644 --- a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st @@ -1,34 +1,32 @@ Class { - #name : 'VMStackInterpreterTest', - #superclass : 'TestCase', + #name : #VMStackInterpreterTest, + #superclass : #TestCase, #instVars : [ 'stackInterpreterClass' ], - #category : 'VMMakerTests-StackInterpreter', - #package : 'VMMakerTests', - #tag : 'StackInterpreter' + #category : #'VMMakerTests-StackInterpreter' } -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> setUp [ super setUp. stackInterpreterClass := StackInterpreter. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackInterpreterTest >> stackInterpreterClass [ ^ stackInterpreterClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackInterpreterTest >> stackInterpreterClass: anObject [ stackInterpreterClass := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> testIsObjectAccessor [ self @@ -37,7 +35,7 @@ VMStackInterpreterTest >> testIsObjectAccessor [ assert: (self stackInterpreterClass isObjectAccessor: #fetchClassOf:) ] -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> testIsStackAccessor [ self diff --git a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st index c643d5e0b8..e36709438e 100644 --- a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMStackMappingTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMStackMappingTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMStackMappingTest >> buildStackFromFrames [ 3 timesRepeat: [ @@ -19,7 +17,7 @@ VMStackMappingTest >> buildStackFromFrames [ stackBuilder buildStack ] -{ #category : 'helpers' } +{ #category : #helpers } VMStackMappingTest >> newContext [ | method | @@ -32,13 +30,13 @@ VMStackMappingTest >> newContext [ ip: 10 ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testCreatingNewContextByHandShouldbeSingle [ self assert: (interpreter isSingleContext: self newContext) ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ | context fp | context := self newContext. @@ -48,7 +46,7 @@ VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ self assert: (interpreter isSingleContext: context) ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testDivorceFramesInPage [ | page | self buildStackFromFrames. @@ -69,7 +67,7 @@ VMStackMappingTest >> testDivorceFramesInPage [ ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testMarryNewContextIsMarried [ | context | context := self newContext. @@ -77,7 +75,7 @@ VMStackMappingTest >> testMarryNewContextIsMarried [ self assert: (interpreter isStillMarriedContext: context) ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ | aContext framePointerToMarry stackPointerToMarry oldPage | self buildStackFromFrames. @@ -91,7 +89,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ self assert: oldPage isFree ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext | self buildStackFromFrames. @@ -105,7 +103,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSen self assert: expectedDivorcedContext equals: aContext. ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry oldPage newPage | self buildStackFromFrames. @@ -119,7 +117,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ self deny: oldPage equals: newPage ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -131,7 +129,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext oldBaseFramePointer callerContext | self buildStackFromFrames. @@ -151,7 +149,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsS ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -165,7 +163,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ self assert: initialiNumberOfusedPages + 1 equals: newNumberOfUsedPages ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -177,7 +175,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ | aContext initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -189,7 +187,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ self assert: initialiNumberOfusedPages equals: newNumberOfUsedPages ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryTopFrame [ | aContext | self buildStackFromFrames. diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st index fd296015d6..076488f560 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMStackToRegisterMappingCogitTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMStackToRegisterMappingCogitTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'methodReceiver', 'receiverOperationBlock', @@ -15,23 +15,21 @@ Class { 'expectedResult', 'expectedReflexiveResult' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> argumentOperation: aFullBlockClosure [ argumentOperation := aFullBlockClosure ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> arguments: aCollection [ arguments := aCollection ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> buildStackFrame [ "Let's prepare the trampoline in case of non-optimized path" self createSpecialSelectorArray. @@ -51,7 +49,7 @@ VMStackToRegisterMappingCogitTest >> buildStackFrame [ ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> compileMethod [ codeAddress := self compile: [ @@ -63,54 +61,54 @@ VMStackToRegisterMappingCogitTest >> compileMethod [ cogit genReturnTopFromMethod ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult [ ^ expectedReflexiveResult ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult: anObject [ expectedReflexiveResult := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedResult [ ^ expectedResult ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedResult: anObject [ expectedResult := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingCogitTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> methodReceiver: anOop [ methodReceiver := anOop ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> receiverOperation: aFullBlockClosure [ receiverOperationBlock := aFullBlockClosure ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> sendBytecode [ ^ sendBytecode ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> sendBytecode: anObject [ sendBytecode := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingCogitTest >> setUp [ super setUp. @@ -118,7 +116,7 @@ VMStackToRegisterMappingCogitTest >> setUp [ arguments := #(). ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperation and: argumentOfOperation [ self buildStackFrame. @@ -128,7 +126,7 @@ VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperati self assertSpecialSendTo: receiverOfOperation value withArg: argumentOfOperation value ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self buildStackFrame. @@ -138,22 +136,22 @@ VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: aValue). ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value1 [ ^ value1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value1: anObject [ value1 := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value2 [ ^ value2 ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value2: anObject [ value2 := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st index f67ef4a755..1033cc50ad 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMStackToRegisterMappingTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMStackToRegisterMappingTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingTest >> setUp [ super setUp. @@ -31,7 +29,7 @@ VMStackToRegisterMappingTest >> setUp [ cogit needsFrame: true ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testFlushBelowTop [ | stop stackPointerBefore framePointer | @@ -59,7 +57,7 @@ VMStackToRegisterMappingTest >> testFlushBelowTop [ self assert: self popAddress equals: (memory integerObjectOf: 17) ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopConstant [ cogit ssPushConstant: 1. @@ -69,7 +67,7 @@ VMStackToRegisterMappingTest >> testPopConstant [ self assert: cogit ssTop equals: cogit simSelf. ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -96,7 +94,7 @@ VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopRegister [ cogit ssPushRegister: TempReg. @@ -106,7 +104,7 @@ VMStackToRegisterMappingTest >> testPopRegister [ self assert: cogit ssTop equals: cogit simSelf ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ | stop stackPointerBefore framePointer | @@ -132,7 +130,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ self assert: self machineSimulator smalltalkStackPointerRegisterValue equals: stackPointerBefore ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPopFromStack [ | stop stackPointerBefore framePointer | @@ -159,7 +157,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPop self assert: self popAddress equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -186,7 +184,7 @@ VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPushConstant [ cogit ssPushConstant: 1. @@ -197,7 +195,7 @@ VMStackToRegisterMappingTest >> testPushConstant [ self deny: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPushRegister [ cogit ssPushRegister: TempReg. @@ -208,7 +206,7 @@ VMStackToRegisterMappingTest >> testPushRegister [ self deny: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testSpillConstant [ cogit ssPushConstant: 1. @@ -225,7 +223,7 @@ VMStackToRegisterMappingTest >> testSpillConstant [ self assert: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testSpillRegister [ cogit ssPushRegister: TempReg. @@ -244,7 +242,7 @@ VMStackToRegisterMappingTest >> testSpillRegister [ self assert: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testTopOfEmptyIsSimSelf [ self assert: cogit ssSize equals: 1. diff --git a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st index e1964ec1c5..267fd1873e 100644 --- a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st @@ -1,15 +1,14 @@ Class { - #name : 'VMTestMockInterpreter', - #superclass : 'StackInterpreterSimulatorLSB', + #name : #VMTestMockInterpreter, + #superclass : #StackInterpreterSimulatorLSB, #instVars : [ 'interpreteBlock', 'allocatedElements' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'memory testing' } +{ #category : #'memory testing' } VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ | allocated | @@ -20,43 +19,43 @@ VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ ^ allocated ] -{ #category : 'memory testing' } +{ #category : #'memory testing' } VMTestMockInterpreter >> allocatedElements [ ^ allocatedElements ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> basicInitialize [ super basicInitialize. allocatedElements := Set new ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> enterSmalltalkExecutiveImplementation [ interpreteBlock value ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> free: aPointer [ allocatedElements remove: aPointer. ^ super free: aPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> interpreteBlock [ ^ interpreteBlock ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> interpreteBlock: anObject [ interpreteBlock := anObject ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> malloc: aSize [ ^ allocatedElements add: (super malloc: aSize) diff --git a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st index 22b52f0abb..dd1e43a5cc 100644 --- a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMTrampolineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMTrampolineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'registerMask', 'isAligned', @@ -10,12 +10,10 @@ Class { 'CogAbstractRegisters', 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMTrampolineTest class >> testParameters [ ^ super testParameters * { @@ -24,25 +22,25 @@ VMTrampolineTest class >> testParameters [ } ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> isAligned [ ^ isAligned ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> isAligned: aBoolean [ isAligned := aBoolean ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> setUp [ super setUp. @@ -62,7 +60,7 @@ VMTrampolineTest >> setUp [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ | inc baseMethod baseMethodIP ctx page | @@ -125,7 +123,7 @@ VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ equals: (memory integerObjectOf: 3) ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testDetectFrameNotPointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -140,7 +138,7 @@ VMTrampolineTest >> testDetectFrameNotPointerInUse [ self deny: cogit isCFramePointerInUse ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testDetectFramePointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -155,7 +153,7 @@ VMTrampolineTest >> testDetectFramePointerInUse [ self assert: cogit isCFramePointerInUse ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -173,7 +171,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self assert: self framePointerRegisterValue equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -191,7 +189,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self assert: machineSimulator smalltalkStackPointerRegisterValue equals: 17 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ | initialStackPointer | @@ -209,7 +207,7 @@ VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue equals: initialStackPointer ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDereferenceSelectorRoutine [ | dereferenceRoutine previousLinkRegister trampoline | @@ -240,7 +238,7 @@ VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDeref self assert: self interpreter stackTop equals: previousLinkRegister ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -254,7 +252,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self assert: machineSimulator framePointerRegisterValue equals: 888 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -268,7 +266,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self assert: machineSimulator stackPointerRegisterValue equals: 777 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ cogit backend hasLinkRegister ifFalse: [ ^ self skip ]. @@ -284,7 +282,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ self assert: self interpreter stackTop equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -301,7 +299,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePoint self assert: self interpreter framePointer equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -318,7 +316,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPoint self assert: self interpreter stackPointer equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ "Some architectures such as ARMv8 require that the SP is always aligned to some value even in between calls. @@ -331,7 +329,7 @@ VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue \\ cogit stackPointerAlignment equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testStoreRegistersPushesValuesToStack [ | initialStackPointer actualPushedBytes | diff --git a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st index 1951d51644..9827cf8874 100644 --- a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMX64InstructionTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMX64InstructionTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMX64InstructionTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -17,13 +15,13 @@ VMX64InstructionTest class >> wordSizeParameters [ yourself ] -{ #category : 'configuration' } +{ #category : #configuration } VMX64InstructionTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ | mem | @@ -47,7 +45,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ | mem | @@ -72,7 +70,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupSRVr [ @@ -88,7 +86,7 @@ VMX64InstructionTest >> testDupSRVr [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFaddSRvRvRv [ | result | @@ -107,7 +105,7 @@ VMX64InstructionTest >> testFaddSRvRvRv [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ | result | @@ -126,7 +124,7 @@ VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFsubSRvRvRv [ | result | @@ -145,7 +143,7 @@ VMX64InstructionTest >> testFsubSRvRvRv [ self assert: (result doubleAt: 9) equals: -1.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFsubSRvRvRvWithThreeDifferentRegisters [ | result | diff --git a/smalltalksrc/VMMakerTests/package.st b/smalltalksrc/VMMakerTests/package.st index 285bf148e9..328d153d5f 100644 --- a/smalltalksrc/VMMakerTests/package.st +++ b/smalltalksrc/VMMakerTests/package.st @@ -1 +1 @@ -Package { #name : 'VMMakerTests' } +Package { #name : #VMMakerTests } From 210b40d2501883cf1318f113961c0b6b5ef4a192 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Fri, 20 Sep 2024 16:59:11 +0200 Subject: [PATCH 06/11] Removed new testing class and only kept the test for testing the ephemerons in the old space. --- smalltalksrc/VMMakerTests/Array.extension.st | 6 +- .../VMMakerTests/ByteSymbol.extension.st | 6 +- .../VMMakerTests/Character.extension.st | 6 +- smalltalksrc/VMMakerTests/Cogit.extension.st | 12 +- .../VMMakerTests/CompiledBlock.extension.st | 4 +- .../VMMakerTests/DummyProcessor.class.st | 56 +- .../VMMakerTests/ExitInterpreter.class.st | 9 +- .../VMMakerTests/LiteralVariable.extension.st | 4 +- .../ManifestVMMakerTests.class.st | 14 +- .../VMMakerTests/MethodBuilderTest.class.st | 30 +- .../MockVMStructWithReservedWords.class.st | 13 +- ...ckVMStructWithoutTypeDeclarations.class.st | 9 +- .../ParametrizedTestMatrix.extension.st | 4 +- .../VMMakerTests/ProcessorSimulator.class.st | 258 +++---- .../VMMakerTests/RegisterDescriptor.class.st | 33 +- .../VMMakerTests/SmallInteger.extension.st | 4 +- .../SpurMemoryManager.extension.st | 4 +- .../VMMakerTests/StackBuilderTest.class.st | 76 +- .../StackToRegisterMappingCogit.extension.st | 4 +- .../VMMakerTests/UndefinedObject.extension.st | 4 +- .../UnicornARMv5Simulator.class.st | 136 ++-- .../UnicornARMv8Simulator.class.st | 212 +++--- .../UnicornI386Simulator.class.st | 106 +-- .../UnicornInvalidMemoryAccess.class.st | 28 +- .../VMMakerTests/UnicornProcessor.class.st | 160 ++-- .../UnicornRISCVSimulator.class.st | 264 +++---- .../UnicornRegisterDescriptor.class.st | 30 +- .../UnicornSimulationTrap.class.st | 26 +- .../VMMakerTests/UnicornSimulator.class.st | 28 +- .../VMMakerTests/UnicornTimeout.class.st | 12 +- .../VMMakerTests/UnicornX64Simulator.class.st | 162 ++-- .../VMARMStackAlignmentTest.class.st | 24 +- .../VMARMV8SIMDEncodingTest.class.st | 38 +- .../VMARMV8SpecificEncodingTest.class.st | 72 +- .../VMMakerTests/VMAbstractBuilder.class.st | 18 +- .../VMMakerTests/VMAbstractFFITest.class.st | 23 +- .../VMAbstractImageFormatTest.class.st | 22 +- .../VMAbstractPrimitiveTest.class.st | 19 +- .../VMMakerTests/VMBlockTest.class.st | 40 +- .../VMMakerTests/VMByteCodesTest.class.st | 136 ++-- .../VMMakerTests/VMBytecodeMethod.class.st | 32 +- .../VMCodeCompactionTest.class.st | 38 +- .../VMMakerTests/VMCogitHelpersTest.class.st | 28 +- .../VMCompiledCodeBuilder.class.st | 72 +- smalltalksrc/VMMakerTests/VMContext.class.st | 28 +- .../VMMakerTests/VMContextAccessTest.class.st | 22 +- .../VMDivisionInstructionTest.class.st | 28 +- .../VMFFIArgumentMarshallingTest.class.st | 95 +-- .../VMMakerTests/VMFFICallbacksTest.class.st | 17 +- .../VMMakerTests/VMFFIHelpersTest.class.st | 31 +- .../VMFFIReturnMarshallingTest.class.st | 47 +- ...SameThreadArgumentMarshallingTest.class.st | 13 +- .../VMFFISameThreadCalloutTest.class.st | 11 +- ...FISameThreadReturnMarshallingTest.class.st | 11 +- ...MFFIWorkerArgumentMarshallingTest.class.st | 19 +- .../VMFFIWorkerCalloutTest.class.st | 27 +- .../VMFFIWorkerReturnMarshallingTest.class.st | 13 +- ...ForwardLiteralInMachineMethodTest.class.st | 14 +- .../VMMakerTests/VMFrameBuilder.class.st | 92 +-- .../VMImageHeaderWritingTest.class.st | 50 +- .../VMMakerTests/VMImageReadingTest.class.st | 32 +- .../VMMakerTests/VMInterpreterTests.class.st | 14 +- .../VMJITPrimitiveCallingTest.class.st | 82 ++- .../VMJITVMPrimitiveTest.class.st | 20 +- .../VMJistMethodTestObject.class.st | 10 +- .../VMMakerTests/VMJitMethodTest.class.st | 30 +- .../VMJitMethodWithImmutabilityTest.class.st | 16 +- .../VMMakerTests/VMJitSimdBytecode.class.st | 26 +- .../VMJittedBoxFloatPrimitivesTest.class.st | 14 +- ...ittedByteArrayAccessPrimitiveTest.class.st | 112 +-- ...xternalAddressAccessPrimitiveTest.class.st | 12 +- .../VMJittedGeneralPrimitiveTest.class.st | 306 ++++---- .../VMMakerTests/VMJittedLookupTest.class.st | 22 +- .../VMJittedPrimitiveAtPutTest.class.st | 14 +- .../VMJittedPrimitiveAtTest.class.st | 74 +- .../VMJittedPrimitiveSizeTest.class.st | 32 +- .../VMJittedPrimitivesTest.class.st | 20 +- .../VMJittedSmallFloatPrimitiveTest.class.st | 52 +- .../VMMakerTests/VMLiterRulesTest.class.st | 13 +- .../VMMakerTests/VMLookUpTest.class.st | 62 +- .../VMMASTTranslationTest.class.st | 87 +-- .../VMMachineCodeFrameBuilderForTest.class.st | 41 +- .../VMMakerTests/VMMachineCodeMethod.class.st | 20 +- .../VMMachineSimulatorTest.class.st | 42 +- .../VMMakerTests/VMMockCodeGenerator.class.st | 26 +- ...MObjectAccessorIdentificationTest.class.st | 10 +- .../VMMakerTests/VMObjectLayoutTests.class.st | 60 +- .../VMMakerTests/VMObjectStackTest.class.st | 38 +- .../VMPermanentSpaceImageReadingTest.class.st | 14 +- .../VMPermanentSpaceMemoryTest.class.st | 90 +-- .../VMPermanentSpacePrimitiveTest.class.st | 30 +- .../VMMakerTests/VMPinnedObjectTest.class.st | 36 +- .../VMPrimitiveCallAbstractTest.class.st | 44 +- .../VMPrimitiveCallingTest.class.st | 16 +- .../VMMakerTests/VMPrimitiveTest.class.st | 696 +++++++++--------- .../VMPushThisContextRoutineTest.class.st | 32 +- .../VMSegmentsImageFormatTest.class.st | 18 +- ...lectorIndexDereferenceRoutineTest.class.st | 16 +- .../VMMakerTests/VMSessionIdTest.class.st | 10 +- ...SimpleStackBasedCogitAbstractTest.class.st | 164 +++-- ...SimpleStackBasedCogitBytecodeTest.class.st | 312 ++++---- ...impleStackBasedCogitCoggedMethods.class.st | 16 +- ...StackBasedCogitMegamorphicPICTest.class.st | 40 +- ...StackBasedCogitMonomorphicPICTest.class.st | 14 +- ...StackBasedCogitPolymorphicPICTest.class.st | 52 +- ...eStackBasedCogitRememberedSetTest.class.st | 20 +- .../VMSimulatedEnvironmentBuilder.class.st | 48 +- .../VMMakerTests/VMSimulationTest.class.st | 12 +- .../VMSistaSuperSendsTest.class.st | 12 +- .../VMSistaTrampolineTest.class.st | 12 +- .../VMSpecialSendArithmethicTest.class.st | 80 +- .../VMSpurEphemeronsAlgorithmTest.class.st | 361 --------- .../VMSpurInitializedOldSpaceTest.class.st | 48 +- .../VMSpurMemoryManagerTest.class.st | 154 ++-- .../VMSpurNewSpaceStructureTest.class.st | 46 +- .../VMSpurObjectAllocationTest.class.st | 12 +- .../VMSpurOldSpaceBootstrapTest.class.st | 20 +- ...MSpurOldSpaceGarbageCollectorTest.class.st | 110 ++- .../VMSpurOldSpaceStructureTest.class.st | 14 +- .../VMMakerTests/VMSpurOldSpaceTest.class.st | 140 ++-- .../VMSpurRememberedSetTest.class.st | 46 +- .../VMSpurScavengeEphemeronTest.class.st | 48 +- .../VMSpurScavengeWeakTest.class.st | 18 +- .../VMMakerTests/VMSpurScavengerTest.class.st | 96 +-- ...llocationStrategyForLargeTreeTest.class.st | 56 +- ...llocationStrategyForSmallTreeTest.class.st | 76 +- ...purTreeAllocationWithBigNodesTest.class.st | 20 +- .../VMMakerTests/VMStackBuilder.class.st | 54 +- .../VMMakerTests/VMStackFrame.class.st | 50 +- .../VMStackInterpreterTest.class.st | 18 +- .../VMMakerTests/VMStackMappingTest.class.st | 38 +- ...VMStackToRegisterMappingCogitTest.class.st | 48 +- .../VMStackToRegisterMappingTest.class.st | 34 +- .../VMTestMockInterpreter.class.st | 23 +- .../VMMakerTests/VMTrampolineTest.class.st | 46 +- .../VMX64InstructionTest.class.st | 26 +- smalltalksrc/VMMakerTests/package.st | 2 +- 137 files changed, 3687 insertions(+), 3788 deletions(-) delete mode 100644 smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st diff --git a/smalltalksrc/VMMakerTests/Array.extension.st b/smalltalksrc/VMMakerTests/Array.extension.st index ef74d1b24b..a4a387884a 100644 --- a/smalltalksrc/VMMakerTests/Array.extension.st +++ b/smalltalksrc/VMMakerTests/Array.extension.st @@ -1,13 +1,13 @@ -Extension { #name : #Array } +Extension { #name : 'Array' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Array >> forMemory: aMemory inMethod: anObject [ ^ aMemory newArrayWith: (self collect: [ :anElement | anElement forMemory: aMemory inMethod: nil ]) ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Array >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st index e9a6595a9d..3fde704597 100644 --- a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st +++ b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ByteSymbol } +Extension { #name : 'ByteSymbol' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ByteSymbol >> forMemory: aMemory inMethod: anObject [ | vmString instSpec numSlots | @@ -27,7 +27,7 @@ ByteSymbol >> forMemory: aMemory inMethod: anObject [ ^ vmString ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ByteSymbol >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Character.extension.st b/smalltalksrc/VMMakerTests/Character.extension.st index 26f22ec3fe..79a30d41b3 100644 --- a/smalltalksrc/VMMakerTests/Character.extension.st +++ b/smalltalksrc/VMMakerTests/Character.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #Character } +Extension { #name : 'Character' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Character >> forMemory: memory [ ^ memory characterObjectOf: self codePoint ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Character >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Cogit.extension.st b/smalltalksrc/VMMakerTests/Cogit.extension.st index 3b587c4699..c8d411581d 100644 --- a/smalltalksrc/VMMakerTests/Cogit.extension.st +++ b/smalltalksrc/VMMakerTests/Cogit.extension.st @@ -1,28 +1,28 @@ -Extension { #name : #Cogit } +Extension { #name : 'Cogit' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> byte0: anInteger [ byte0 := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> inBlock: anInteger [ inBlock := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> methodOrBlockNumArgs: anInteger [ methodOrBlockNumArgs := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> needsFrame [ ^ true ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> needsFrame: aFalse [ needsFrame := aFalse ] diff --git a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st index 436740ae7f..87094e4db8 100644 --- a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st +++ b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #CompiledBlock } +Extension { #name : 'CompiledBlock' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } CompiledBlock >> forMemory: memory inMethod: aMethodBuilder [ | methodBuilder | diff --git a/smalltalksrc/VMMakerTests/DummyProcessor.class.st b/smalltalksrc/VMMakerTests/DummyProcessor.class.st index 7779177d07..3c4e14ea5a 100644 --- a/smalltalksrc/VMMakerTests/DummyProcessor.class.st +++ b/smalltalksrc/VMMakerTests/DummyProcessor.class.st @@ -1,6 +1,6 @@ Class { - #name : #DummyProcessor, - #superclass : #Object, + #name : 'DummyProcessor', + #superclass : 'Object', #instVars : [ 'stackPointer', 'framePointer', @@ -10,149 +10,151 @@ Class { 'linkRegisterValue', 'receiverRegisterValue' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> baseRegisterValue: anInteger [ baseRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> cResultRegister [ ^ nil ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> disassembler [ ^ LLVMDisassembler aarch64 ] -{ #category : #operations } +{ #category : 'operations' } DummyProcessor >> flushICacheFrom: anInteger to: anInteger2 [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> fp [ ^ framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> fp: anInteger [ framePointer := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> framePointerRegisterValue: anInteger [ framePointer := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> hasLinkRegister [ ^ true ] -{ #category : #initialization } +{ #category : 'initialization' } DummyProcessor >> initializeStackFor: aSimpleStackBasedCogit [ "We are dummy...." ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> instructionPointerRegisterValue [ ^ programCounter ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> integerRegisterState [ ^ #() ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> linkRegisterValue: anInteger [ linkRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> machineSimulator [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> memoryAt: anInteger write: aCollection size: anInteger3 [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> pc [ ^ programCounter ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> pc: anInteger [ programCounter := anInteger ] -{ #category : #operations } +{ #category : 'operations' } DummyProcessor >> pushWord: anInteger [ stackPointer := stackPointer - 8 ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> receiverRegisterValue: anInteger [ receiverRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> runUntil: anInteger [ programCounter := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> setFramePointer: aFPValue stackPointer: aSPValue [ stackPointer := aSPValue. framePointer := aFPValue ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> simulateLeafCallOf: anInteger nextpc: anInteger2 memory: anUndefinedObject [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> smalltalkStackPointerRegisterValue [ ^ smalltalkStackPointerRegisterValue ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> smalltalkStackPointerRegisterValue: anInteger [ smalltalkStackPointerRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> sp [ ^ stackPointer diff --git a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st index 86c280b059..4aff38ec53 100644 --- a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st @@ -1,13 +1,14 @@ Class { - #name : #ExitInterpreter, - #superclass : #Error, + #name : 'ExitInterpreter', + #superclass : 'Error', #instVars : [ 'returnValue' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } ExitInterpreter >> returnValue: anInteger [ returnValue := anInteger diff --git a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st index 6579fb7e3b..02d3f47f5a 100644 --- a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st +++ b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #LiteralVariable } +Extension { #name : 'LiteralVariable' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } LiteralVariable >> forMemory: aMemory inMethod: anObject [ | aVariable | diff --git a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st index 84a27ad5d5..267b338feb 100644 --- a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st +++ b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st @@ -2,26 +2,28 @@ I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser " Class { - #name : #ManifestVMMakerTests, - #superclass : #PackageManifest, - #category : #'VMMakerTests-Manifest' + #name : 'ManifestVMMakerTests', + #superclass : 'PackageManifest', + #category : 'VMMakerTests-Manifest', + #package : 'VMMakerTests', + #tag : 'Manifest' } -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> ruleBadMessageRule2V1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#UnicornARMv8Simulator #smashCallerSavedRegistersWithValuesFrom:by:in: #false)) #'2023-05-12T09:19:16.384586+02:00') #(#(#RGMethodDefinition #(#UnicornARMv8Simulator #postCallArgumentsNumArgs:in: #false)) #'2023-05-12T09:20:41.357283+02:00') #(#(#RGMethodDefinition #(#ProcessorSimulator #smashRegistersWithValuesFrom:by: #false)) #'2023-05-12T09:25:17.137958+02:00') ) ] -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> rulePrecedenceRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2023-05-12T09:19:42.605517+02:00') ) ] -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> ruleUncommonMessageSendRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2020-07-24T12:05:44.86595+02:00') ) ] diff --git a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st index fada9181db..882ae1c75a 100644 --- a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #MethodBuilderTest, - #superclass : #VMInterpreterTests, + #name : 'MethodBuilderTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'literals', 'numberOfArguments', @@ -11,17 +11,19 @@ Class { 'methodHeader', 'method' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testAddingBytecodesDoesntOverrideHeader [ method := methodBuilder newMethod buildMethod. self assert: methodBuilder buildMethodHeader equals: (memory integerValueOf: (memory fetchPointer: 0 ofObject: method)). ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ method := methodBuilder newMethod; buildMethod. @@ -33,14 +35,14 @@ MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ self shouldnt:[ methodBuilder newMethod; buildMethod ] raise: AssertionFailure ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBuildEmptyMethodIsCompiledMethod [ "checking the format" method := methodBuilder newMethod; buildMethod. self assert: (memory isCompiledMethod: method) ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ | bytecodeAddress | literals := { }. @@ -54,7 +56,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | @@ -69,7 +71,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ | bytecodeAddress | @@ -84,13 +86,13 @@ MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testClassOfCompiledMethodIsCompiledMethod [ self assert: (memory fetchClassOf: methodBuilder newMethod buildMethod) equals: (memory splObj: 16). ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testGeneratingCompiledMethod [ method := methodBuilder newMethod @@ -99,7 +101,7 @@ MethodBuilderTest >> testGeneratingCompiledMethod [ self assert: (memory isCompiledMethod: method) ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ | numberOfByteCode | @@ -114,7 +116,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ | numberOfByteCode | @@ -129,7 +131,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testSecondBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st index 92814927f5..1ffa0754bb 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st @@ -1,27 +1,28 @@ Class { - #name : #MockVMStructWithReservedWords, - #superclass : #VMStructType, + #name : 'MockVMStructWithReservedWords', + #superclass : 'VMStructType', #instVars : [ 'foo', 'case' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #enumerating } +{ #category : 'enumerating' } MockVMStructWithReservedWords class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ aBinaryBlock value: 'foo' value: 'char *'. aBinaryBlock value: 'case' value: 'char *' ] -{ #category : #accessing } +{ #category : 'accessing' } MockVMStructWithReservedWords >> case [ ^ case ] -{ #category : #accessing } +{ #category : 'accessing' } MockVMStructWithReservedWords >> case: anObject [ case := anObject diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st index 15627d4255..077e789b01 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st @@ -1,14 +1,15 @@ Class { - #name : #MockVMStructWithoutTypeDeclarations, - #superclass : #VMStructType, + #name : 'MockVMStructWithoutTypeDeclarations', + #superclass : 'VMStructType', #instVars : [ 'foo', 'bar' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #enumerating } +{ #category : 'enumerating' } MockVMStructWithoutTypeDeclarations class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ "Missing the bar type declaration" diff --git a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st index f5910338a6..b9250409cb 100644 --- a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st +++ b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ParametrizedTestMatrix } +Extension { #name : 'ParametrizedTestMatrix' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ParametrizedTestMatrix >> + aParametrizedTestMatrix [ | newMatrix | diff --git a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st index 37e4e7c26c..a61f9c0b74 100644 --- a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st +++ b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st @@ -1,46 +1,48 @@ Class { - #name : #ProcessorSimulator, - #superclass : #Object, + #name : 'ProcessorSimulator', + #superclass : 'Object', #instVars : [ 'simulator', 'registerAliases', 'registerSmalltalkAliases', 'memory' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> ARMv5 [ ^ UnicornARMv5Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> ARMv8 [ ^ UnicornARMv8Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> IA32 [ ^ UnicornI386Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> X64 [ ^ UnicornX64Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> aarch64 [ ^ UnicornARMv8Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> riscv64 [ "TODO: Add riscv32 and possibly two subclasses for the RISCV simulator" @@ -48,203 +50,203 @@ ProcessorSimulator class >> riscv64 [ "^ SpikeRISCVSimulator new" ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> simulatorFor: isa [ ^ (self subclasses detect: [ :each | each supportsISA: isa ]) perform: isa asSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> aliasForRegister: aRegisterName [ ^ registerAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> aliasSmalltalkForRegister: aRegisterName [ ^ registerSmalltalkAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0Register [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue [ ^ self readRegister: self arg0Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue: aValue [ ^ self writeRegister: self arg0Register value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1Register [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue [ ^ self readRegister: self arg1Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue: aValue [ ^ self writeRegister: self arg1Register value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue [ ^ self readRegister: self baseRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue: aValue [ ^ self writeRegister: self baseRegister value: aValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegister [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegisterValue [ ^ self readRegister: self cResultRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegisterValue: aValue [ self writeRegister: self cResultRegister value: aValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg0RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0RegisterValue [ ^ self readRegister: self carg0Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg1RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1RegisterValue [ ^ self readRegister: self carg1Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg2RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2RegisterValue [ ^ self readRegister: self carg2Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg3RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3RegisterValue [ ^ self readRegister: self carg3Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue [ ^ self readRegister: self classRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue: aValue [ ^ self writeRegister: self classRegister value: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> cogit [ ^ memory interpreter cogit ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleCurrentInstruction [ ^ (self disassembleFrom: self instructionPointerRegisterValue opcodes: 1) first ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ self disassembler @@ -255,7 +257,7 @@ ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ pc: self instructionPointerRegisterValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleFrom: start to: stop [ ^ self disassembler @@ -266,114 +268,114 @@ ProcessorSimulator >> disassembleFrom: start to: stop [ pc: self instructionPointerRegisterValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembler [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister0 value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister1 value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister2 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister2 value: aValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ ^ self subclassResponsibility ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> finishMappingMemory [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> flushICacheFrom: startAddress to: endAddress [ simulator removeInstructionCacheFrom: startAddress to: endAddress ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> fp [ ^ self framePointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> fp: aValue [ ^ self framePointerRegisterValue: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue [ ^ self readRegister: self framePointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue: aValue [ self writeRegister: self framePointerRegister value: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> getLastAddress: abstractInstructions [ | last | @@ -381,13 +383,13 @@ ProcessorSimulator >> getLastAddress: abstractInstructions [ ^ last address + last machineCodeSize ] -{ #category : #testing } +{ #category : 'testing' } ProcessorSimulator >> hasLinkRegister [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initialize [ super initialize. @@ -397,91 +399,91 @@ ProcessorSimulator >> initialize [ self initializeRegisterSmalltalkAliases. ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initializeRegisterAliases [ "Hook for subclasses" ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initializeRegisterSmalltalkAliases [ "Hook for subclasses" ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue [ ^ self readRegister: self instructionPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue: aValue [ ^ self writeRegister: self instructionPointerRegister value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> integerRegisterState [ ^ { } ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastExecutedInstructionAddress [ ^ simulator lastExecutedInstructionAddress ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastExecutedInstructionSize [ ^ simulator lastExecutedInstructionSize ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastInstructionCount [ ^ simulator lastInstructionCount ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue [ ^ self readRegister: self linkRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue: aValue [ ^ self writeRegister: self linkRegister value: aValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> lr [ ^ self linkRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> lr: aValue [ ^ self linkRegisterValue: aValue ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> mapMemory: aMemory at: anAddress [ simulator @@ -490,7 +492,7 @@ ProcessorSimulator >> mapMemory: aMemory at: anAddress [ withPermissions: UnicornConstants permissionAll. ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ aSlangMemoryManager regionsDo: [ :startAddress :region | @@ -500,42 +502,42 @@ ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ self finishMappingMemory. ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> memory [ ^ memory ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> memory: aSpur64BitMMLECoSimulator [ memory := aSpur64BitMMLECoSimulator ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> memoryAt: address readNext: byteSize [ ^ simulator memoryAt: address readNext: byteSize ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> memoryAt: address write: bytes size: size [ simulator memoryAt: address write: bytes size: size ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> pc [ ^ self instructionPointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> pc: aValue [ ^ self instructionPointerRegisterValue: aValue ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> peek [ | stackAddressIntegerValue peekedByteArray | @@ -549,13 +551,13 @@ ProcessorSimulator >> peek [ ^ peekedByteArray ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> peekAddress [ ^ self peek integerAt: 1 size: self wordSize signed: false ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> popBytes [ | stackAddressIntegerValue aByteArray | @@ -572,7 +574,7 @@ ProcessorSimulator >> popBytes [ ^ aByteArray ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> popWord [ | aByteArray | @@ -580,7 +582,7 @@ ProcessorSimulator >> popWord [ ^ aByteArray integerAt: 1 size: self wordSize signed: false. ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> pushBytes: aByteArray [ | stackAddressIntegerValue | @@ -601,7 +603,7 @@ ProcessorSimulator >> pushBytes: aByteArray [ ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> pushWord: anInteger [ | aByteArray | @@ -610,7 +612,7 @@ ProcessorSimulator >> pushWord: anInteger [ self pushBytes: aByteArray ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readFloat64Register: aRegisterID [ | registerValue | @@ -620,7 +622,7 @@ ProcessorSimulator >> readFloat64Register: aRegisterID [ ^ registerValue doubleAt: 1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ | registerValue | @@ -629,7 +631,7 @@ ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ ^ registerValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readRegister: aRegisterID [ | registerValue size | @@ -638,37 +640,37 @@ ProcessorSimulator >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: size signed: false ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue [ ^ self readRegister: self receiverRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue: anInteger [ self writeRegister: self receiverRegister value: anInteger ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> register: anIndex readInto: aByteArray [ simulator register: anIndex readInto: aByteArray ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerAliases [ ^ registerAliases ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerDescriptors [ ^ self registerList collect: [ :reg | @@ -680,98 +682,98 @@ ProcessorSimulator >> registerDescriptors [ yourself ] ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerList [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue [ ^ self readRegister: self sendNumberOfArgumentsRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue: aValue [ ^ self writeRegister: self sendNumberOfArgumentsRegister value: aValue ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegister [ "By default they are the same" ^ self stackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue [ ^ self readRegister: self smalltalkStackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue: aValue [ self writeRegister: self smalltalkStackPointerRegister value: aValue ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> smashRegisterAccessors [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smashRegistersWithValuesFrom: base by: step [ self smashRegisterAccessors withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> sp [ ^ self stackPointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> sp: aValue [ ^ self stackPointerRegisterValue: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue [ ^ self readRegister: self stackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue: aValue [ self writeRegister: self stackPointerRegister value: aValue ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> stackValueAt: anInteger [ "Get a value from the stack at a 0-base position" @@ -780,7 +782,7 @@ ProcessorSimulator >> stackValueAt: anInteger [ ^ aByteArray integerAt: 1 size: self wordSize signed: false ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> stackValueBytesAt: position [ "Get the bytes from the stack at a 0-base position" @@ -798,7 +800,7 @@ ProcessorSimulator >> stackValueBytesAt: position [ ^ aByteArray ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> stackValues [ | initialValue | @@ -809,14 +811,14 @@ ProcessorSimulator >> stackValues [ ] ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> startAt: begin until: until timeout: timeout count: count [ self subclassResponsibility ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> step [ self @@ -826,36 +828,36 @@ ProcessorSimulator >> step [ count: 1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue [ ^ self readRegister: self temporaryRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue: anInteger [ ^ self writeRegister: self temporaryRegister value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> wordAt: anInteger [ ^ memory longAt: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> wordSize [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ | value | @@ -865,7 +867,7 @@ ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st index 7f3419228e..f4b6a25c2b 100644 --- a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st @@ -1,49 +1,50 @@ Class { - #name : #RegisterDescriptor, - #superclass : #Object, + #name : 'RegisterDescriptor', + #superclass : 'Object', #instVars : [ 'simulator', 'name', 'alias', 'smalltalkAlias' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> alias [ ^ alias ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -53,35 +54,35 @@ RegisterDescriptor >> printOn: aStream [ ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> smalltalkAlias [ ^ smalltalkAlias ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> smalltalkAlias: aString [ smalltalkAlias := aString ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/SmallInteger.extension.st b/smalltalksrc/VMMakerTests/SmallInteger.extension.st index f6dcb4fca2..d5f6ef6f2a 100644 --- a/smalltalksrc/VMMakerTests/SmallInteger.extension.st +++ b/smalltalksrc/VMMakerTests/SmallInteger.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SmallInteger } +Extension { #name : 'SmallInteger' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } SmallInteger >> forMemory: aMemory inMethod: anObject [ (self > aMemory maxSmallInteger or: [ self < aMemory minSmallInteger ]) ifTrue: [ self halt ]. diff --git a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st index e75c5e91a4..b5d4de558f 100644 --- a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st +++ b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SpurMemoryManager } +Extension { #name : 'SpurMemoryManager' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } SpurMemoryManager >> hiddenRootsObject: anInteger [ hiddenRootsObj := anInteger diff --git a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st index 8fce0dcfbe..aec69a0f71 100644 --- a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st @@ -15,8 +15,8 @@ temp2 method " Class { - #name : #StackBuilderTest, - #superclass : #VMInterpreterTests, + #name : 'StackBuilderTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'stackElement1', 'stackElement2', @@ -32,10 +32,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> addFullFrame [ | frame | @@ -69,78 +71,78 @@ StackBuilderTest >> addFullFrame [ ^ frame ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument1 [ ^ self offsetArgument2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument1FromBaseFP [ ^ self offsetArgument2FromBaseFP + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument2 [ "we skip the frame pointer" ^ self offsetMethod + 2 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument2FromBaseFP [ ^ 2 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetCallerFP [ ^ self offsetMethod + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetContext [ ^ self offsetFlags + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetFlags [ ^ self offsetReceiver + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetInstructionPointer [ ^ 0 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetMethod [ ^ self offsetContext + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetReceiver [ ^ self offsetTemp1 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetStackElement1 [ ^ self offsetStackElement2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetStackElement2 [ ^ self offsetInstructionPointer + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetTemp1 [ ^ self offsetTemp2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetTemp2 [ ^ self offsetStackElement1 + 1 ] -{ #category : #running } +{ #category : 'running' } StackBuilderTest >> setUp [ super setUp. @@ -155,14 +157,14 @@ StackBuilderTest >> setUp [ ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testCallerFrameOfTopFrameShouldBeSecondFrameBuilderObject [ "For debug purpose, we added a link to the caller frame in the current frame." self assert: (stackBuilder topFrame callerFrame) equals: (stackBuilder frames nextToLast) ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -170,7 +172,7 @@ StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ equals: stackBuilder frames second instructionPointer. ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ | frame | @@ -185,7 +187,7 @@ StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ | frame | @@ -200,7 +202,7 @@ StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -208,7 +210,7 @@ StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ "We have 3 frames. The caller of the top frame should be the middle one" @@ -216,7 +218,7 @@ StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPushed [ method := methodBuilder newMethod buildMethod. @@ -228,7 +230,7 @@ StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPu equals: (methodBuilder bytecodeAt: 0 forMethod: method) ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ | frame argNum | @@ -247,7 +249,7 @@ StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ self assert: frame argumentSize equals: argNum ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ | frame tempNum | @@ -268,37 +270,37 @@ StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ equals: (OrderedCollection new: tempNum withAll: memory nilObject) ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderArgument1InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument1FromBaseFP * memory bytesPerOop)) equals: argument1 ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderArgument2InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument2FromBaseFP * memory bytesPerOop)) equals: argument2 ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderContext [ self assert: (interpreter stackValue: self offsetContext) equals: context ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderMethod [ self assert: (interpreter stackValue: self offsetMethod) equals: method ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderReceiver [ self assert: (interpreter stackValue: self offsetReceiver) equals: receiver ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderStackElementIsReversed [ self assert: (interpreter stackValue: self offsetStackElement1) equals: stackElement1. @@ -306,7 +308,7 @@ StackBuilderTest >> testOrderStackElementIsReversed [ equals: stackElement2. ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ "When a process is suspended, the Instruction Pointer is pushed on the stack of the frame. It should be the last thing pushed, and therefore, be at the top. " @@ -314,7 +316,7 @@ StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ equals: instructionPointer. ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderTempIsReversed [ self assert: (interpreter stackValue: self offsetTemp1) equals: temp1. @@ -322,7 +324,7 @@ StackBuilderTest >> testOrderTempIsReversed [ equals: temp2. ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testPageHeadFPIsLastFrameFP [ "The FramePointer of the interpreter should be the FramePointer of the current process last pushed frame." self assert: interpreter framePointer diff --git a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st index 1ad516b356..f2768e954f 100644 --- a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st +++ b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #StackToRegisterMappingCogit } +Extension { #name : 'StackToRegisterMappingCogit' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } StackToRegisterMappingCogit >> methodOrBlockNumTemps: anInteger [ methodOrBlockNumTemps := anInteger diff --git a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st index bbe289597b..6d460c8943 100644 --- a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st +++ b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #UndefinedObject } +Extension { #name : 'UndefinedObject' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } UndefinedObject >> forMemory: aMemory inMethod: anObject [ ^ aMemory nilObject diff --git a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st index f2ff996e16..386b5360a0 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st @@ -1,64 +1,66 @@ Class { - #name : #UnicornARMv5Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornARMv5Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> arg0Register [ ^ UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> arg1Register [ ^ UcARMRegisters r4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> baseRegister [ ^ UcARMRegisters r10 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> cResultRegister [ ^ UcARMRegisters r0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg0Register [ ^ UcARMRegisters r0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg1Register [ ^ UcARMRegisters r1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg2Register [ ^ UcARMRegisters r2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg3Register [ ^ UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> classRegister [ ^ UcARMRegisters r8 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ anInteger < 0 ifFalse: [ ^ anInteger ]. @@ -66,7 +68,7 @@ UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ ^ 16rFFFFFFFF - anInteger abs + 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ (aTwoComplementNumber bitAnd: 1 << 31) = 0 ifTrue: [ @@ -75,7 +77,7 @@ UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ ^ aTwoComplementNumber - 16rFFFFFFFF - 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> createUnicorn [ "Enable Floating Point... @@ -112,13 +114,13 @@ UnicornARMv5Simulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv5Simulator >> disassembler [ ^ LLVMARMDisassembler armv7 ] -{ #category : #executing } +{ #category : 'executing' } UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | actualCount result error startTime remainingTimeout currentTime | @@ -174,25 +176,25 @@ UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout c self instructionPointerRegisterValue = until ifTrue: [ ^ result ]] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARMRegisters d0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARMRegisters d1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARMRegisters d2 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -203,42 +205,42 @@ UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> framePointerRegister [ ^ UcARMRegisters fp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornARMv5Simulator >> hasLinkRegister [ ^ true ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> instructionPointerRegister [ ^ UcARMRegisters pc ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> integerRegisterState [ ^ #() ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> linkRegister [ ^ UcARMRegisters lr ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -253,177 +255,177 @@ UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r0 [ ^ self readRegister: UcARMRegisters r0 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r0: anInteger [ ^ self writeRegister: UcARMRegisters r0 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r1 [ ^ self readRegister: UcARMRegisters r1 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r10 [ ^ self readRegister: UcARMRegisters r10 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r10: anInteger [ ^ self writeRegister: UcARMRegisters r10 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r11: anInteger [ ^ self writeRegister: UcARMRegisters r11 value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> r12 [ ^ self readRegister: UcARMRegisters r12 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r12: anInteger [ self writeRegister: UcARMRegisters r12 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r1: anInteger [ ^ self writeRegister: UcARMRegisters r1 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r2 [ ^ self readRegister: UcARMRegisters r2 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r2: anInteger [ ^ self writeRegister: UcARMRegisters r2 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r3 [ ^ self readRegister: UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r3: anInteger [ ^ self writeRegister: UcARMRegisters r3 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r4 [ ^ self readRegister: UcARMRegisters r4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r4: anInteger [ ^ self writeRegister: UcARMRegisters r4 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r5 [ ^ self readRegister: UcARMRegisters r5 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r5: anInteger [ ^ self writeRegister: UcARMRegisters r5 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r6 [ ^ self readRegister: UcARMRegisters r6 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r6: anInteger [ ^ self writeRegister: UcARMRegisters r6 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r7 [ ^ self readRegister: UcARMRegisters r7 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r7: anInteger [ ^ self writeRegister: UcARMRegisters r7 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r8 [ ^ self readRegister: UcARMRegisters r8 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r8: anInteger [ ^ self writeRegister: UcARMRegisters r8 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r9 [ ^ self readRegister: UcARMRegisters r9 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r9: anInteger [ ^ self writeRegister: UcARMRegisters r9 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> receiverRegister [ ^ UcARMRegisters r5 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> registerList [ ^ #(lr pc sp fp r0 r1 r2 r3 r4 r5 r6 r7 r8 r9) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> registerStateGetters [ ^#(r0 r1 r2 r3 r4) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> retpcIn: aMemory [ "The return address is on the stack, having been pushed by either simulateCallOf:nextpc:memory: or simulateJumpCallOf:memory:" ^memory longAt: self fp + 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> sendNumberOfArgumentsRegister [ ^ UcARMRegisters r6 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -438,40 +440,40 @@ UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ self pc: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self fp: self popWord. self pc: self popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(r0: r1: r2: r3: r9: r12: lr:) withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> smashRegisterAccessors [ ^ #(r0: r1: r2: r3:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> stackPointerRegister [ ^ UcARMRegisters sp ] -{ #category : #executing } +{ #category : 'executing' } UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: count [ begin == until ifTrue: [ ^ self ]. @@ -479,13 +481,13 @@ UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: cou ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> temporaryRegister [ ^ UcARMRegisters r2 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> wordSize [ ^ 4 ] diff --git a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st index bdda0e9ccd..50b83cf1f2 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st @@ -1,94 +1,96 @@ Class { - #name : #UnicornARMv8Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornARMv8Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg0Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg1Register [ ^ UcARM64Registers x1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg2Register [ ^ UcARM64Registers x2 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg3Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> baseRegister [ ^ UcARM64Registers x24 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> cResultRegister [ ^ UcARM64Registers x0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg0Register [ ^ UcARM64Registers x0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg1Register [ ^ UcARM64Registers x1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg2Register [ ^ UcARM64Registers x2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg3Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> carry [ ^ (self nzcv bitAnd: (1<<29))~= 0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> classRegister [ ^ UcARM64Registers x22 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1 [ ^ self readRegister: UcARM64Registers cpacr_el1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1: anInteger [ self writeRegister: UcARM64Registers cpacr_el1 value: anInteger ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornARMv8Simulator >> createUnicorn [ simulator := Unicorn arm64. @@ -97,31 +99,31 @@ UnicornARMv8Simulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv8Simulator >> disassembler [ ^ LLVMARMDisassembler aarch64 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARM64Registers d0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARM64Registers d1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARM64Registers d2 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -132,24 +134,24 @@ UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> framePointerRegister [ ^ UcARM64Registers fp ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornARMv8Simulator >> hasLinkRegister [ ^ true ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornARMv8Simulator >> initializeRegisterAliases [ registerAliases @@ -162,37 +164,37 @@ UnicornARMv8Simulator >> initializeRegisterAliases [ at: #x30 put: #linkRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> instructionPointerRegister [ ^ UcARM64Registers pc ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> linkRegister [ ^ UcARM64Registers x30 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> negative [ ^ (self nzcv bitAnd: (1<<31))~= 0 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> nzcv [ ^ self readRegister: UcARM64Registers nzcv ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> overflow [ ^ (self nzcv bitAnd: (1<<28)) ~= 0 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemory [ "" "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -206,37 +208,37 @@ UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemo ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> receiverRegister [ ^ UcARM64Registers x23 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv8Simulator >> registerList [ ^ #(lr pc sp fp x28 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x16 x19 x20 x22 x23 x24 x25 zero negative carry overflow v0 v1 v2) ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> registerStateGetters [ ^#( x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x12 sp lr pc) ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> retpcIn: aMemory [ ^ memory longAt: self fp + 8 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> sendNumberOfArgumentsRegister [ ^ UcARM64Registers x25 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -253,14 +255,14 @@ UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ self instructionPointerRegisterValue: address ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self framePointerRegisterValue: self popWord. @@ -270,13 +272,13 @@ UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> smalltalkStackPointerRegister [ "Internally to execute Smalltalk code we use X28 as the stack pointer register" ^ UcARM64Registers x28 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(x0: x1: x2: x3: x4: x5: lr:) withIndexDo: @@ -284,373 +286,373 @@ UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step self perform: accessor with: index - 1 * step + base] ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x0: x1: x2: x3: x4: x5: x6: x7: x8: x9: x10: x11: x12: ) ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> stackPointerRegister [ ^ UcARM64Registers sp ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> temporaryRegister [ ^ UcARM64Registers x1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v0 [ ^ self readRawRegister: UcARM64Registers v0 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v1 [ ^ self readRawRegister: UcARM64Registers v1 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v2 [ ^ self readRawRegister: UcARM64Registers v2 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcARM64Registers v0 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister1Value [ ^ simulator readRegisterId: UcARM64Registers v1 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister2Value [ ^ simulator readRegisterId: UcARM64Registers v2 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> w25: anInteger [ self writeRegister: UcARM64Registers w25 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> w6: anInteger [ self writeRegister: UcARM64Registers w6 value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv8Simulator >> wordSize [ ^ 8 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x0 [ ^ self readRegister: UcARM64Registers x0 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x0: anInteger [ self writeRegister: UcARM64Registers x0 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x1 [ ^ self readRegister: UcARM64Registers x1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x10 [ ^ self readRegister: UcARM64Registers x10 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x10: anInteger [ ^ self writeRegister: UcARM64Registers x10 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x11 [ ^ self readRegister: UcARM64Registers x11 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x11: anInteger [ ^ self writeRegister: UcARM64Registers x11 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x12 [ ^ self readRegister: UcARM64Registers x12 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x12: anInteger [ ^ self writeRegister: UcARM64Registers x12 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x13: anInteger [ self writeRegister: UcARM64Registers x13 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x14: anInteger [ self writeRegister: UcARM64Registers x14 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x15: anInteger [ self writeRegister: UcARM64Registers x15 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x16 [ ^ self readRegister: UcARM64Registers x16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x16: anInteger [ self writeRegister: UcARM64Registers x16 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x17: anInteger [ self writeRegister: UcARM64Registers x17 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x18: anInteger [ self writeRegister: UcARM64Registers x18 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x19 [ ^ self readRegister: UcARM64Registers x19 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x19: anInteger [ self writeRegister: UcARM64Registers x19 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x1: anInteger [ ^ self writeRegister: UcARM64Registers x1 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x2 [ ^ self readRegister: UcARM64Registers x2 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x20 [ ^ self readRegister: UcARM64Registers x20 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x22 [ ^ self readRegister: UcARM64Registers x22 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x23 [ ^ self readRegister: UcARM64Registers x23 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x23: anInteger [ self writeRegister: UcARM64Registers x23 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x24 [ ^ self readRegister: UcARM64Registers x24 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x24: anInteger [ self writeRegister: UcARM64Registers x24 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x25 [ ^ self readRegister: UcARM64Registers x25 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x25: anInteger [ self writeRegister: UcARM64Registers x25 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x28 [ ^ self readRegister: UcARM64Registers x28 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x28: anInteger [ self writeRegister: UcARM64Registers x28 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x29: anInteger [ ^ self writeRegister: UcARM64Registers x29 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x2: anInteger [ ^ self writeRegister: UcARM64Registers x2 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x3 [ ^ self readRegister: UcARM64Registers x3 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x30: anInteger [ self writeRegister: UcARM64Registers x30 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x3: anInteger [ ^ self writeRegister: UcARM64Registers x3 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x4 [ ^ self readRegister: UcARM64Registers x4 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x4: anInteger [ ^ self writeRegister: UcARM64Registers x4 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x5 [ ^ self readRegister: UcARM64Registers x5 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x5: anInteger [ ^ self writeRegister: UcARM64Registers x5 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x6 [ ^ self readRegister: UcARM64Registers x6 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x6: anInteger [ ^ self writeRegister: UcARM64Registers x6 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x7 [ ^ self readRegister: UcARM64Registers x7 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x7: anInteger [ ^ self writeRegister: UcARM64Registers x7 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x8 [ ^ self readRegister: UcARM64Registers x8 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x8: anInteger [ ^ self writeRegister: UcARM64Registers x8 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x9 [ ^ self readRegister: UcARM64Registers x9 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x9: anInteger [ ^ self writeRegister: UcARM64Registers x9 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> xzr [ ^ self readRegister: UcARM64Registers xzr ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> xzr: anInteger [ ^ self writeRegister: UcARM64Registers xzr value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> zero [ ^ (self nzcv bitAnd: (1<<30)) ~= 0 diff --git a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st index 3130e440a5..539e97b80e 100644 --- a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st @@ -1,191 +1,193 @@ Class { - #name : #UnicornI386Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornI386Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> arg0Register [ ^ UcX86Registers esi ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> baseRegister [ ^ UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> cResultRegister [ ^ UcX86Registers eax ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg0 [ "Stack value 0 is return address" ^ self stackValueAt: 1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg1 [ "Stack value 0 is return address" ^ self stackValueAt: 2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg2 [ "Stack value 0 is return address" ^ self stackValueAt: 3 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg3 [ "Stack value 0 is return address" ^ self stackValueAt: 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> classRegister [ ^ UcX86Registers ecx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> createUnicorn [ ^ Unicorn x86 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornI386Simulator >> disassembler [ ^ LLVMDisassembler i386 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> eax [ ^ self readRegister: UcX86Registers eax ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eax: anInteger [ self writeRegister: UcX86Registers eax value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ebp [ ^ self readRegister: UcX86Registers ebp ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ebp: anInteger [ self framePointerRegisterValue: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ebx [ ^ self readRegister: UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ebx: anInteger [ self writeRegister: UcX86Registers ebx value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ecx [ ^ self readRegister: UcX86Registers ecx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ecx: anInteger [ self writeRegister: UcX86Registers ecx value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> edi [ ^ self readRegister: UcX86Registers edi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> edi: anInteger [ self writeRegister: UcX86Registers edi value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> edx [ ^ self readRegister: UcX86Registers edx ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> edx: anInteger [ ^ self writeRegister: UcX86Registers edx value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eflags [ ^ self readRegister: UcX86Registers eflags ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> eip [ ^ self readRegister: UcX86Registers eip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eip: anInteger [ self writeRegister: UcX86Registers eip value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> esi [ ^ self readRegister: UcX86Registers esi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> esi: anInteger [ self writeRegister: UcX86Registers esi value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> esp [ ^ self readRegister: UcX86Registers esp ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> esp: anInteger [ self stackPointerRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -195,38 +197,38 @@ UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> framePointerRegister [ ^ UcX86Registers ebp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> hasLinkRegister [ ^ false ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> instructionPointerRegister [ ^ UcX86Registers eip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> integerRegisterState [ ^{ self eax. self ebx. self ecx. self edx. self esp. self ebp. self esi. self edi. self eip. self eflags } ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. On IA32 this typically means accessing stacked arguments @@ -237,31 +239,31 @@ UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ memory longAt: self ebp + i ] ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> receiverRegister [ ^ UcX86Registers edx ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> registerList [ ^ #(eip eax ebx ecx edx esp ebp esi edi) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> retpcIn: aMemory [ ^ memory longAt: self ebp + 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -273,21 +275,21 @@ UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ self eip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self eip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateReturnIn: aMemory [ self ebp: self popWord. self eip: self popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(eax: ecx: edx:) withIndexDo: @@ -295,26 +297,26 @@ UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step i self perform: accessor with: index - 1 * step + base] ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> smashRegisterAccessors [ ^#(eax: ebx: ecx: edx: esi: edi:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> stackPointerRegister [ ^ UcX86Registers esp ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> temporaryRegister [ "Assume SysV" ^ UcX86Registers eax ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> wordSize [ ^ 4 diff --git a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st index 8931a8e659..be91859d3a 100644 --- a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st +++ b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st @@ -1,63 +1,65 @@ Class { - #name : #UnicornInvalidMemoryAccess, - #superclass : #Error, + #name : 'UnicornInvalidMemoryAccess', + #superclass : 'Error', #instVars : [ 'type', 'address', 'size', 'value' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> address [ ^ address ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> address: anObject [ address := anObject ] -{ #category : #testing } +{ #category : 'testing' } UnicornInvalidMemoryAccess >> isFetch [ ^ self type value anyMask: UcMemoryAccessType UC_MEM_FETCH value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> messageText [ ^ type item asString, ' at ', address hex ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> size [ ^ size ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> size: anObject [ size := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> type [ ^ type ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> type: anObject [ type := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> value [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> value: anObject [ value := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st index 474a23f736..43e7716bc9 100644 --- a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st @@ -1,104 +1,106 @@ Class { - #name : #UnicornProcessor, - #superclass : #Object, + #name : 'UnicornProcessor', + #superclass : 'Object', #instVars : [ 'machineSimulator' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> cResultRegister [ ^ machineSimulator cResultRegisterValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> cResultRegister: anInteger [ machineSimulator cResultRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> convertIntegerToInternal: anInteger [ ^ machineSimulator convertIntegerToInternal: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> convertInternalToInteger: anInteger [ ^ machineSimulator convertInternalToInteger: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> eax: anInteger [ machineSimulator eax: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ebp: anInteger [ machineSimulator ebp: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ebx: anInteger [ machineSimulator ebx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ecx: anInteger [ machineSimulator ecx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> edi: anInteger [ machineSimulator edi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> edx: anInteger [ ^ machineSimulator edx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> esp: anInteger [ machineSimulator esp: anInteger ] -{ #category : #caching } +{ #category : 'caching' } UnicornProcessor >> flushICacheFrom: startAddress to: endAddress [ "Do nothing for now..." machineSimulator flushICacheFrom: startAddress to: endAddress ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> fp [ ^ machineSimulator framePointerRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> fp: aValue [ ^ machineSimulator framePointerRegisterValue: aValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> hasLinkRegister [ ^ machineSimulator hasLinkRegister ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> initializeStackFor: aCompiler [ "Initialize the machine code simulator" @@ -109,192 +111,192 @@ UnicornProcessor >> initializeStackFor: aCompiler [ aCompiler backend configureStackAlignment ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> integerRegisterState [ ^ machineSimulator integerRegisterState ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> linkRegisterValue [ ^ machineSimulator linkRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> lr: anInteger [ machineSimulator lr: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> machineSimulator [ ^ machineSimulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> machineSimulator: aMachineSimulator [ machineSimulator := aMachineSimulator ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> pc [ ^ machineSimulator instructionPointerRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> pc: anInteger [ ^ machineSimulator instructionPointerRegisterValue: anInteger ] -{ #category : #'stack-management' } +{ #category : 'stack-management' } UnicornProcessor >> popWord [ ^ machineSimulator popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory [ ^ machineSimulator postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory ] -{ #category : #'stack-management' } +{ #category : 'stack-management' } UnicornProcessor >> pushWord: anInteger [ machineSimulator pushWord: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r0: anInteger [ ^ machineSimulator r0: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r10: anInteger [ machineSimulator r10: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r11: anInteger [ machineSimulator r11: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r1: anInteger [ ^ machineSimulator r1: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r2: anInteger [ machineSimulator r2: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r3: anInteger [ machineSimulator r3: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r4: anInteger [ machineSimulator r4: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r5: anInteger [ machineSimulator r5: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r6: anInteger [ machineSimulator r6: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r8 [ ^ machineSimulator r8 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r8: anInteger [ machineSimulator r8: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r9: anInteger [ machineSimulator r9: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r9b: anInteger [ machineSimulator r9b: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rax: anInteger [ machineSimulator rax: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rbp: anInteger [ machineSimulator rbp: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rcx: anInteger [ machineSimulator rcx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> rdi: anInteger [ machineSimulator rdi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rdx: anInteger [ machineSimulator rdx: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> retpcIn: aSpurSimulatedMemory [ ^ machineSimulator retpcIn: aSpurSimulatedMemory ] -{ #category : #'accessing registers' } +{ #category : 'accessing registers' } UnicornProcessor >> rsi: anInteger [ ^ machineSimulator rsi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rsp: anInteger [ machineSimulator rsp: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnlyBelow: minimumWritableAddress [ @@ -304,7 +306,7 @@ UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnly count: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> runUntil: anAddress [ ^ machineSimulator startAt: machineSimulator instructionPointerRegisterValue @@ -313,165 +315,165 @@ UnicornProcessor >> runUntil: anAddress [ count: 0 ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornProcessor >> setFramePointer: framePointer stackPointer: stackPointer [ machineSimulator framePointerRegisterValue: framePointer. machineSimulator stackPointerRegisterValue: stackPointer ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory [ machineSimulator simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ machineSimulator simulateLeafCallOf: address nextpc: nextpc memory: aMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateReturnIn: aSpurSimulatedMemory [ ^ machineSimulator simulateReturnIn: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory [ machineSimulator smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> smashRegistersWithValuesFrom: base by: step [ machineSimulator smashRegistersWithValuesFrom: base by: step ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> sp [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> sp: anInteger [ machineSimulator stackPointerRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> w25: anInteger [ machineSimulator w25: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> w6: anInteger [ machineSimulator w6: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x12: anInteger [ machineSimulator x12: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x16: anInteger [ machineSimulator x16: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x19: anInteger [ machineSimulator x19: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x1: anInteger [ machineSimulator x1: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x23: anInteger [ machineSimulator x23: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x24: anInteger [ machineSimulator x24: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x25: anInteger [ machineSimulator x25: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x28: anInteger [ machineSimulator x28: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x29: anInteger [ machineSimulator x29: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x30: anInteger [ machineSimulator x30: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x3: anInteger [ machineSimulator x3: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x4: anInteger [ machineSimulator x4: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x5: anInteger [ machineSimulator x5: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x6: anInteger [ machineSimulator x6: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x7: anInteger [ machineSimulator x7: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> xzr [ ^ machineSimulator xzr ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> xzr: anInteger [ machineSimulator xzr: anInteger diff --git a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st index c65b477cae..2895ec60c8 100644 --- a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st @@ -1,64 +1,66 @@ Class { - #name : #UnicornRISCVSimulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornRISCVSimulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> arg0Register [ ^ UcRISCVRegisters x10 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> arg1Register [ ^ UcRISCVRegisters x11 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> baseRegister [ ^ UcRISCVRegisters x26 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> cResultRegister [ ^ UcRISCVRegisters x12 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg0Register [ ^ UcRISCVRegisters x12 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg1Register [ ^ UcRISCVRegisters x13 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg2Register [ ^ UcRISCVRegisters x14 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg3Register [ ^ UcRISCVRegisters x15 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> classRegister [ ^ UcRISCVRegisters x23 ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornRISCVSimulator >> createUnicorn [ simulator := Unicorn riscv64. @@ -67,290 +69,290 @@ UnicornRISCVSimulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> disassembler [ ^ LLVMRV64Disassembler riscv64 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister0 [ ^ UcRISCVRegisters f0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister1 [ ^ UcRISCVRegisters f1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister2 [ ^ UcRISCVRegisters f2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f0 [ ^ self readRegister: UcRISCVRegisters f0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f1 [ ^ self readRegister: UcRISCVRegisters f1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f10 [ ^ self readRegister: UcRISCVRegisters f10 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f11 [ ^ self readRegister: UcRISCVRegisters f11 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f12 [ ^ self readRegister: UcRISCVRegisters f12 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f13 [ ^ self readRegister: UcRISCVRegisters f13 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f14 [ ^ self readRegister: UcRISCVRegisters f14 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f15 [ ^ self readRegister: UcRISCVRegisters f15 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f16 [ ^ self readRegister: UcRISCVRegisters f16 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f17 [ ^ self readRegister: UcRISCVRegisters f17 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f18 [ ^ self readRegister: UcRISCVRegisters f18 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f19 [ ^ self readRegister: UcRISCVRegisters f19 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f2 [ ^ self readRegister: UcRISCVRegisters f2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f20 [ ^ self readRegister: UcRISCVRegisters f20 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f21 [ ^ self readRegister: UcRISCVRegisters f21 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f22 [ ^ self readRegister: UcRISCVRegisters f22 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f23 [ ^ self readRegister: UcRISCVRegisters f23 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f24 [ ^ self readRegister: UcRISCVRegisters f24 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f25 [ ^ self readRegister: UcRISCVRegisters f25 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f26 [ ^ self readRegister: UcRISCVRegisters f26 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f27 [ ^ self readRegister: UcRISCVRegisters f27 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f28 [ ^ self readRegister: UcRISCVRegisters f28 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f29 [ ^ self readRegister: UcRISCVRegisters f29 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f3 [ ^ self readRegister: UcRISCVRegisters f3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f30 [ ^ self readRegister: UcRISCVRegisters f30 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f31 [ ^ self readRegister: UcRISCVRegisters f31 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f4 [ ^ self readRegister: UcRISCVRegisters f4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f5 [ ^ self readRegister: UcRISCVRegisters f5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f6 [ ^ self readRegister: UcRISCVRegisters f6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f7 [ ^ self readRegister: UcRISCVRegisters f7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f8 [ ^ self readRegister: UcRISCVRegisters f8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f9 [ ^ self readRegister: UcRISCVRegisters f9 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagCarryRegister [ ^ UcRISCVRegisters x31 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagCarryRegisterValue [ ^ self readRegister: self flagCarryRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegister [ ^ UcRISCVRegisters x30 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegisterValue [ ^ self readRegister: self flagOverflowRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagSignRegister [ ^ UcRISCVRegisters x29 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagSignRegisterValue [ ^ self readRegister: self flagSignRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagZeroRegister [ ^ UcRISCVRegisters x28 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagZeroRegisterValue [ ^ self readRegister: self flagZeroRegister ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> framePointerRegister [ "Frame Pointer" ^ UcRISCVRegisters x8 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornRISCVSimulator >> hasLinkRegister [ ^ true ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> initializeRegisterAliases [ registerAliases @@ -396,7 +398,7 @@ UnicornRISCVSimulator >> initializeRegisterAliases [ at: #f7 put: #ft7 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ registerSmalltalkAliases @@ -425,43 +427,43 @@ UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ at: #x31 put: #carry ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> instructionPointerRegister [ ^ UcRISCVRegisters pc ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> linkRegister [ ^ UcRISCVRegisters x1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatus [ ^ UcRISCVRegisters mstatus ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue [ ^ self readRegister: self mstatus ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue: aValue [ ^ self writeRegister: self mstatus value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> receiverRegister [ ^ UcRISCVRegisters x24 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRISCVSimulator >> registerList [ ^ #(lr pc sp fp @@ -470,375 +472,375 @@ UnicornRISCVSimulator >> registerList [ f0 f1 f2 f3 f4 f5 f6 f7) ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s0 [ ^ self readRegister: UcRISCVRegisters s0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s0: aValue [ ^ self writeRegister: UcRISCVRegisters s0 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s2 [ ^ self readRegister: UcRISCVRegisters s2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s2: aValue [ ^ self writeRegister: UcRISCVRegisters s2 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s7 [ ^ self readRegister: UcRISCVRegisters s7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s7: aValue [ ^ self writeRegister: UcRISCVRegisters s7 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s8 [ ^ self readRegister: UcRISCVRegisters s8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s8: aValue [ ^ self writeRegister: UcRISCVRegisters s8 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s9 [ ^ self readRegister: UcRISCVRegisters s9 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s9: aValue [ ^ self writeRegister: UcRISCVRegisters s9 value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> sendNumberOfArgumentsRegister [ ^ UcRISCVRegisters x25 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> simulateLeafCallOf: destinationAddress nextpc: returnAddress memory: anUndefinedObject [ self linkRegisterValue: returnAddress. self instructionPointerRegisterValue: destinationAddress ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x1: x5: x6: x7: x10: x11: x12: x13: x14: x15: x16: x17: x28: x29: x30: x31:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> stackPointerRegister [ ^ UcRISCVRegisters x2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t0 [ ^ self readRegister: UcRISCVRegisters t0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t0: aValue [ ^ self writeRegister: UcRISCVRegisters t0 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t1 [ ^ self readRegister: UcRISCVRegisters t1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t1: aValue [ ^ self writeRegister: UcRISCVRegisters t1 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t2 [ ^ self readRegister: UcRISCVRegisters t2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t2: aValue [ ^ self writeRegister: UcRISCVRegisters t2 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t3 [ ^ self readRegister: UcRISCVRegisters t3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t3: aValue [ ^ self writeRegister: UcRISCVRegisters t3 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t4 [ ^ self readRegister: UcRISCVRegisters t4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t4: aValue [ ^ self writeRegister: UcRISCVRegisters t4 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t5 [ ^ self readRegister: UcRISCVRegisters t5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t5: aValue [ ^ self writeRegister: UcRISCVRegisters t5 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t6 [ ^ self readRegister: UcRISCVRegisters t6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t6: aValue [ ^ self writeRegister: UcRISCVRegisters t6 value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> temporaryRegister [ ^ UcRISCVRegisters x22 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRISCVSimulator >> wordSize [ ^ 8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x0 [ ^ self readRegister: UcRISCVRegisters x0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x1 [ ^ self readRegister: UcRISCVRegisters x1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x10 [ ^ self readRegister: UcRISCVRegisters x10 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x11 [ ^ self readRegister: UcRISCVRegisters x11 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x12 [ ^ self readRegister: UcRISCVRegisters x12 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x13 [ ^ self readRegister: UcRISCVRegisters x13 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x14 [ ^ self readRegister: UcRISCVRegisters x14 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x15 [ ^ self readRegister: UcRISCVRegisters x15 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x16 [ ^ self readRegister: UcRISCVRegisters x16 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x17 [ ^ self readRegister: UcRISCVRegisters x17 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x18 [ ^ self readRegister: UcRISCVRegisters x18 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x19 [ ^ self readRegister: UcRISCVRegisters x19 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x2 [ ^ self readRegister: UcRISCVRegisters x2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x20 [ ^ self readRegister: UcRISCVRegisters x20 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x21 [ ^ self readRegister: UcRISCVRegisters x21 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x22 [ ^ self readRegister: UcRISCVRegisters x22 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x23 [ ^ self readRegister: UcRISCVRegisters x23 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x24 [ ^ self readRegister: UcRISCVRegisters x24 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x25 [ ^ self readRegister: UcRISCVRegisters x25 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x26 [ ^ self readRegister: UcRISCVRegisters x26 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x27 [ ^ self readRegister: UcRISCVRegisters x27 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x28 [ ^ self readRegister: UcRISCVRegisters x28 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x29 [ ^ self readRegister: UcRISCVRegisters x29 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x3 [ ^ self readRegister: UcRISCVRegisters x3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x30 [ ^ self readRegister: UcRISCVRegisters x30 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x31 [ ^ self readRegister: UcRISCVRegisters x31 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x4 [ ^ self readRegister: UcRISCVRegisters x4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x5 [ ^ self readRegister: UcRISCVRegisters x5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x6 [ ^ self readRegister: UcRISCVRegisters x6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x7 [ ^ self readRegister: UcRISCVRegisters x7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x8 [ ^ self readRegister: UcRISCVRegisters x8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x9 [ ^ self readRegister: UcRISCVRegisters x9 diff --git a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st index 4302fb7c83..401ef8c3e9 100644 --- a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st @@ -1,48 +1,50 @@ Class { - #name : #UnicornRegisterDescriptor, - #superclass : #Object, + #name : 'UnicornRegisterDescriptor', + #superclass : 'Object', #instVars : [ 'simulator', 'name', 'alias' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> alias [ ^ alias ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -52,23 +54,23 @@ UnicornRegisterDescriptor >> printOn: aStream [ ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st index 0b5790d901..cd421437e1 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st @@ -1,14 +1,16 @@ Class { - #name : #UnicornSimulationTrap, - #superclass : #Object, + #name : 'UnicornSimulationTrap', + #superclass : 'Object', #instVars : [ 'unicornInvalidAccess', 'simulator' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemoryAccess [ ^ self new @@ -17,13 +19,13 @@ UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemor yourself ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> address [ ^ unicornInvalidAccess address ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> nextpc [ | instruction | @@ -31,7 +33,7 @@ UnicornSimulationTrap >> nextpc [ ^ self simulator instructionPointerRegisterValue + instruction size ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> registerAccessor [ "Assume this is a read of a value into a register" @@ -44,18 +46,18 @@ UnicornSimulationTrap >> registerAccessor [ ^ (registerName , ':') asSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> type [ unicornInvalidAccess type = UcMemoryAccessType UC_MEM_WRITE_UNMAPPED @@ -68,12 +70,12 @@ UnicornSimulationTrap >> type [ self halt ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> unicornInvalidAccess: anUnicornInvalidMemoryAccess [ unicornInvalidAccess := anUnicornInvalidMemoryAccess ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> writtenValue [ "This is the value that was tried to be written but failed (if this is a failed write)" ^ unicornInvalidAccess value diff --git a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st index c8194d7391..fc5d4a2eff 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st @@ -1,26 +1,28 @@ Class { - #name : #UnicornSimulator, - #superclass : #ProcessorSimulator, + #name : 'UnicornSimulator', + #superclass : 'ProcessorSimulator', #instVars : [ 'stopReason', 'invalidAccessHandler' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } UnicornSimulator class >> supportsISA: isa [ ^ #( #ARMv5 #ARMv8 #IA32 #X64 #aarch64 #riscv64 ) includes: isa ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> createUnicorn [ self subclassResponsibility ] -{ #category : #executing } +{ #category : 'executing' } UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | result error startTime currentTime remainingTimeout remainingCount | @@ -71,13 +73,13 @@ UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: ifTrue: [ ^ result ]] ] -{ #category : #'stack-access' } +{ #category : 'stack-access' } UnicornSimulator >> finishMappingMemory [ "Do nothing in the case of Unicorn, is useful if the simulator used has to map memory by hand" ] -{ #category : #'handling invalid accesses' } +{ #category : 'handling invalid accesses' } UnicornSimulator >> handleInvalidAccess: invalidAccess [ | previousInstructionPointer hasToContinue | @@ -95,7 +97,7 @@ UnicornSimulator >> handleInvalidAccess: invalidAccess [ ^ hasToContinue ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> initialize [ super initialize. @@ -110,7 +112,7 @@ UnicornSimulator >> initialize [ true] ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> initializeUnicorn [ simulator @@ -126,12 +128,12 @@ UnicornSimulator >> initializeUnicorn [ false ] ] -{ #category : #'handling invalid accesses' } +{ #category : 'handling invalid accesses' } UnicornSimulator >> invalidAccessHandler: aFullBlockClosure [ invalidAccessHandler := aFullBlockClosure ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ simulator @@ -140,7 +142,7 @@ UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ address = anAddress ifTrue: [ aBlock value ] ] ] -{ #category : #executing } +{ #category : 'executing' } UnicornSimulator >> startAt: begin until: until timeout: timeout count: count [ ^ self doStartAt: begin until: until timeout: timeout count: count. diff --git a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st index 12be3bf4bf..e070ae5e0a 100644 --- a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st +++ b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st @@ -1,18 +1,20 @@ Class { - #name : #UnicornTimeout, - #superclass : #Error, + #name : 'UnicornTimeout', + #superclass : 'Error', #instVars : [ 'target' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornTimeout >> target [ ^ target ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornTimeout >> target: anObject [ target := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st index d7176e7d9a..4dfd2f5b9d 100644 --- a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st @@ -1,98 +1,100 @@ Class { - #name : #UnicornX64Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornX64Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> arg0Register [ ^ UcX86Registers rdi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> arg1Register [ ^ UcX86Registers rsi ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> baseRegister [ ^ UcX86Registers rbx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> cResultRegister [ ^ UcX86Registers rax ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg0Register [ "Assume SysV" ^ UcX86Registers rdi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg1Register [ "Assume SysV" ^ UcX86Registers rsi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg2Register [ "Assume SysV" ^ UcX86Registers rdx ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg3Register [ "Assume SysV" ^ UcX86Registers rcx ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> classRegister [ ^ UcX86Registers rcx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> createUnicorn [ ^ Unicorn x8664 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornX64Simulator >> disassembler [ ^ LLVMDisassembler amd64 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcX86Registers xmm1 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcX86Registers xmm2 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -102,25 +104,25 @@ UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> framePointerRegister [ ^ UcX86Registers rbp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : #testing } +{ #category : 'testing' } UnicornX64Simulator >> hasLinkRegister [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornX64Simulator >> initializeRegisterAliases [ registerAliases @@ -131,19 +133,19 @@ UnicornX64Simulator >> initializeRegisterAliases [ at: #rbp put: #framePointerRegister ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> instructionPointerRegister [ ^ UcX86Registers rip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> integerRegisterState [ ^ #() ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a Win64 or SysV ABI call. On X64 this simply means accessing register arguments. @@ -158,266 +160,266 @@ UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ self perform: getter] ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r10 [ ^ self readRegister: UcX86Registers r10 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r10: anInteger [ ^ self writeRegister: UcX86Registers r10 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r11 [ ^ self readRegister: UcX86Registers r11 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r11: anInteger [ ^ self writeRegister: UcX86Registers r11 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r12 [ ^ self readRegister: UcX86Registers r12 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r12: anInteger [ ^ self writeRegister: UcX86Registers r12 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r13: anInteger [ self writeRegister: UcX86Registers r13 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r14: anInteger [ self writeRegister: UcX86Registers r14 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r15: anInteger [ self writeRegister: UcX86Registers r15 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r1: anInteger [ ^ self writeRegister: UcX86Registers r1 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r2: anInteger [ ^ self writeRegister: UcX86Registers r2 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r3: anInteger [ ^ self writeRegister: UcX86Registers r3 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r4: anInteger [ ^ self writeRegister: UcX86Registers r4 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r5: anInteger [ ^ self writeRegister: UcX86Registers r5 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r6: anInteger [ ^ self writeRegister: UcX86Registers r6 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r7: anInteger [ ^ self writeRegister: UcX86Registers r7 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r8 [ ^ self readRegister: UcX86Registers r8 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r8: anInteger [ ^ self writeRegister: UcX86Registers r8 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r9 [ ^ self readRegister: UcX86Registers r9 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r9: anInteger [ ^ self writeRegister: UcX86Registers r9 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r9b: anInteger [ self writeRegister: UcX86Registers r9b value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rax [ ^ self readRegister: UcX86Registers rax ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rax: anInteger [ self writeRegister: UcX86Registers rax value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbp [ ^ self readRegister: UcX86Registers rbp ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbp: anInteger [ ^ self writeRegister: UcX86Registers rbp value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbx [ ^ self readRegister: UcX86Registers rbx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbx: aValue [ ^ self writeRegister: UcX86Registers rbx value: aValue ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rcx [ ^ self readRegister: UcX86Registers rcx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rcx: anInteger [ ^ self writeRegister: UcX86Registers rcx value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdi [ ^ self readRegister: UcX86Registers rdi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rdi: anInteger [ self writeRegister: UcX86Registers rdi value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdx [ ^ self readRegister: UcX86Registers rdx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdx: anInteger [ ^ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> receiverRegister [ ^ UcX86Registers rdx ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> registerList [ ^ #(rip rax rbx rcx rdx rsp rbp r8 r9 r10 r11 r12 rsi rdi) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> retpcIn: aSpurSimulatedMemory [ ^ memory long64At: self rbp + 8 ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rip [ ^ self readRegister: UcX86Registers rip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rip: anInteger [ self writeRegister: UcX86Registers rip value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsi [ ^ self readRegister: UcX86Registers rsi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rsi: anInteger [ self writeRegister: UcX86Registers rsi value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsp [ ^ self readRegister: UcX86Registers rsp ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsp: anInteger [ ^ self writeRegister: UcX86Registers rsp value: anInteger ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers r9 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -437,21 +439,21 @@ UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ self rip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self rip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateReturnIn: aMemory [ self rbp: (self popWord). self rip: (self popWord) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ | volatileRegisters | CogX64Compiler isSysV @@ -469,50 +471,50 @@ UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in self perform: setter with: index - 1 * step + base] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> smashRegisterAccessors [ ^#(rax: rbx: rcx: rdx: rsi: rdi: r8: r9: r10: r11: r12: r13: r14: r15:) ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> stackPointerRegister [ ^ UcX86Registers rsp ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> temporaryRegister [ "Both in System V and Windows" ^ UcX86Registers rax ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> wordSize [ ^ 8 ] -{ #category : #'accessing - registers' } +{ #category : 'accessing - registers' } UnicornX64Simulator >> xmm0 [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> xmm1 [ ^ simulator readRegisterId: UcX86Registers xmm1 size: 16 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> xmm2 [ ^ simulator readRegisterId: UcX86Registers xmm2 size: 16 diff --git a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st index a4cd67ccdf..386f10c484 100644 --- a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMARMStackAlignmentTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMARMStackAlignmentTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'instructions' ], #pools : [ 'CogAbstractRegisters' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMStackAlignmentTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -18,25 +20,25 @@ VMARMStackAlignmentTest class >> wordSizeParameters [ yourself ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> addInstruction: anInstruction [ instructions add: anInstruction ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> disassembleInstructions [ ^ self disassembleFrom: cogInitialAddress opcodes: instructions size ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> runInstructions [ ^ self runFrom: cogInitialAddress until: cogInitialAddress + (instructions size * 4) ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> setUp [ super setUp. @@ -45,7 +47,7 @@ VMARMStackAlignmentTest >> setUp [ machineSimulator stackPointerRegisterValue: interpreter rumpCStackAddress ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ "To start the stack pointer should be aligned" @@ -96,7 +98,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ equals: 'Unhandled CPU exception (UC_ERR_EXCEPTION)' ] ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ "To start the stack pointer should be aligned" @@ -135,7 +137,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> writeInstructions [ cogInitialAddress := cogit methodZone allocate: instructions size * 4 . diff --git a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st index 82faa50100..522508bad7 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMARMV8SIMDEncodingTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMARMV8SIMDEncodingTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMV8SIMDEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -12,7 +14,7 @@ VMARMV8SIMDEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> armInstructionAt: index [ | addr inst | @@ -22,20 +24,20 @@ VMARMV8SIMDEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : #configuration } +{ #category : 'configuration' } VMARMV8SIMDEncodingTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } VMARMV8SIMDEncodingTest >> initializationOptions [ ^ super initializationOptions , { #ProcessorClass . DummyProcessor } ] -{ #category : #accessing } +{ #category : 'accessing' } VMARMV8SIMDEncodingTest >> jitOptions [ ^ super jitOptions @@ -44,7 +46,7 @@ VMARMV8SIMDEncodingTest >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ self compile: [ cogit DupS: 64 R: 3 Vr: 0 ]. @@ -54,7 +56,7 @@ VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ equals: 'dup v0.2d, x3' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ self compile: [ cogit FaddS: 32 Rv: 0 Rv: 1 Rv: 2 ]. @@ -64,7 +66,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ equals: 'fadd v2.4s, v0.4s, v1.4s' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ self compile: [ cogit FaddS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -74,7 +76,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ equals: 'fadd v2.2d, v0.2d, v1.2d' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ self compile: [ cogit FsubS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -84,7 +86,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ equals: 'fsub v2.2d, v0.2d, v1.2d' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -94,7 +96,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.4s }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -104,7 +106,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.2d }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 0 ]. @@ -114,7 +116,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ equals: 'ld1 { v0.2d }, [x1]' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -124,7 +126,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.4s }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -134,7 +136,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.2d }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 0 ]. diff --git a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st index ff35f32f94..50b7051a80 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMARMV8SpecificEncodingTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMARMV8SpecificEncodingTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMV8SpecificEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -12,7 +14,7 @@ VMARMV8SpecificEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> armInstructionAt: index [ | addr inst | @@ -22,7 +24,7 @@ VMARMV8SpecificEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ | expectedAddress expectedValue | @@ -46,7 +48,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ | expectedAddress expectedValue | @@ -70,7 +72,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ | expectedAddress expectedValue | @@ -92,7 +94,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ | constant | @@ -108,7 +110,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ | negativeConstant12Bits | @@ -123,7 +125,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstant [ | negativeConstant12Bits | @@ -138,7 +140,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstant [ | negativeConstant12Bits | @@ -153,7 +155,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ | negativeConstant12Bits | @@ -168,7 +170,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ | positiveConstant12Bits | @@ -183,7 +185,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ | positiveConstant12Bits | @@ -198,7 +200,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstant [ | positiveConstant12Bits | @@ -213,7 +215,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstant [ | positiveConstant12Bits | @@ -228,7 +230,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ @@ -243,7 +245,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ @@ -258,7 +260,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ @@ -275,7 +277,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ self assert: machineSimulator x24 hex equals: completementValue hex ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ self doTestEncodeMoveMbrR: -256. @@ -283,7 +285,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMbrR: -1024. @@ -291,7 +293,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ self doTestEncodeMoveMbrR: 255. @@ -299,7 +301,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMbrR: 1024. @@ -307,35 +309,35 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegative9BitConstant [ self doTestEncodeMoveMwrR: -256 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMwrR: -20056 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositive12BitConstant [ self doTestEncodeMoveMwrR: 16r100 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMwrR: 20056 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ self doTestEncodeMoveRMwr: -256. @@ -346,28 +348,28 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ equals: 'stur x23, [x3, #-256]' ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitButShiftableConstant [ self doTestEncodeMoveRMwr: 512 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitNegativeConstant [ self doTestEncodeMoveRMwr: -61440 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithPositive9BitConstant [ self doTestEncodeMoveRMwr: 256 ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self compile: [ @@ -379,7 +381,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self assert: machineSimulator receiverRegisterValue equals: 16r1FF ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self compile: [ @@ -391,7 +393,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self assert: machineSimulator receiverRegisterValue equals: (67108865 bitOr: 16r100) ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithNonEncodableConstant [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st index e712546ea2..c7defd272a 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMAbstractBuilder, - #superclass : #Object, + #name : 'VMAbstractBuilder', + #superclass : 'Object', #instVars : [ 'interpreter', 'memory' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ "convinience method to put an oop at a specific place No need to take care of the size of the collection, I'm taking care of it!" @@ -20,22 +22,22 @@ VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> interpreter [ ^ interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> interpreter: anObject [ interpreter := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> memory [ ^ memory ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> memory: anObject [ memory := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st index 4b0874a231..afe2f98aa3 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st @@ -1,13 +1,14 @@ Class { - #name : #VMAbstractFFITest, - #superclass : #VMAbstractPrimitiveTest, + #name : 'VMAbstractFFITest', + #superclass : 'VMAbstractPrimitiveTest', #pools : [ 'LibFFIConstants' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argumentTypes withReturnType: returnType [ | functionAddress tfExternalFunction functionExternalAddress tfFunctionDefinition cif cifExternalAddress | @@ -31,7 +32,7 @@ VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argume ^ tfExternalFunction ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ ^ self @@ -40,7 +41,7 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ withReturnType: interpreter libFFI float ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTypes: argumentTypes [ ^ self @@ -49,20 +50,20 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTy withReturnType: interpreter libFFI float ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_FFI . true } ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> interpreterClass [ ^ VMTestMockInterpreter ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> newExternalAddress: anInteger [ | anExternalAddress | @@ -75,7 +76,7 @@ VMAbstractFFITest >> newExternalAddress: anInteger [ ^ anExternalAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> readyProcesses [ | collection | @@ -84,7 +85,7 @@ VMAbstractFFITest >> readyProcesses [ ^ collection ] -{ #category : #initialization } +{ #category : 'initialization' } VMAbstractFFITest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st index 1d8d2fb4e2..9ae991c41c 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st @@ -1,38 +1,40 @@ Class { - #name : #VMAbstractImageFormatTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMAbstractImageFormatTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'imageReader' ], - #category : #'VMMakerTests-ImageFormat' + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractImageFormatTest >> defaultTimeLimit [ ^ 30 seconds ] -{ #category : #tests } +{ #category : 'tests' } VMAbstractImageFormatTest >> imageFileName [ ^ 'lala.image' ] -{ #category : #tests } +{ #category : 'tests' } VMAbstractImageFormatTest >> readHeader [ ^ imageReader readHeaderFromImage: self imageFileName ] -{ #category : #actions } +{ #category : 'actions' } VMAbstractImageFormatTest >> saveImage [ interpreter writeImageFileIO. ] -{ #category : #running } +{ #category : 'running' } VMAbstractImageFormatTest >> setUp [ super setUp. @@ -55,7 +57,7 @@ VMAbstractImageFormatTest >> setUp [ ] -{ #category : #ston } +{ #category : 'ston' } VMAbstractImageFormatTest >> stonPretty: anObject [ ^ String streamContents: [ :s | @@ -66,7 +68,7 @@ VMAbstractImageFormatTest >> stonPretty: anObject [ ] ] -{ #category : #running } +{ #category : 'running' } VMAbstractImageFormatTest >> tearDown [ self imageFileName asFileReference ensureDeleteAll. diff --git a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st index 11812a06b3..9657b0b0bd 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #VMAbstractPrimitiveTest, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMAbstractPrimitiveTest', + #superclass : 'VMSpurMemoryManagerTest', #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMClassIndices', 'VMObjectIndices' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ | aProcess | @@ -23,7 +24,7 @@ VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ ^ aProcess ] -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPriority [ | suspendedContext aProcess | @@ -45,7 +46,7 @@ VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPrior ^ aProcess ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMAbstractPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -56,7 +57,7 @@ VMAbstractPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ ^ methodBuilder @@ -65,7 +66,7 @@ VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ buildMethod ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -114,7 +115,7 @@ VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" diff --git a/smalltalksrc/VMMakerTests/VMBlockTest.class.st b/smalltalksrc/VMMakerTests/VMBlockTest.class.st index b257001c87..8481eab72c 100644 --- a/smalltalksrc/VMMakerTests/VMBlockTest.class.st +++ b/smalltalksrc/VMMakerTests/VMBlockTest.class.st @@ -1,24 +1,26 @@ Class { - #name : #VMBlockTest, - #superclass : #VMInterpreterTests, + #name : 'VMBlockTest', + #superclass : 'VMInterpreterTests', #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> anEmptyMethod [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> evaluatingABlock [ [^1] value ] -{ #category : #helpers } +{ #category : 'helpers' } VMBlockTest >> installFullBlockClosureClass [ | aClass | aClass := self @@ -32,14 +34,14 @@ VMBlockTest >> installFullBlockClosureClass [ withValue: aClass ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodReturningABlock [ ^ [] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ true ifTrue: [ @@ -48,14 +50,14 @@ VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ ^ [ anArgument ] ] ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodReturningABlockWithTwoArguments [ ^ [:a :b] ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodWithLocalReturningABlock [ | a | @@ -63,14 +65,14 @@ VMBlockTest >> methodWithLocalReturningABlock [ ^ [ a ] ] -{ #category : #running } +{ #category : 'running' } VMBlockTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testCreatingABlockCapturesReceiver [ | methodReturning initialMethod | @@ -95,7 +97,7 @@ VMBlockTest >> testCreatingABlockCapturesReceiver [ self assert: (memory fetchPointer: FullClosureReceiverIndex ofObject: interpreter stackTop) equals: memory trueObject ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ | methodReturning initialMethod placeTakenByLiterals closure blockInitialPC compiledBlock | @@ -132,7 +134,7 @@ VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ | methodReturning initialMethod | @@ -159,7 +161,7 @@ VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ assert: (memory fetchPointer: FullClosureFirstCopiedValueIndex ofObject: interpreter stackTop) equals: (memory integerObjectOf: 2) ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ | methodReturning initialMethod | @@ -188,7 +190,7 @@ VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ self assert: (interpreter isWidowedContext: (memory outerContextOf: interpreter stackTop)) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable [ | methodReturning initialMethod | @@ -215,7 +217,7 @@ VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ | methodReturning initialMethod | @@ -242,7 +244,7 @@ VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testEvaluatingABlock [ | methodReturning initialMethod | @@ -274,7 +276,7 @@ VMBlockTest >> testEvaluatingABlock [ equals: (memory classAtIndex: ClassFullBlockClosureCompactIndex) ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testPushClosureBytecodePushesClosure [ | methodReturning initialMethod | diff --git a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st index 1fea546beb..459f61526b 100644 --- a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMByteCodesTest, - #superclass : #VMInterpreterTests, + #name : 'VMByteCodesTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'contextOop', 'context', 'callingFrame', 'topFrame' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -21,7 +23,7 @@ VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ self assert: (interpreter temporary: anIndex in: interpreter framePointer) equals: anOop ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock pushed: anOop [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -33,7 +35,7 @@ VMByteCodesTest >> assert: aBlock pushed: anOop [ ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock returned: anOop [ | callerSP | callerSP := interpreter frameCallerSP: interpreter framePointer. @@ -45,7 +47,7 @@ VMByteCodesTest >> assert: aBlock returned: anOop [ ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assertPopped: aBlock [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -56,24 +58,24 @@ VMByteCodesTest >> assertPopped: aBlock [ ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> firstPushTemporaryVariableBytecode [ "in v3 bytecode table" ^ 16 ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> firstStoreAndPopTemporaryVariableBytecode [ ^ 104 ] -{ #category : #'helper-interpret' } +{ #category : 'helper-interpret' } VMByteCodesTest >> interpret: aBlock [ aBlock value ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> interpretNextBytecode [ | count | @@ -83,7 +85,7 @@ VMByteCodesTest >> interpretNextBytecode [ count = 1 ] ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> interpretWithFrame: aBlock [ callingFrame := stackBuilder addNewFrame method: @@ -95,7 +97,7 @@ VMByteCodesTest >> interpretWithFrame: aBlock [ self interpret: aBlock ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> pushTempTest: index [ stackBuilder addNewFrame tempAt: index put: (memory integerObjectOf: 42). @@ -109,13 +111,13 @@ VMByteCodesTest >> pushTempTest: index [ ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> pushTemporaryVariableBytecodeAt: offset [ ^ self firstPushTemporaryVariableBytecode + offset. ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> pushThisContextTopFrame [ self interpretWithFrame: [ interpreter pushActiveContextBytecode ]. @@ -126,14 +128,14 @@ VMByteCodesTest >> pushThisContextTopFrame [ withInterpreter: interpreter ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> setUp [ super setUp. self installFloat64RegisterClass ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ stackBuilder addNewFrame @@ -149,12 +151,12 @@ VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ intoTemporary: index ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> storeAndPopTemporaryVariableBytecodeAt: anInteger [ ^ self firstStoreAndPopTemporaryVariableBytecode + anInteger ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ | oldMaybeSenderContext newMaybeSenderContext | self interpretWithFrame: [ interpreter pushActiveContextBytecode. ]. @@ -164,7 +166,7 @@ VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ self assert: oldMaybeSenderContext equals: newMaybeSenderContext ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testAddVectorBytecode [ | index v0 v1 result firstTerm size | @@ -191,7 +193,7 @@ VMByteCodesTest >> testAddVectorBytecode [ ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testArraySumUsingVectorBytecode [ | cm x y result simulatedMethod z | @@ -233,7 +235,7 @@ VMByteCodesTest >> testArraySumUsingVectorBytecode [ ] -{ #category : #'tests-complex' } +{ #category : 'tests-complex' } VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMethod [ | class object objectToPutInSlot attemptToAssignMethod attemptToAssignSelector aMethodDictionary | @@ -277,7 +279,7 @@ VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMe self assert: topFrame method equals: attemptToAssignMethod ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ | v0 v1 result method | @@ -304,7 +306,7 @@ VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 6.0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testDuplicateStackTop [ stackBuilder addNewFrame ; buildStack. @@ -321,7 +323,7 @@ VMByteCodesTest >> testDuplicateStackTop [ ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPopStackTopBytecode [ stackBuilder addNewFrame ; buildStack. @@ -337,7 +339,7 @@ VMByteCodesTest >> testPopStackTopBytecode [ ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testPushArrayToRegisterBytecode [ | array index result | @@ -362,7 +364,7 @@ VMByteCodesTest >> testPushArrayToRegisterBytecode [ ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantFalseBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -370,7 +372,7 @@ VMByteCodesTest >> testPushConstantFalseBytecode [ pushed: memory falseObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantMinusOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -378,7 +380,7 @@ VMByteCodesTest >> testPushConstantMinusOneBytecode [ pushed: (memory integerObjectOf: -1) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantNilBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -386,7 +388,7 @@ VMByteCodesTest >> testPushConstantNilBytecode [ pushed: memory nilObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -394,7 +396,7 @@ VMByteCodesTest >> testPushConstantOneBytecode [ pushed: (memory integerObjectOf: 1) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantReceiverBytecode [ | intReceiver | intReceiver := memory integerObjectOf: 42. @@ -407,7 +409,7 @@ VMByteCodesTest >> testPushConstantReceiverBytecode [ pushed: intReceiver ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantTrueBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -415,7 +417,7 @@ VMByteCodesTest >> testPushConstantTrueBytecode [ pushed: memory trueObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantTwoBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -423,7 +425,7 @@ VMByteCodesTest >> testPushConstantTwoBytecode [ pushed: (memory integerObjectOf: 2) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantZeroBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -431,74 +433,74 @@ VMByteCodesTest >> testPushConstantZeroBytecode [ pushed: (memory integerObjectOf: 0) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp0 [ self pushTempTest: 0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp1 [ self pushTempTest: 1 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp10 [ self pushTempTest: 10 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp11 [ self pushTempTest: 11 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp2 [ self pushTempTest: 2 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp3 [ self pushTempTest: 3 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp4 [ self pushTempTest: 4 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp5 [ self pushTempTest: 5 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp6 [ self pushTempTest: 6 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp7 [ self pushTempTest: 7 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp8 [ self pushTempTest: 8 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp9 [ self pushTempTest: 9 ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextIsContext [ self pushThisContextTopFrame. self assert: (memory isContext: interpreter stackTop). ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ self pushThisContextTopFrame. @@ -508,7 +510,7 @@ VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ equals: (interpreter frameCallerFP: interpreter framePointer) ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ self pushThisContextTopFrame. @@ -519,28 +521,28 @@ VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ equals: interpreter framePointer ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidReceiver [ self pushThisContextTopFrame. self assert: topFrame receiver equals: context receiver ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameContext: interpreter framePointer) equals: interpreter stackTop. ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetFlagContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameHasContext: interpreter framePointer). ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ | previousTop newTop | self interpretWithFrame: [ @@ -552,7 +554,7 @@ VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ self assert: newTop equals: previousTop. ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testReturnFalse [ "We need to return to a method. @@ -568,7 +570,7 @@ VMByteCodesTest >> testReturnFalse [ returned: memory falseObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testReturnTrue [ "We need to return to a method. @@ -584,7 +586,7 @@ VMByteCodesTest >> testReturnTrue [ returned: memory trueObject ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ | topFrameContext | self interpretWithFrame: [ @@ -598,7 +600,7 @@ VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ self assert: (interpreter isWidowedContext: topFrameContext) ] -{ #category : #'tests-send' } +{ #category : 'tests-send' } VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ | selectorOop aMethod aMethodToActivate receiver receiverClass aMethodDictionary arg1 arg2 | @@ -645,47 +647,47 @@ VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ self assert: interpreter stackTop equals: receiver ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary0 [ self storeAndPopTemporaryIntoTempTest: 0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary1 [ self storeAndPopTemporaryIntoTempTest: 1 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary2 [ self storeAndPopTemporaryIntoTempTest: 2 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary3 [ self storeAndPopTemporaryIntoTempTest: 3 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary4 [ self storeAndPopTemporaryIntoTempTest: 4 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary5 [ self storeAndPopTemporaryIntoTempTest: 5 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary6 [ self storeAndPopTemporaryIntoTempTest: 6 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary7 [ self storeAndPopTemporaryIntoTempTest: 7 ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ | register index array result | @@ -716,7 +718,7 @@ VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ self assert: (memory fetchFloat64: 3 ofObject: array) equals: 6.0. ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testSubVectorBytecode [ | index vector0 vector1 result | diff --git a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st index 517ef6edc4..1abed9f7a5 100644 --- a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMBytecodeMethod, - #superclass : #Object, + #name : 'VMBytecodeMethod', + #superclass : 'Object', #instVars : [ 'virtualMachine', 'methodOop' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop [ ^ self new @@ -17,13 +19,13 @@ VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> at: index [ ^ virtualMachine objectMemory fetchByte: index - 1 "0 based" ofObject: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> disassemble [ | symbolicBytecodes | symbolicBytecodes := SymbolicBytecodeBuilder decode: self. @@ -31,52 +33,52 @@ VMBytecodeMethod >> disassemble [ ' join: (symbolicBytecodes collect: [ :sbc | sbc description ]) ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> encoderClass [ ^ EncoderForSistaV1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> endPC [ ^ virtualMachine objectMemory bytesInObject: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> initialPC [ "Answer the program counter for the receiver's first bytecode." ^ (self numLiterals + 1) * virtualMachine objectMemory wordSize + 1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> literalAt: anInteger [ ^ 'literal key' -> 'literal?' ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> methodOop [ ^ methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> methodOop: anObject [ methodOop := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> numLiterals [ ^ virtualMachine objectMemory literalCountOf: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st index 05a1565127..800da59986 100644 --- a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMCodeCompactionTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMCodeCompactionTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod [ "Create the root context with a valid method" @@ -32,7 +34,7 @@ VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod ] -{ #category : #utils } +{ #category : 'utils' } VMCodeCompactionTest >> createFillingMethods: anInteger [ | firstMethod | @@ -45,7 +47,7 @@ VMCodeCompactionTest >> createFillingMethods: anInteger [ ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> fillCodeZone [ | aMethod | @@ -61,13 +63,13 @@ VMCodeCompactionTest >> fillCodeZone [ ] -{ #category : #running } +{ #category : 'running' } VMCodeCompactionTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -110,7 +112,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenUsingPrimCallMayCallBackShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -149,7 +151,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToTheBeginning [ | firstMethod compactMethod methodOop | @@ -172,7 +174,7 @@ VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToThe ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ | firstMethod cogMethod methodOop | @@ -206,7 +208,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ | firstMethod cogMethod methodOop | @@ -239,7 +241,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ | firstMethod cogMethod methodOop | @@ -272,7 +274,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ equals: (interpreter cogMethodOf: methodOop) ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ | firstMethod callerMethodOop calleeCogMethod selector callerCogMethod calleeMethodOop | @@ -322,7 +324,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ equals: (interpreter cogMethodOf: calleeMethodOop) asInteger + cogit entryOffset ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -419,7 +421,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ equals: cogit ceCPICMissTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -509,7 +511,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbo equals: cogit cePICAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -583,7 +585,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsi equals: cogit cePICAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testRelocatingAMethodDoesNotAffectTheFrameCreationPushes [ | firstMethod compactMethod methodOop readOnlyObject | diff --git a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st index 8f8e44af1f..1ba5d89ee9 100644 --- a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMCogitHelpersTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMCogitHelpersTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'checkIsSmallInteger', 'checkNotSmallInteger' @@ -9,10 +9,12 @@ Class { 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -22,7 +24,7 @@ VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -32,7 +34,7 @@ VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -42,7 +44,7 @@ VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -52,14 +54,14 @@ VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> runUntilReturnFrom: anAddress [ self prepareCall. super runUntilReturnFrom: anAddress ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> setUp [ super setUp. @@ -90,7 +92,7 @@ VMCogitHelpersTest >> setUp [ ]. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ self assertNotInSmallIntegerRange: memory maxSmallInteger + 1. @@ -101,14 +103,14 @@ VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithValidSmallIntegers [ self denyIsNotInSmallIntegerRange: 0. self denyIsNotInSmallIntegerRange: memory maxSmallInteger. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ self denyIsInSmallIntegerRange: memory maxSmallInteger + 1. @@ -119,7 +121,7 @@ VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithValidSmallIntegers [ self assertIsInSmallIntegerRange: 0. diff --git a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st index 0daae71c73..a12f0e88c7 100644 --- a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMCompiledCodeBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMCompiledCodeBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'slotSize', 'numberOfTemporaries', @@ -15,16 +15,18 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> address [ ^ method ] -{ #category : #deprecated } +{ #category : 'deprecated' } VMCompiledCodeBuilder >> build [ self @@ -34,14 +36,14 @@ VMCompiledCodeBuilder >> build [ ^ self buildMethod ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> buildMethod [ self instantiateMethod. self fillMethod. ^ method ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> buildMethodHeader [ ^ (numberOfArguments bitShift: 24) @@ -51,7 +53,7 @@ VMCompiledCodeBuilder >> buildMethodHeader [ + (isPrimitive asBit << 16) ] -{ #category : #helper } +{ #category : 'helper' } VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ | methodHeader | "1 based" @@ -61,17 +63,17 @@ VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> bytecodes [ ^ bytecodes ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> bytecodes: anObject [ bytecodes := anObject ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> classIndexToUse [ | newClass | memory nilObject = (memory splObj: 16) ifTrue: [ @@ -88,7 +90,7 @@ VMCompiledCodeBuilder >> classIndexToUse [ ^ memory classTagForClass: (memory splObj: 16) ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self newMethod. @@ -99,7 +101,7 @@ VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self fillLiteralsFromPharo: aCompiledMethod allLiterals ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ originalLiterals := pharoLiterals copy. @@ -107,14 +109,14 @@ VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillMethod [ self putHeaderInMethod. self putLiteralInMethod. self putBytecodesInMethod. ] -{ #category : #initialization } +{ #category : 'initialization' } VMCompiledCodeBuilder >> initialize [ bytecodes := #[1 2 3 4 5 6 7 8 9 0]. literals := OrderedCollection new. @@ -129,7 +131,7 @@ VMCompiledCodeBuilder >> initialize [ slotSize := nil. ] -{ #category : #inspecting } +{ #category : 'inspecting' } VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ @@ -157,7 +159,7 @@ VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ yourself ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> instantiateMethod [ slotSize := literals size + (bytecodes size / memory wordSize) ceiling @@ -170,73 +172,73 @@ VMCompiledCodeBuilder >> instantiateMethod [ method ifNotNil: [ memory fillObj: method numSlots: slotSize with: memory nilObject ]. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isPrimitive [ ^ isPrimitive ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isPrimitive: anObject [ isPrimitive := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isSmall [ ^ isSmall ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isSmall: anObject [ isSmall := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literalAt: anIndex put: anOop [ self collection: literals at: anIndex put: anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literals [ ^ literals ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literals: anObject [ literals := anObject. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> method [ ^ method ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> newMethod [ self initialize. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfArguments [ ^ numberOfArguments ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfArguments: anObject [ numberOfArguments := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfTemporaries [ ^ numberOfTemporaries ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfTemporaries: anObject [ numberOfTemporaries := anObject ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putBytecodesInMethod [ bytecodes doWithIndex:[ :aBytecode :anIndex | memory storeByte: @@ -249,7 +251,7 @@ VMCompiledCodeBuilder >> putBytecodesInMethod [ ] ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putHeaderInMethod [ memory storePointer: 0 ofObject: method @@ -257,7 +259,7 @@ VMCompiledCodeBuilder >> putHeaderInMethod [ ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putLiteralInMethod [ originalLiterals doWithIndex: [ :aLiteral :anIndex | @@ -275,7 +277,7 @@ VMCompiledCodeBuilder >> putLiteralInMethod [ memory storePointer: anIndex ofObject: method withValue: aLiteral ] ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ "In the case of CompiledBlocks we need to put the outerCode object (the last literal). @@ -284,7 +286,7 @@ VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ literals at: literals size put: aVMCompiledCodeBuilder address ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> slotSize [ "Do not set by hand !" ^ slotSize diff --git a/smalltalksrc/VMMakerTests/VMContext.class.st b/smalltalksrc/VMMakerTests/VMContext.class.st index af9973c650..4458533aba 100644 --- a/smalltalksrc/VMMakerTests/VMContext.class.st +++ b/smalltalksrc/VMMakerTests/VMContext.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMContext, - #superclass : #Object, + #name : 'VMContext', + #superclass : 'Object', #instVars : [ 'contextOop', 'interpreter' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^ self new contextOop: anInteger; @@ -19,7 +21,7 @@ VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSim yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> caller [ | senderContext | @@ -35,12 +37,12 @@ VMContext >> caller [ ^ VMContext newOnContext: senderContext withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> contextOop: anInteger [ contextOop := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> description [ | homeContextOop method selector | homeContextOop := interpreter findHomeForContext: contextOop. @@ -50,32 +52,32 @@ VMContext >> description [ ^ interpreter stringOf: selector ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> instructionPointer [ ^interpreter objectMemory fetchPointer: InstructionPointerIndex ofObject: contextOop. ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : #testing } +{ #category : 'testing' } VMContext >> isMarried [ ^interpreter isStillMarriedContext: contextOop. ] -{ #category : #testing } +{ #category : 'testing' } VMContext >> isNilObject [ ^interpreter objectMemory nilObject = contextOop. ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> receiver [ ^interpreter objectMemory fetchPointer: ReceiverIndex ofObject: contextOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> sender [ ^interpreter objectMemory fetchPointer: SenderIndex ofObject: contextOop. ] diff --git a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st index a43fdf619d..24c05b336c 100644 --- a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st +++ b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMContextAccessTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMContextAccessTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: anIndex [ | originalPC copiedPC | @@ -17,7 +19,7 @@ VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: a self assert: copiedPC equals: originalPC ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> pushActiveContext [ interpreter pushActiveContextBytecode. @@ -25,7 +27,7 @@ VMContextAccessTest >> pushActiveContext [ ^ interpreter stackTop ] -{ #category : #running } +{ #category : 'running' } VMContextAccessTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -59,7 +61,7 @@ VMContextAccessTest >> setUp [ self initializeOldSpaceForFullGC ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectPC [ | contextOop newContext | @@ -73,7 +75,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPC [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ | contextOop newContext | @@ -91,7 +93,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ | contextOop newContext | @@ -106,7 +108,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectSenderWhenItIsNil [ | contextOop newContext | diff --git a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st index a6cdd6a8b6..052c3aafb4 100644 --- a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMDivisionInstructionTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMDivisionInstructionTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotient remainer: remainer [ | expectedQuotient expectedRemainer | @@ -30,63 +32,63 @@ VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotien self assert: machineSimulator classRegisterValue equals: expectedRemainer ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 7 quotient: -1 remainer: -3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorAndDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -7 quotient: 1 remainer: -3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -7 quotient: -1 remainer: 3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 7 quotient: 1 remainer: 3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 2 quotient: 5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -2 quotient: -5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorAndDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -2 quotient: 5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 2 quotient: -5 remainer: 0. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMDivisionInstructionTest >> twoComplementOf: anInteger [ ^ self wordSize = 8 diff --git a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st index ad4a802dc9..0d7d7a6f1c 100644 --- a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st @@ -1,28 +1,29 @@ Class { - #name : #VMFFIArgumentMarshallingTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIArgumentMarshallingTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #private } +{ #category : 'private' } VMFFIArgumentMarshallingTest class >> isAbstract [ ^ self == VMFFIArgumentMarshallingTest ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self subclassResponsibility ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self subclassResponsibility ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ | newLargeInteger byteSize class | @@ -43,7 +44,7 @@ VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ ^ newLargeInteger ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorrectly [ self @@ -52,7 +53,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorr expectedValue: 17 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrectly [ self @@ -61,7 +62,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrect expectedValue: 17.0 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectly [ self @@ -70,7 +71,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectl expectedValue: 17.0 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrectly [ self @@ -79,7 +80,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrec expectedValue: 17 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -88,7 +89,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -97,7 +98,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesBadArgument [ self @@ -107,7 +108,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesBadArgument [ self @@ -117,7 +118,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue aValueToStore | @@ -134,7 +135,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -149,7 +150,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -158,7 +159,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -167,7 +168,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesBadArgument [ | valueToStore | @@ -183,7 +184,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesBadArgument [ self @@ -193,7 +194,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue | @@ -205,7 +206,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -224,7 +225,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -237,7 +238,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveVa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -246,7 +247,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -255,7 +256,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -264,7 +265,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsM expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -273,7 +274,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsM expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBadArgument [ self @@ -283,7 +284,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBadArgument [ self @@ -293,7 +294,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -310,7 +311,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshall expectedValue: storedValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -327,7 +328,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalled expectedValue: storedValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFails [ self @@ -336,7 +337,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -345,7 +346,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIs expectedValue: 8 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self @@ -354,7 +355,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -369,7 +370,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -384,7 +385,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveVa expectedValue: 16r3FFFFFFF + 2 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFails [ self @@ -393,7 +394,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -402,7 +403,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ | valueToStore | @@ -417,7 +418,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -436,7 +437,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -448,7 +449,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFails [ self @@ -457,7 +458,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -466,7 +467,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFails [ self @@ -475,7 +476,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFail failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -484,7 +485,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsM expectedValue: 8 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self diff --git a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st index be1875a921..b5bcbc2d51 100644 --- a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFICallbacksTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFICallbacksTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ interpreter push: memory nilObject. @@ -16,7 +17,7 @@ VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -51,7 +52,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProc interpreter primitiveSameThreadCallout. ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcessesInReady [ | parametersArray tfExternalFunction callbackContext processBefore | @@ -77,7 +78,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcesse self assertCollection: self readyProcesses hasSameElements: processBefore ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -104,7 +105,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess self assert: interpreter activeProcess equals: oldActiveProcess. ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadReentrantCallbackRestoresCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext numberOfCallbacks innerCallbackContext tfExternalFunction2 | diff --git a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st index 57db1b5e98..8d27531029 100644 --- a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFIHelpersTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIHelpersTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> assertPopInEmptyStackFails [ [ interpreter popSameThreadCalloutSuspendedProcess. @@ -15,7 +16,7 @@ VMFFIHelpersTest >> assertPopInEmptyStackFails [ equals: 'SameThreadCalloutSuspendedProcessStack is empty' ] ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesError [ self assert: (memory splObj: SuspendedProcessInCallout) equals: memory nilObject. @@ -23,7 +24,7 @@ VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesEr self assertPopInEmptyStackFails ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcess [ | aProcess anotherProcess | @@ -41,7 +42,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -59,7 +60,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcess [ | aProcess anotherProcess | @@ -75,7 +76,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -91,7 +92,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresThePassedProcess [ | aProcess | @@ -104,7 +105,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresT ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdatesNextLinkWithNil [ | aProcess | @@ -117,7 +118,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdates ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackFails [ | aProcess | @@ -132,7 +133,7 @@ VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptySt ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsProcessWithNilInNextLink [ | aProcess | @@ -145,7 +146,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsPushedProcess [ | aProcess | @@ -158,7 +159,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testReadAddressReadsTheValidAddressValue [ | anExternalAddress | diff --git a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st index 03182807ca..a3aefe8ff7 100644 --- a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st @@ -1,22 +1,23 @@ Class { - #name : #VMFFIReturnMarshallingTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIReturnMarshallingTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #private } +{ #category : 'private' } VMFFIReturnMarshallingTest class >> isAbstract [ ^ self = VMFFIReturnMarshallingTest ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ self subclassResponsibility ] -{ #category : #utils } +{ #category : 'utils' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedLargeIntegerValue: expectedValue [ self @@ -36,7 +37,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedSmalltalkValue: expectedValue [ self @@ -50,7 +51,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteArray [ | valueToReturn | @@ -72,7 +73,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteAr ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatInStack [ self @@ -84,7 +85,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatI ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatInStack [ self @@ -96,7 +97,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatIn ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExternalAddress [ @@ -110,7 +111,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExtern ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallInteger [ self @@ -119,7 +120,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeInteger [ | value | @@ -131,7 +132,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallInteger [ | value | @@ -145,7 +146,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeInteger [ self @@ -154,7 +155,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallInteger [ self @@ -163,7 +164,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger [ self @@ -172,7 +173,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger expectedSmalltalkValue: INT8_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallInteger [ self @@ -181,7 +182,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeInteger [ | value | @@ -193,7 +194,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallInteger [ | value | @@ -207,7 +208,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeInteger [ self @@ -216,7 +217,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallInteger [ self @@ -225,7 +226,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT8PushSmallInteger [ self diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st index d18e6ecd88..ba96a06ec5 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadArgumentMarshallingTest, - #superclass : #VMFFIArgumentMarshallingTest, - #category : #VMMakerTests + #name : 'VMFFISameThreadArgumentMarshallingTest', + #superclass : 'VMFFIArgumentMarshallingTest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #implementation } +{ #category : 'implementation' } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ | parametersArray tfExternalFunction savedValue | @@ -28,7 +29,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: savedValue equals: expectedValue. ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ | parametersArray tfExternalFunction savedValue | @@ -52,7 +53,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFISameThreadArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ | parametersArray tfExternalFunction functionCalled | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st index 33727d32a7..4a8ee9389a 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadCalloutTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFISameThreadCalloutTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - callouts' } +{ #category : 'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess | @@ -24,7 +25,7 @@ VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProce self assert: interpreter activeProcess equals: oldActiveProcess ] -{ #category : #'tests - callouts' } +{ #category : 'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutShouldKeepTheNewMethodVariable [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st index bccbc9e6b1..71a34defe3 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadReturnMarshallingTest, - #superclass : #VMFFIReturnMarshallingTest, - #category : #VMMakerTests + #name : 'VMFFISameThreadReturnMarshallingTest', + #superclass : 'VMFFIReturnMarshallingTest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ | parametersArray tfExternalFunction | @@ -26,7 +27,7 @@ VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType aBlock value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st index 884e602d1e..177e8e7463 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerArgumentMarshallingTest, - #superclass : #VMFFIArgumentMarshallingTest, + #name : 'VMFFIWorkerArgumentMarshallingTest', + #superclass : 'VMFFIArgumentMarshallingTest', #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -11,10 +11,11 @@ Class { 'task', 'savedValue' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -32,7 +33,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: savedValue equals: expectedValue ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -41,7 +42,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofType: argumentType [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. @@ -77,21 +78,21 @@ VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofTy interpreter primitiveWorkerCallout ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerArgumentMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #running } +{ #category : 'running' } VMFFIWorkerArgumentMarshallingTest >> setUp [ super setUp. interpreter libFFI testWorker clear ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st index 10fc6eeb4f..0cabd48fa0 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerCalloutTest, - #superclass : #VMAbstractFFITest, + #name : 'VMFFIWorkerCalloutTest', + #superclass : 'VMAbstractFFITest', #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -9,16 +9,17 @@ Class { 'workerOop', 'semaphoreIndex' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes [ ^ self doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: interpreter libFFI void ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: returnType [ aFunctionBlock := [ self fail: 'It should enqueue it, not execute it' ]. @@ -49,21 +50,21 @@ VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: ar interpreter primitiveWorkerCallout ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutEnqueuesOnlyOneTask [ self doWorkerCallWithArguments: {} ofTypes: {}. self assert: interpreter libFFI testWorker tasks size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIfPrimitiveFails [ | previous | @@ -86,7 +87,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIf self assert: interpreter allocatedElements size equals: previous. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocateReturnHolder [ self doWorkerCallWithArguments: {} ofTypes: {}. @@ -94,7 +95,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocate self assert: interpreter libFFI testWorker tasks first returnHolderAddress isNil ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgumentHoldersAndReturnHolderInCHeap [ | previous | @@ -116,7 +117,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgum self assert: interpreter allocatedElements size equals: previous + 7. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithReturnAllocateJustOne [ | previous | @@ -127,7 +128,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithRetu self assert: interpreter allocatedElements size equals: previous + 1. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutReturnDoesNotAllocate [ | previous | @@ -138,7 +139,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutR self assert: interpreter allocatedElements size equals: previous. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersHasNilAsParametersPointer [ self doWorkerCallWithArguments: {} ofTypes: {}. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st index 92a15a06fb..d413ef8af6 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerReturnMarshallingTest, - #superclass : #VMFFIReturnMarshallingTest, + #name : 'VMFFIWorkerReturnMarshallingTest', + #superclass : 'VMFFIReturnMarshallingTest', #instVars : [ 'tfExternalFunction', 'returnHolder', @@ -12,10 +12,11 @@ Class { 'worker', 'workerOop' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ tfExternalFunction := self @@ -54,14 +55,14 @@ VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType ret aBlock value. ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st index 52f52916aa..dc8609f7ca 100644 --- a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMForwardLiteralInMachineMethodTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMForwardLiteralInMachineMethodTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMForwardLiteralInMachineMethodTest >> initStack [ self createBaseFrame. @@ -22,13 +24,13 @@ VMForwardLiteralInMachineMethodTest >> initStack [ ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMForwardLiteralInMachineMethodTest >> methodWithGlobal [ ^ Smalltalk ] -{ #category : #tests } +{ #category : 'tests' } VMForwardLiteralInMachineMethodTest >> testForwardLiteralInMethod [ | machineCodeMethod literal methodOop array literalValue selector associationClass valueClass literalKey | diff --git a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st index a0768e8b2c..7716e906f5 100644 --- a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st @@ -42,8 +42,8 @@ Configuring of the frame. When it links them, it gives the last frame the previous caller Frame, for debug purpose. " Class { - #name : #VMFrameBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMFrameBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'method', 'context', @@ -61,10 +61,12 @@ Class { 'methodBuilder', 'isSuspended' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> adaptAddressToMemory: anInteger [ anInteger = memory nilObject ifTrue: [ ^ #nilObject ]. anInteger = memory trueObject ifTrue: [ ^ #trueObject ]. @@ -73,70 +75,70 @@ VMFrameBuilder >> adaptAddressToMemory: anInteger [ "^ memory integerObjectOf: anInteger" ] -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> adaptAddressToMemoryIfInteger: anAssociation [ anAssociation value isInteger ifTrue: [ anAssociation value: (self adaptAddressToMemory: anAssociation value) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> argumentSize [ ^ argumentSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> argumentSize: anObject [ argumentSize := anObject ] -{ #category : #configuring } +{ #category : 'configuring' } VMFrameBuilder >> beSuspended [ isSuspended := true ] -{ #category : #configuring } +{ #category : 'configuring' } VMFrameBuilder >> beSuspendedAt: anInstructionPointer [ instructionPointer := anInstructionPointer. self beSuspended ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> callerFrame [ ^ callerFrame ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> callerFrame: aFrame [ callerFrame := aFrame ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> context [ ^ context ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> context: anObject [ context := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> flags [ ^ flags ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> flags: anObject [ flags := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> framePointer [ ^ myFramePointer ] -{ #category : #initialization } +{ #category : 'initialization' } VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory andMethodBuilder: aMethodBuilder [ memory := aMemory. interpreter := anInterpreter. "allow to not care if it's for a cog or stack interpreter" @@ -153,7 +155,7 @@ VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory an argumentSize := 0. ] -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> inspectFrameIn: aBuilder [ @@ -184,12 +186,12 @@ VMFrameBuilder >> inspectFrameIn: aBuilder [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> instructionPointer [ ^ instructionPointer ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> isMarried [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -198,7 +200,7 @@ VMFrameBuilder >> isMarried [ ifFalse: [ interpreter isStillMarriedContext: contextOop ] ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> isSingle [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -209,43 +211,43 @@ VMFrameBuilder >> isSingle [ interpreter isSingleContext: contextOop ] ] -{ #category : #testing } +{ #category : 'testing' } VMFrameBuilder >> isSuspended [ ^ isSuspended ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> marryToContext [ interpreter ensureFrameIsMarried: myFramePointer SP: myStackPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> method [ ^ method ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> method: anOop [ method := anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> previousFrameArgsSize [ ^ previousFrameArgsSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> previousFrameArgsSize: anObject [ previousFrameArgsSize := anObject ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushCurrentFramesStack [ "push to the stack all objects in the frame stack" stack do: [ :oop | interpreter push: oop ]. ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushFlags [ "Flags: this stack frame is single. I.e., it has no context object. Otherwise GC fails with an assertion looking for it in the heap" @@ -256,14 +258,14 @@ VMFrameBuilder >> pushFlags [ interpreter push: flags ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushFrame [ interpreter push: receiver. temps do: [ :oop | interpreter push: oop ]. ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushYourself [ self setVariablesFromCompiledMethod. @@ -286,17 +288,17 @@ VMFrameBuilder >> pushYourself [ ^ myFramePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> receiver [ ^ receiver ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> receiver: anObject [ receiver := anObject ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setArgsFromMethod [ | argNumber | argNumber := interpreter argumentCountOf: method. @@ -307,7 +309,7 @@ VMFrameBuilder >> setArgsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of arguments from the method oop.' ]] ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ "If possible, setting IP to before the first bytecode, so it is ready for fetchNextBytecode" @@ -317,7 +319,7 @@ VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ interpreter instructionPointer: instructionPointer ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setTempsFromMethod [ | tempNumber | tempNumber := interpreter tempCountOf: method. @@ -328,7 +330,7 @@ VMFrameBuilder >> setTempsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of temporaries from the method oop.' ]] ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setVariablesFromCompiledMethod [ (memory isCompiledMethod: method) ifFalse: [ ^ self ]. @@ -337,43 +339,43 @@ VMFrameBuilder >> setVariablesFromCompiledMethod [ self setArgsFromMethod ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stack [ ^ stack ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stack: anObject [ stack := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stackPointer [ ^ myStackPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> tempAt: anIndex put: anOop [ self collection: temps at: anIndex put: anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> temps [ ^ temps ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> temps: anObject [ temps := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> vmMethodBuilder [ ^ vmMethodBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> vmMethodBuilder: anObject [ vmMethodBuilder := anObject diff --git a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st index c7610209f4..49fbba1248 100644 --- a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMImageHeaderWritingTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-ImageFormat' + #name : 'VMImageHeaderWritingTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #running } +{ #category : 'running' } VMImageHeaderWritingTest >> setUp [ super setUp. @@ -18,7 +20,7 @@ VMImageHeaderWritingTest >> setUp [ self saveImage. ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ | header permanentObject | @@ -35,7 +37,7 @@ VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ + (memory bytesInObject: permanentObject) + 16 "PermSpace has an empty object as first object.". ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ | header | @@ -45,7 +47,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ self assert: header oldBaseAddr equals: memory getMemoryMap oldSpaceStart ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ | header | @@ -55,7 +57,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ self assert: header freeOldSpaceInImage equals: memory bytesLeftInOldSpace ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ | header | @@ -65,7 +67,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ self assert: header hdrCogCodeSize equals: interpreter unknownShortOrCodeSizeInKs ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ | header | @@ -75,7 +77,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ self assert: header dataSize equals: memory imageSizeToWrite ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ | header | @@ -85,7 +87,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ self assert: header hdrEdenBytes equals: interpreter getDesiredEdenBytes ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages [ | header | @@ -95,7 +97,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages self assert: header hdrNumStackPages equals: interpreter getDesiredNumStackPages ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable [ | header | @@ -105,7 +107,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable self assert: header hdrMaxExtSemTabSize equals: (interpreter getMaxExtSemTabSizeSet ifTrue: [interpreter ioGetMaxExtSemTableSize] ifFalse: [0]) ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ | header | @@ -115,7 +117,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ self assert: header extraVMMemory equals: interpreter getExtraVMMemory ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ | header | @@ -125,7 +127,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ self assert: header firstSegSize equals: memory firstSegmentBytes ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ | header | @@ -135,7 +137,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ self assert: header headerFlags equals: interpreter getImageHeaderFlags ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ | header expectedHeaderSize | @@ -147,7 +149,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ self assert: header imageHeaderSize equals: expectedHeaderSize. ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ | header | @@ -157,7 +159,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ self assert: header imageFormat equals: interpreter imageFormatVersion ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ | header | @@ -167,7 +169,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ self assert: header imageVersion equals: interpreter getImageVersion ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ | header | @@ -177,7 +179,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ self assert: header hdrLastHash equals: memory lastHash ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop [ | header | @@ -187,7 +189,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop self assert: header initialSpecialObjectsOop equals: memory specialObjectsOop ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONHeader [ | header readHeader | @@ -201,7 +203,7 @@ VMImageHeaderWritingTest >> testWritingSTONHeader [ self assert: readHeader equals: (self stonPretty: header). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONPermSpace [ | writtenMetadata expectedPermSpaceMetadata | @@ -222,7 +224,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpace [ self assert: writtenMetadata equals: (self stonPretty: expectedPermSpaceMetadata). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ | writtenMetadata | @@ -236,7 +238,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ self assert: writtenMetadata equals: (self stonPretty: ComposedMetadataStruct new). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONSegment [ | header writtenHeader segmentMetadata | diff --git a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st index 3a913332a3..382706b68a 100644 --- a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMImageReadingTest, - #superclass : #VMAbstractImageFormatTest, + #name : 'VMImageReadingTest', + #superclass : 'VMAbstractImageFormatTest', #instVars : [ 'originalNilObjectIdentityHash', 'permanentObject', 'originalPermanentObjectIdentityHash' ], - #category : #'VMMakerTests-ImageFormat' + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #query } +{ #category : 'query' } VMImageReadingTest >> dataFrom: fileName [ ^ self imageFileName asFileReference / fileName ] -{ #category : #accessing } +{ #category : 'accessing' } VMImageReadingTest >> initializationOptions [ ^ super initializationOptions , { #CloneOnGC. false. #CloneOnScavenge. false } ] -{ #category : #utilities } +{ #category : 'utilities' } VMImageReadingTest >> loadImage [ environmentBuilder := VMSimulatedEnvironmentBuilder new. @@ -40,7 +42,7 @@ VMImageReadingTest >> loadImage [ ] -{ #category : #query } +{ #category : 'query' } VMImageReadingTest >> metadataFrom: fileName [ | writtenHeader | @@ -48,7 +50,7 @@ VMImageReadingTest >> metadataFrom: fileName [ ^ STON fromString: writtenHeader ] -{ #category : #utilities } +{ #category : 'utilities' } VMImageReadingTest >> saveImage [ memory garbageCollectForSnapshot. @@ -61,7 +63,7 @@ VMImageReadingTest >> saveImage [ ] -{ #category : #initialization } +{ #category : 'initialization' } VMImageReadingTest >> setUp [ super setUp. @@ -74,7 +76,7 @@ VMImageReadingTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ | obj magicNumber initSegmentSize initPermSpaceSize finalSegmentSize finalPermSpaceSize | @@ -115,7 +117,7 @@ VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ self assert: (self metadataFrom: 'permSpace.ston') dataSize equals: finalPermSpaceSize ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testReadingSTONHeader [ | headerStruct headerFile | @@ -133,7 +135,7 @@ VMImageReadingTest >> testReadingSTONHeader [ self assert: (self stonPretty: headerStruct) equals: headerFile contents. ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self saveImage. @@ -142,7 +144,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self assert: originalNilObjectIdentityHash equals: (memory hashBitsOf: memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ "Only valid in the new format" @@ -158,7 +160,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ | firstNewSegmentSize secondNewSegmentSize obj newObj originalObjHash | @@ -190,7 +192,7 @@ VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ self assert: originalObjHash equals: (memory hashBitsOf: newObj). ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavingPermanentSpaceObjectsInSpurFormatFails [ imageWriterClass = SpurImageWriter ifFalse: [ ^ self skip ]. diff --git a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st index 6837a56522..9ead2ebb76 100644 --- a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st +++ b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMInterpreterTests, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMInterpreterTests', + #superclass : 'VMSpurMemoryManagerTest', #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -23,7 +25,7 @@ VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : #running } +{ #category : 'running' } VMInterpreterTests >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -41,7 +43,7 @@ VMInterpreterTests >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMInterpreterTests >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" diff --git a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st index cdfda82889..c1f9413e77 100644 --- a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJITPrimitiveCallingTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJITPrimitiveCallingTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJITPrimitiveCallingTest >> initStack [ self createBaseFrame. @@ -19,7 +21,7 @@ VMJITPrimitiveCallingTest >> initStack [ ] -{ #category : #running } +{ #category : 'running' } VMJITPrimitiveCallingTest >> setUp [ super setUp. @@ -34,7 +36,7 @@ VMJITPrimitiveCallingTest >> setUp [ self createActiveProcess ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -54,7 +56,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNum ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -74,7 +76,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForT self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -94,7 +96,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidR self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidReceiverRunsFallbackCode [ | callingMethod | @@ -114,7 +116,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidRece ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntegerWillExecuteThePrimitiveAndReturnASmallInteger [ | callingMethod | @@ -134,7 +136,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntege ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntegerReceiverReturnsSmallInteger [ | callingMethod | @@ -154,7 +156,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntege ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -174,7 +176,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersE ] -{ #category : #'tests - without tracing' } +{ #category : 'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValidResult [ | callingMethod | @@ -194,7 +196,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValid self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - without tracing' } +{ #category : 'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -216,7 +218,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidN ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -236,7 +238,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePri self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -256,7 +258,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResult self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - newMethod' } +{ #category : 'tests - newMethod' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ | callingMethod | @@ -278,7 +280,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ ] -{ #category : #'tests - primitiveFunctionPointer' } +{ #category : 'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -300,7 +302,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerW ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -334,7 +336,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwa ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -357,7 +359,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutFo ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -391,7 +393,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithF ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -414,7 +416,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWitho ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -448,7 +450,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -471,7 +473,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -488,7 +490,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : #'tests - newMethod' } +{ #category : 'tests - newMethod' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ | callingMethod | @@ -510,7 +512,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ ] -{ #category : #'tests - primitiveFunctionPointer' } +{ #category : 'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -532,7 +534,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCa ] -{ #category : #'tests - error code' } +{ #category : 'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -571,7 +573,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : #'tests - error code' } +{ #category : 'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -610,7 +612,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: machineSimulator framePointerRegisterValue) equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -646,7 +648,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwarders ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -671,7 +673,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForward ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -707,7 +709,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwar ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -732,7 +734,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutFor ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -768,7 +770,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithFo ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -793,7 +795,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithou ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -810,7 +812,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : #'tests - fail fast' } +{ #category : 'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode [ | callingMethod | @@ -833,7 +835,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode ] -{ #category : #'tests - profile sampling' } +{ #category : 'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSample [ | callingMethod | @@ -859,7 +861,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSa self assert: interpreter nextProfileTick equals: 0 ] -{ #category : #'tests - profile sampling' } +{ #category : 'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoesNotTakeSample [ | callingMethod | @@ -883,7 +885,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoes self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42) ] -{ #category : #'tests - fail fast' } +{ #category : 'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithoutFunctionExecutesFallbackCode [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st index a12c1df861..38e3b8dd38 100644 --- a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMJITVMPrimitiveTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJITVMPrimitiveTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> setUp [ super setUp. @@ -14,7 +16,7 @@ VMJITVMPrimitiveTest >> setUp [ self createBaseFrame ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod [ | methodToXray target | @@ -33,7 +35,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0111) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ | methodToXray target | @@ -52,7 +54,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0001) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ | methodToXray target | @@ -70,7 +72,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ | methodToXray target | @@ -89,7 +91,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0010) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasNotCompiled [ | methodToXray target | diff --git a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st index 0c20ab755d..5e0e973c35 100644 --- a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st +++ b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMJistMethodTestObject, - #superclass : #Object, + #name : 'VMJistMethodTestObject', + #superclass : 'Object', #instVars : [ 'var1', 'var2', @@ -132,10 +132,12 @@ Class { 'var128', 'var129' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #initialization } +{ #category : 'initialization' } VMJistMethodTestObject >> initialize [ super initialize. var1 := Array new. diff --git a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st index 8e27c1cdd4..7f09895aff 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJitMethodTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJitMethodTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ | tmp1 tmp2 | @@ -19,14 +21,14 @@ VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ ^ arg3 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> comparingSmallIntegers: aBitmap [ aBitmap size = 32768 ifTrue: [ ^ 17 ]. ^ 23 ] -{ #category : #helpers } +{ #category : 'helpers' } VMJitMethodTest >> initStack [ self createBaseFrame. @@ -41,13 +43,13 @@ VMJitMethodTest >> initStack [ ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> setUp [ super setUp. @@ -55,7 +57,7 @@ VMJitMethodTest >> setUp [ self installFloat64RegisterClass ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> setUpTrampolines [ super setUpTrampolines. @@ -67,7 +69,7 @@ VMJitMethodTest >> setUpTrampolines [ cogit ceReturnToInterpreterTrampoline: (self compileTrampoline: [ cogit Stop ] named:#ceReturnToInterpreterTrampoline). ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ | callingMethod parameter aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -102,7 +104,7 @@ VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ equals: 17 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ | callingMethod cm x y z | @@ -176,7 +178,7 @@ VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ | callingMethod cm x y z firstTerm size | @@ -248,7 +250,7 @@ VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ self assert: (memory fetchFloat64: 1 ofObject: z) equals: 22.0 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ | callingMethod | @@ -257,7 +259,7 @@ VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ self deny: callingMethod address equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testOnStackReplacementForLongRunningVectorAddMethod [ | callingMethod cm x y z firstTerm size frame | diff --git a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st index 02dd237dfe..b80dc4405f 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st @@ -1,26 +1,28 @@ Class { - #name : #VMJitMethodWithImmutabilityTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJitMethodWithImmutabilityTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMJitMethodWithImmutabilityTest >> initialCodeSize [ ^ 32 * 1024 ] -{ #category : #initialization } +{ #category : 'initialization' } VMJitMethodWithImmutabilityTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : #initialization } +{ #category : 'initialization' } VMJitMethodWithImmutabilityTest >> setUpTrampolines [ super setUpTrampolines. @@ -30,7 +32,7 @@ VMJitMethodWithImmutabilityTest >> setUpTrampolines [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodWithImmutabilityTest >> testCompileMethodWithALotOfAssignmentsToInstanceVariables [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st index 810ddfe30c..97a1aa0b1e 100644 --- a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st +++ b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMJitSimdBytecode, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJitSimdBytecode', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #running } +{ #category : 'running' } VMJitSimdBytecode >> jitOptions [ ^ super jitOptions @@ -18,7 +20,7 @@ VMJitSimdBytecode >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -60,7 +62,7 @@ VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -95,7 +97,7 @@ VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -130,7 +132,7 @@ VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -161,7 +163,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -191,7 +193,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ self assert: (entry registerr) equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegisterContent [ | endInstruction primitiveAddress array | @@ -222,7 +224,7 @@ VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegister self assert: (memory fetchFloat64: 1 ofObject: array) equals: 4.0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testSubVectorStoreResultIntoVectorRegister [ | endInstruction primitiveAddress array register | diff --git a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st index 88d625ab18..beaecb6e12 100644 --- a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMJittedBoxFloatPrimitivesTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedBoxFloatPrimitivesTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> setUp [ super setUp. @@ -22,7 +24,7 @@ VMJittedBoxFloatPrimitivesTest >> setUp [ named: 'ceCheckFeatures') ] ] -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> testAsFloat [ cogit receiverTags: memory smallIntegerTag. @@ -36,7 +38,7 @@ VMJittedBoxFloatPrimitivesTest >> testAsFloat [ equals: 27.0 ] -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> testAsFloatWhenThereIsNotSpaceFailsPrimitive [ | stop | diff --git a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st index 96c2a4c216..9ecec6897e 100644 --- a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedByteArrayAccessPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedByteArrayAccessPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'receiver', 'targetReceiver' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMJittedByteArrayAccessPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: bitSize [ ({ 8. 16. 32. 64 } includes: bitSize) ifFalse: [ self fail ]. @@ -42,7 +44,7 @@ VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: b ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ | endPart | @@ -54,7 +56,7 @@ VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is the same receiver" @@ -68,7 +70,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ targetReceiver := receiver ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: bitSize [ | complementedValue | @@ -90,7 +92,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: memory storeLong64: 0 ofObject: targetReceiver withValue: complementedValue ]. ] -{ #category : #'tests - load booleans' } +{ #category : 'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ | expectedValue | @@ -111,7 +113,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ ] -{ #category : #'tests - load booleans' } +{ #category : 'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ | expectedValue | @@ -132,7 +134,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ | expectedValue | @@ -153,7 +155,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ | expectedValue | @@ -174,7 +176,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ | expectedValue | @@ -195,7 +197,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ | expectedValue | @@ -216,7 +218,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ | expectedValue | @@ -237,7 +239,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ | expectedValue | @@ -258,7 +260,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue [ | expectedValue | @@ -279,7 +281,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue [ | expectedValue | @@ -300,7 +302,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue [ | expectedValue | @@ -321,7 +323,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue [ | expectedValue | @@ -342,7 +344,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue [ | expectedValue | @@ -363,7 +365,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue [ | expectedValue | @@ -384,7 +386,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue [ | expectedValue | @@ -405,7 +407,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue [ | expectedValue | @@ -426,7 +428,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ | expectedValue | @@ -447,7 +449,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ | expectedValue | @@ -468,7 +470,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ | expectedValue | @@ -489,7 +491,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ | expectedValue | @@ -510,7 +512,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ | expectedValue | @@ -531,7 +533,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ ] -{ #category : #'tests - store booleans' } +{ #category : 'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ self genPrimitive: #StoreBoolean8. @@ -547,7 +549,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ ] -{ #category : #'tests - store booleans' } +{ #category : 'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ self genPrimitive: #StoreBoolean8. @@ -563,7 +565,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ | expectedValue | @@ -583,7 +585,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ | expectedValue | @@ -603,7 +605,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ | expectedValue | @@ -623,7 +625,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ | expectedValue | @@ -642,7 +644,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNotOverwriteAfter [ | expectedValue | @@ -661,7 +663,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNo self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloatValue [ | expectedValue | @@ -680,7 +682,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloa ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ | expectedValue | @@ -699,7 +701,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeValue [ | expectedValue | @@ -719,7 +721,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValue [ | expectedValue | @@ -739,7 +741,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -761,7 +763,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeValue [ | expectedValue | @@ -781,7 +783,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValue [ | expectedValue | @@ -801,7 +803,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValueWithoutOverwriting [ | expectedValue | @@ -821,7 +823,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeValue [ | expectedValue | @@ -841,7 +843,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveValue [ | expectedValue | @@ -861,7 +863,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValue [ | expectedValue | @@ -881,7 +883,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValu ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValue [ | expectedValue | @@ -901,7 +903,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -923,7 +925,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ | expectedValue | @@ -943,7 +945,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ | expectedValue | @@ -963,7 +965,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ | expectedValue | @@ -983,7 +985,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ | expectedValue | @@ -1004,7 +1006,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ | expectedValue | @@ -1024,7 +1026,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> trailingName [ ^ 'Bytes' diff --git a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st index 47ffe36324..70c9624404 100644 --- a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMJittedExternalAddressAccessPrimitiveTest, - #superclass : #VMJittedByteArrayAccessPrimitiveTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJittedExternalAddressAccessPrimitiveTest', + #superclass : 'VMJittedByteArrayAccessPrimitiveTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #utils } +{ #category : 'utils' } VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is a byteArray and the receiver to the primitive is an external address pointing to it" @@ -14,7 +16,7 @@ VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedExternalAddressAccessPrimitiveTest >> trailingName [ ^ 'ExternalAddress' diff --git a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st index 4c246543ac..e7ce707f38 100644 --- a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedGeneralPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedGeneralPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ | lastOop | @@ -15,7 +17,7 @@ VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ ^ lastOop ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ "32 bits images does not have SmallFloats" @@ -40,7 +42,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self compile: [ | jump | @@ -60,7 +62,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self compile: [ | jump | @@ -80,7 +82,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self assert: machineSimulator receiverRegisterValue equals: 0 ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self compile: [ | jump | @@ -96,7 +98,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self compile: [ | jump | @@ -112,7 +114,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBoxedFloat [ self compile: [ | jump | @@ -128,7 +130,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBo self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSmallInteger [ self compile: [ | jump | @@ -144,7 +146,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSm self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterBoxedFloat [ self compile: [ | jump | @@ -160,7 +162,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterSmallInteger [ self compile: [ | jump | @@ -176,7 +178,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerBoxedFloat [ self compile: [ | jump | @@ -192,7 +194,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerSmallInteger [ self compile: [ | jump | @@ -208,7 +210,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self compile: [ | jump | @@ -224,7 +226,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self compile: [ | jump | @@ -240,7 +242,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self compile: [ | jump | @@ -256,7 +258,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self compile: [ | jump | @@ -272,7 +274,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat [ self compile: [ | jump | @@ -288,7 +290,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallInteger [ self compile: [ | jump | @@ -304,7 +306,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallIntege self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self compile: [ @@ -317,7 +319,7 @@ VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17). ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self compile: [ | jump | @@ -330,7 +332,7 @@ VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self assert: machineSimulator receiverRegisterValue equals: 17. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self compile: [ | jump | @@ -343,7 +345,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self assert: machineSimulator receiverRegisterValue equals: (memory classIndexOf: memory falseObject) ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self compile: [ @@ -356,7 +358,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self assert: machineSimulator arg0RegisterValue equals: classFloat ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self compile: [ @@ -370,7 +372,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding [ self compile: [ @@ -384,7 +386,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self compile: [ @@ -398,7 +400,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 4 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding [ self compile: [ @@ -412,7 +414,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: (7 * 4 roundUpTo: self wordSize) "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ | desiredSlots | @@ -430,7 +432,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: (desiredSlots * 8 / self wordSize) ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self compile: [ @@ -444,7 +446,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self compile: [ @@ -458,7 +460,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self compile: [ | jump | @@ -473,7 +475,7 @@ VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self assert: machineSimulator doublePrecisionFloatingPointRegister0Value equals: Float fmax. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -486,7 +488,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -503,7 +505,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -520,7 +522,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -537,7 +539,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegativ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -548,7 +550,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -565,7 +567,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 94). ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -583,7 +585,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -265). ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -596,7 +598,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagI self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -609,7 +611,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsS self assert: result equals: 0. "Incomplete Primitive, if the float cannot be allocated, it executes the C code" ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -629,7 +631,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ self assert: self machineSimulator receiverRegisterValue equals: (memory floatObjectOf: 42.0) ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -652,7 +654,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmal equals: 8589934592 asFloat ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerReceiver [ | result | @@ -665,7 +667,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -678,7 +680,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -694,7 +696,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -712,7 +714,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerReceiver [ | result | @@ -725,7 +727,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerRece self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -738,7 +740,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallInteg self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -754,7 +756,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerA self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -772,7 +774,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerReceiver [ | result | @@ -785,7 +787,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerR self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -798,7 +800,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIn self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBiggerThanSmallIntegerBits [ | primitiveAddress endInstruction | @@ -816,7 +818,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBigge self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -832,7 +834,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ | primitiveAddress endInstruction | @@ -850,7 +852,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ | primitiveAddress endInstruction | @@ -872,7 +874,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ equals: (memory integerObjectOf: memory maxSmallInteger >> 1 << 1) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWithShiftRight [ | primitiveAddress endInstruction | @@ -894,7 +896,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWit equals: (memory integerObjectOf: 17) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBiggerThanNumSmallIntegerBits [ | primitiveAddress endInstruction | @@ -916,7 +918,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBi equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ | primitiveAddress endInstruction | @@ -934,7 +936,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 128) ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerReceiver [ | result | @@ -947,7 +949,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -960,7 +962,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -976,7 +978,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -994,7 +996,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ | endInstruction primitiveAddress | @@ -1012,7 +1014,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -1029,7 +1031,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1042,7 +1044,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1059,7 +1061,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1076,7 +1078,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1087,7 +1089,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1104,7 +1106,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1122,7 +1124,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1139,7 +1141,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1152,7 +1154,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIs self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -1169,7 +1171,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1186,7 +1188,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallIn self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1203,7 +1205,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1214,7 +1216,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSm self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1231,7 +1233,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1249,7 +1251,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1266,7 +1268,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1279,7 +1281,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsN self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1296,7 +1298,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInt self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1307,7 +1309,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSma self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1324,7 +1326,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1342,7 +1344,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNum self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1355,7 +1357,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfRecei self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1372,7 +1374,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1383,7 +1385,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceive self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1400,7 +1402,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1418,7 +1420,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNe self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1431,7 +1433,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1448,7 +1450,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1459,7 +1461,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1476,7 +1478,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1494,7 +1496,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveHashMultiply' } +{ #category : 'tests - primitiveHashMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHashMultiply [ | result primitiveAddress | @@ -1511,7 +1513,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHash self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50 hashMultiply). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1524,7 +1526,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1541,7 +1543,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1552,7 +1554,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1569,7 +1571,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1587,7 +1589,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1600,7 +1602,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1617,7 +1619,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1628,7 +1630,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1645,7 +1647,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1663,7 +1665,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1676,7 +1678,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1693,7 +1695,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflows [ | endInstruction primitiveAddress | @@ -1710,7 +1712,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ | endInstruction primitiveAddress | @@ -1729,7 +1731,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ | endInstruction primitiveAddress | @@ -1748,7 +1750,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -1765,7 +1767,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1776,7 +1778,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallInteger [ | endInstruction primitiveAddress | @@ -1793,7 +1795,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallIntege self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -84). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1810,7 +1812,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 84). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1828,7 +1830,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17424). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand [ | endInstruction primitiveAddress | @@ -1846,7 +1848,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop instanceVariableCount | @@ -1872,7 +1874,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ equals: memory nilObject ] ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop arraySize | @@ -1902,7 +1904,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectlyWhenNotAligned [ | endInstruction primitiveAddress class newOop arraySize | @@ -1933,7 +1935,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1946,7 +1948,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1963,7 +1965,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1974,7 +1976,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1991,7 +1993,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2009,7 +2011,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -2027,7 +2029,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -2044,7 +2046,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2057,7 +2059,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2074,7 +2076,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -2091,7 +2093,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2102,7 +2104,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2119,7 +2121,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2137,7 +2139,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -2154,7 +2156,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ @@ -2173,7 +2175,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ @@ -2192,7 +2194,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ @@ -2211,7 +2213,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ @@ -2230,7 +2232,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -1). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ @@ -2248,7 +2250,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2261,7 +2263,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2278,7 +2280,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -2295,7 +2297,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -2312,7 +2314,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2323,7 +2325,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2340,7 +2342,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -10). ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2358,7 +2360,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallIntegers [ | result | @@ -2370,7 +2372,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallI self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentDoesNotReturn [ "If the argument is not an small integer, flow jumps and return does not (yet) happen" @@ -2396,7 +2398,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentD self assert: machineSimulator arg0RegisterValue equals: self memory falseObject. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self compile: [ @@ -2418,7 +2420,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsTrue [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st index 5d37bd7ef3..c78d8ff140 100644 --- a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMJittedLookupTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMJittedLookupTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'methodOop', 'selectorOop', 'receiver', 'receiverClass' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -25,7 +27,7 @@ VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -38,7 +40,7 @@ VMJittedLookupTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -51,7 +53,7 @@ VMJittedLookupTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setUpClassAndMethod [ @@ -63,7 +65,7 @@ VMJittedLookupTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" @@ -90,7 +92,7 @@ VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ | superclass superclassMethodDictionary foundMethod | @@ -123,7 +125,7 @@ VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ self assert: foundMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> testLookUpMNUWithAnyNonMethodObjectShouldNotJItCompile [ | superclass superclassMethodDictionary foundMethod | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st index 7f9a69d72f..76898f93d9 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedPrimitiveAtPutTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveAtPutTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtPutTest >> setUp [ super setUp. @@ -21,7 +23,7 @@ VMJittedPrimitiveAtPutTest >> setUp [ bytecodes: 10. ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtPutTest >> setUpTrampolines [ super setUpTrampolines. @@ -30,7 +32,7 @@ VMJittedPrimitiveAtPutTest >> setUpTrampolines [ ] -{ #category : #tests } +{ #category : 'tests' } VMJittedPrimitiveAtPutTest >> testPrimitiveAtPut32bitIndexableWithLargeNumberShouldStoreValue [ | integerArray offset expectedValue | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st index 18d5ef041c..e36762ff81 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedPrimitiveAtTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveAtTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitiveAtTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMJittedPrimitiveAtTest >> setUp [ bytecodes: 10. ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -41,7 +43,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -57,7 +59,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -73,7 +75,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBounds self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ | integerArray offset | @@ -100,7 +102,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -116,7 +118,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -142,7 +144,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShouldFallThrough [ | integerArray offset | @@ -158,7 +160,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShou self assertFallsThrough ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -174,7 +176,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ | integerArray offset | @@ -199,7 +201,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -228,7 +230,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -244,7 +246,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32BitsShouldFallthrough [ | integerArray offset | @@ -261,7 +263,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32Bits self assertFallsThrough ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldReturnValue [ | integerArray offset | @@ -288,7 +290,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldRe equals: SmallInteger maxVal + 1 ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldReturnValue [ | integerArray offset | @@ -315,7 +317,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldRe equals: (memory integerObjectOf: 17) ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -330,7 +332,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -345,7 +347,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -360,7 +362,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -375,7 +377,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThro self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -390,7 +392,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -405,7 +407,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBounds self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ | integerArray offset | @@ -431,7 +433,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -446,7 +448,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -461,7 +463,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -487,7 +489,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldRetu equals: expectedValue ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ | offset array | @@ -500,7 +502,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ | offset array | @@ -514,7 +516,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShouldFallThrough [ | objectWithInstanceVariables | @@ -531,7 +533,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShould self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShouldFallThrough [ | objectWithNoInstanceVariables | @@ -546,7 +548,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShou self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ machineSimulator receiverRegisterValue: (memory characterObjectOf: $a codePoint). @@ -555,7 +557,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -567,7 +569,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtSmallIntegerShouldFallThrough [ machineSimulator receiverRegisterValue: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st index f1948eec9d..9771567a95 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedPrimitiveSizeTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveSizeTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitiveSizeTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveSizeTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMJittedPrimitiveSizeTest >> setUp [ bytecodes: 10. ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf16bitSlots [ | integerArray | @@ -41,7 +43,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf32bitSlots [ | integerArray | @@ -57,7 +59,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShouldReturnNumberOf32bitSlots [ | integerArray aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -83,7 +85,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShoul equals: 32768 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf64bitSlots [ | integerArray | @@ -99,7 +101,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8bitSlots [ | integerArray | @@ -115,7 +117,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8 equals: 7 ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots [ | array | @@ -129,7 +131,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 7) ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ | objectWithInstanceVariables | @@ -144,7 +146,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThrough [ self prepareStackForSendReceiver: (memory characterObjectOf: $a codePoint). @@ -152,7 +154,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThroug self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -163,7 +165,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateIntegerShouldFallThrough [ self prepareStackForSendReceiver: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st index c306428b27..99c580ac58 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st @@ -1,21 +1,23 @@ Class { - #name : #VMJittedPrimitivesTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMJittedPrimitivesTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'classFloat' ], #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #private } +{ #category : 'private' } VMJittedPrimitivesTest class >> isAbstract [ ^ self == VMJittedPrimitivesTest ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -28,7 +30,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: argumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -41,7 +43,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument ] -{ #category : #utils } +{ #category : 'utils' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: firstArgumentOop and: secondArgumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -54,13 +56,13 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument self runUntilReturn ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st index 94945ee4fb..17c2d6be67 100644 --- a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedSmallFloatPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedSmallFloatPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ "SmallFloats only exist in 64bits systems" @@ -15,7 +17,7 @@ VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -29,7 +31,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFl self assert: machineSimulator receiverRegisterValue equals: (self memory floatObjectOf: 3.0) ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -45,7 +47,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmal equals: 0.5 ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -61,7 +63,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse equals: memory falseObject ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -77,7 +79,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -93,7 +95,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -109,7 +111,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -125,7 +127,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenEqual [ cogit receiverTags: memory smallFloatTag. @@ -141,7 +143,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -157,7 +159,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -173,7 +175,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -189,7 +191,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -205,7 +207,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -221,7 +223,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -237,7 +239,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -253,7 +255,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -269,7 +271,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -285,7 +287,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASm equals: 6.0 ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -301,7 +303,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -317,7 +319,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : #'tests - primitiveSquareRoot' } +{ #category : 'tests - primitiveSquareRoot' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -332,7 +334,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASm equals: 2.0 sqrt ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSubtractTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. diff --git a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st index 63226acbf5..a1b3df39a5 100644 --- a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMLiterRulesTest, - #superclass : #TestCase, - #category : #VMMakerTests + #name : 'VMLiterRulesTest', + #superclass : 'TestCase', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ | ast | @@ -20,7 +21,7 @@ VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ ast pragmas first). ] -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ | ast | @@ -31,7 +32,7 @@ VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ ast pragmas first) ] -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangTypeDeclarationForVariable [ | ast | diff --git a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st index 7094ce4b0e..48bc2548f9 100644 --- a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMLookUpTest, - #superclass : #VMInterpreterTests, + #name : 'VMLookUpTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'methodOop', 'selectorOop', @@ -14,10 +14,12 @@ Class { 'VMBasicConstants', 'VMBytecodeConstants' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest class >> testParameters [ ^ super testParameters * (ParametrizedTestMatrix new @@ -26,7 +28,7 @@ VMLookUpTest class >> testParameters [ yourself) ] -{ #category : #assertions } +{ #category : 'assertions' } VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ | length | @@ -37,19 +39,19 @@ VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ self deny: (memory isForwarded: selector) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMLookUpTest >> linearSearchLimit [ ^ linearSearchLimit ] -{ #category : #accessing } +{ #category : 'accessing' } VMLookUpTest >> linearSearchLimit: anObject [ linearSearchLimit := anObject ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -62,7 +64,7 @@ VMLookUpTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -75,7 +77,7 @@ VMLookUpTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : #running } +{ #category : 'running' } VMLookUpTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -131,7 +133,7 @@ VMLookUpTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setUpClassAndMethod [ @@ -143,7 +145,7 @@ VMLookUpTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ "We set a smallInteger class into the classTable" @@ -153,7 +155,7 @@ VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ equals: receiverClass ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsForwardedMethod [ | aMethodDictionary | @@ -169,7 +171,7 @@ VMLookUpTest >> testLookUpFindsForwardedMethod [ self assert: interpreter newMethod equals: methodOop. ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodInClass [ | aMethodDictionary | @@ -184,7 +186,7 @@ VMLookUpTest >> testLookUpFindsMethodInClass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodInSuperclass [ | superclass superclassMethodDictionary | @@ -209,7 +211,7 @@ VMLookUpTest >> testLookUpFindsMethodInSuperclass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ | aMethodDictionary | @@ -226,7 +228,7 @@ VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ self assertNonForwardedSelectorsIn: aMethodDictionary ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ | aMethodDictionary | @@ -241,7 +243,7 @@ VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -283,7 +285,7 @@ VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -319,7 +321,7 @@ VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ | superclass superclassMethodDictionary | @@ -341,7 +343,7 @@ VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ | nonExistingSelector superclass superclassMethodDictionary dnuMethodOop dnuSelectorOop | @@ -379,7 +381,7 @@ VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ | nonExistingSelector aMethodDictionary | @@ -400,7 +402,7 @@ VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ self should: [interpreter lookupMethodInClass: receiverClass] raise: Error. ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -434,7 +436,7 @@ VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ "There is no superclass, so no cannotInterpret: to call" @@ -456,7 +458,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ self should: [ interpreter lookupMethodInClass: receiverClass ] raise: Error ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUMethod [ "Class has a nil methodDictionary, so `cannotInterpret:` is send. But superclass does not understand it, so `doesNotUnderstand:` is called instead." @@ -502,7 +504,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUM self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -542,7 +544,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ self assert: interpreter newMethod equals: cannotInterpretMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ | aMethodDictionary receiverOop frame | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." @@ -567,7 +569,7 @@ VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformExecutes [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -585,7 +587,7 @@ VMLookUpTest >> testPrimitivePerformExecutes [ self assert: interpreter stackTop equals: receiverOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformFindsMethodOop [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -606,7 +608,7 @@ VMLookUpTest >> testPrimitivePerformFindsMethodOop [ "(1) the Instruction Pointer is set to be just before the bytecode to execute, so fetchNextBytecode will fetch the first bytecode ( #justActivateNewMethod: )" ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformSetsIPBeforeFirstBytecode [ | aMethodDictionary receiverOop | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." diff --git a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st index 245cbd43ed..acd7a0e1c3 100644 --- a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st @@ -1,46 +1,47 @@ Class { - #name : #VMMASTTranslationTest, - #superclass : #TestCase, - #category : #VMMakerTests + #name : 'VMMASTTranslationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> + arg [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> emptyBlockHasSingleNilStatement [ [ ] value ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineMethodWithLoop [ self methodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineSecondLevelMethodWithLoop [ self inlineMethodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineTwiceMethodWithLoop [ self methodWithLoop. self methodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineTwiceSecondLevelMethodWithLoop [ self inlineMethodWithLoop. self inlineMethodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ @@ -50,17 +51,17 @@ VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithArgument: anArgument [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithExpressionInLoopCondition [ 1 to: self something - 10 do: [ :i | self foo: i ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNil [ self something @@ -68,7 +69,7 @@ VMMASTTranslationTest >> methodWithIfNil [ ifNotNil: [ 2 ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNil [ self something @@ -77,7 +78,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNil [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ self something @@ -85,7 +86,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNil [ self something @@ -93,7 +94,7 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNil [ ifNil: [ 2 ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ self something @@ -101,14 +102,14 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ ifNil: [ ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilWithArgument [ self something ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ @@ -117,17 +118,17 @@ VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ self inlinedMethodWithLocalWithSameName. ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithLoop [ 1 to: 10 do: [ :i | self foo: i ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithNoArguments [ ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testArgumentIsNoTemp [ | translation method | @@ -137,7 +138,7 @@ VMMASTTranslationTest >> testArgumentIsNoTemp [ self deny: (translation locals includes: method methodNode arguments first name) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -174,7 +175,7 @@ VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -211,7 +212,7 @@ VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -243,7 +244,7 @@ VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ | translation method codeGenerator block | @@ -259,7 +260,7 @@ VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ self assert: block statements first value equals: nil ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ | translation | @@ -268,7 +269,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ self assert: translation statements first selector equals: #ifTrue:ifFalse: ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ | translation | @@ -288,7 +289,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ | translation | @@ -308,7 +309,7 @@ VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -323,7 +324,7 @@ VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ self assert: (translation locals includesAll: inlinedMethod locals) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -339,7 +340,7 @@ VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVar self assert: translation locals asSet size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -354,7 +355,7 @@ VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVari self assert: translation locals asSet size equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -370,7 +371,7 @@ VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopInd self assert: translation locals asSet size equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ | method codeGenerator methodTranslation inlinedMethod inlinedMethodTranslation | @@ -390,7 +391,7 @@ VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ self assert: (methodTranslation declarations at: #cond2) equals: 'pthread_cond_t cond2' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testKeywordMethodHasArgument [ | translation method | @@ -400,7 +401,7 @@ VMMASTTranslationTest >> testKeywordMethodHasArgument [ self assert: (translation args includes: method methodNode arguments first name) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ | translation method loop | @@ -411,7 +412,7 @@ VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ self assert: loop arguments size equals: 4 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable [ | translation method loop | @@ -422,7 +423,7 @@ VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable self assert: loop arguments size equals: 6 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ | translation method block | @@ -433,7 +434,7 @@ VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ self deny: (translation locals includes: block arguments first) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid [ | translation codeGenerator | @@ -450,7 +451,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid self assert: translation returnType equals: #void ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ | translation codeGenerator | @@ -467,7 +468,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ self assert: translation returnType equals: #void ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ | translation | @@ -476,7 +477,7 @@ VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ self assert: translation selector equals: #+. ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ | translation method | @@ -486,7 +487,7 @@ VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ self assert: translation selector equals: method selector. ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateUnaryMethodHasSameName [ | translation method | diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st index bc7e61b968..74591986af 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMMachineCodeFrameBuilderForTest, - #superclass : #Object, + #name : 'VMMachineCodeFrameBuilderForTest', + #superclass : 'Object', #instVars : [ 'test', 'returnAddress', @@ -10,20 +10,21 @@ Class { 'spouseContext', 'method' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> arguments: anObject [ arguments := anObject ] -{ #category : #building } +{ #category : 'building' } VMMachineCodeFrameBuilderForTest >> buildFrame [ | methodAddress | @@ -54,13 +55,13 @@ VMMachineCodeFrameBuilderForTest >> buildFrame [ test cogit needsFrame: true. ] -{ #category : #testing } +{ #category : 'testing' } VMMachineCodeFrameBuilderForTest >> hasSpouseContext [ ^ spouseContext notNil ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ self test: aTest. @@ -70,63 +71,63 @@ VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ temporaries := #(). ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> method [ ^ method ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> method: anObject [ method := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> receiver [ ^ receiver ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> receiver: anObject [ receiver := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> returnAddress [ ^ returnAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> returnAddress: anObject [ returnAddress := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> spouseContext [ ^ spouseContext ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> spouseContext: aContextOop [ spouseContext := aContextOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> temporaries [ ^ temporaries ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> temporaries: anObject [ temporaries := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> test [ ^ test ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> test: anObject [ test := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st index a4ead00b02..b46584b7c3 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMMachineCodeMethod, - #superclass : #Object, + #name : 'VMMachineCodeMethod', + #superclass : 'Object', #instVars : [ 'virtualMachine', 'cogMethodSurrogate' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogate: aCogMethodSurrogate [ ^ self new @@ -20,17 +22,17 @@ VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogat yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> cogMethodSurrogate [ ^ cogMethodSurrogate ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> cogMethodSurrogate: anObject [ cogMethodSurrogate := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> disassemble [ | methodEntry instructions | methodEntry := cogMethodSurrogate asInteger + virtualMachine cogit entryOffset. @@ -42,12 +44,12 @@ VMMachineCodeMethod >> disassemble [ ' join: (instructions collect: [:i | i assemblyCodeString]) ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st index bedd8c02a5..b0cf51c095 100644 --- a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMMachineSimulatorTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMMachineSimulatorTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogAbstractRegisters' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - instruction exception' } +{ #category : 'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ | label lastInstruction subInstruction breakInstruction | @@ -36,7 +38,7 @@ VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ ] -{ #category : #'tests - instruction exception' } +{ #category : 'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ | label lastInstruction subInstruction breakInstruction | @@ -65,7 +67,7 @@ VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -93,7 +95,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ | label lastInstruction invalidAddressHandled addInstruction jumpInstruction expectedAddress | @@ -137,7 +139,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ equals: expectedAddress ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ | label lastInstruction invalidAddressHandled | @@ -181,7 +183,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ ^ self ] ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespected [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -217,7 +219,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self temporaryRegisterValue equals: 1 ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespectedCorrectInstructionPointer [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -253,7 +255,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self machineSimulator instructionPointerRegisterValue equals: jumpInstruction address ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -280,7 +282,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -306,7 +308,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -333,7 +335,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -359,7 +361,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled exptectedAddress | @@ -395,7 +397,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAd self assert: invalidAddressHandled ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ | label lastInstruction subInstruction | @@ -421,7 +423,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstructionPointer [ | label lastInstruction subInstruction jumpInstruction | @@ -446,7 +448,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstru ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ | label lastInstruction | @@ -468,7 +470,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ self fail. ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPointer [ | label lastInstruction | @@ -492,7 +494,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPoi self fail. ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionUntilAddressIsRespected [ | label lastInstruction | diff --git a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st index be3b8ddce2..15c0afc846 100644 --- a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st +++ b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMMockCodeGenerator, - #superclass : #Object, + #name : 'VMMockCodeGenerator', + #superclass : 'Object', #instVars : [ 'interpreter', 'addedPrimitives' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ ^ self new @@ -16,13 +18,13 @@ VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ yourself ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> accessorDepthCalculator [ ^ self ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> accessorDepthForSelector: aString [ ^ addedPrimitives at: aString @@ -30,31 +32,31 @@ VMMockCodeGenerator >> accessorDepthForSelector: aString [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector [ self addPrimitive: aSelector accessorDepth: -1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector accessorDepth: aDepth [ addedPrimitives at: aSelector put: aDepth ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> exportedPrimitiveNames [ ^ (addedPrimitives keys collect: [ :e | e -> e ]) asDictionary ] -{ #category : #initialization } +{ #category : 'initialization' } VMMockCodeGenerator >> initialize [ addedPrimitives := Dictionary new ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> initializeWithPrimitiveTable [ interpreter primitiveTable @@ -62,7 +64,7 @@ VMMockCodeGenerator >> initializeWithPrimitiveTable [ thenDo: [ :aSelector | self addPrimitive: aSelector ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> interpreter: aCogVMSimulatorLSB [ interpreter := aCogVMSimulatorLSB. diff --git a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st index 42382cc3ae..acfab19b5c 100644 --- a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMObjectAccessorIdentificationTest, - #superclass : #TestCase, - #category : #'VMMakerTests-Simulation' + #name : 'VMObjectAccessorIdentificationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests-Simulation', + #package : 'VMMakerTests', + #tag : 'Simulation' } -{ #category : #tests } +{ #category : 'tests' } VMObjectAccessorIdentificationTest >> testObjectAccessorMessagesAreCorrectlyDetected [ | knownSelectors nonAccessorSelectors | diff --git a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st index 5419d39e53..54dd7eedd7 100644 --- a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st @@ -1,17 +1,19 @@ Class { - #name : #VMObjectLayoutTests, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-ObjectLayoutTests' + #name : 'VMObjectLayoutTests', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-ObjectLayoutTests', + #package : 'VMMakerTests', + #tag : 'ObjectLayoutTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMObjectLayoutTests >> formatFromInstSpec: instSpecInt instSize: instSizeInt [ "A class format is composed by" "<5 bits inst spec><16 bits inst size>" ^ instSpecInt << 16 + instSizeInt ] -{ #category : #helpers } +{ #category : 'helpers' } VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSize: aSizeInt [ | class | class := self @@ -21,7 +23,7 @@ VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSi ^class ] -{ #category : #helper } +{ #category : 'helper' } VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ | objSize | "always have at least one slot for forwarders" @@ -37,7 +39,7 @@ VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testCharacterIsImmediate [ | char | char := memory characterObjectOf: $a asInteger. @@ -45,7 +47,7 @@ VMObjectLayoutTests >> testCharacterIsImmediate [ self assert: (memory fetchClassTagOf: char) equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ | class objOop | 0 to: 254 do: [ :slots | @@ -61,19 +63,19 @@ VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ equals: objSize ] ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesInRange [ self assert: (memory isIntegerValue: memory minSmallInteger) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesNotInRange [ "An integer smaller than the smallest integer is not in a valid range" self deny: (memory isIntegerValue: memory minSmallInteger - 1) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectAlignment [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -84,7 +86,7 @@ VMObjectLayoutTests >> testObjectAlignment [ self assert: objOop2 \\ 8 equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ | class objOop header | 0 to: 254 do: [ :slots | @@ -95,7 +97,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ | class objOop header classIndex | 0 to: 10 do: [ :slots | @@ -108,7 +110,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ | class objOop header classInstSpec | "instSpec: @@ -123,7 +125,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout16Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 12-15 = 16-bit indexable @@ -145,7 +147,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout32Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 10-11 = 32-bit indexable @@ -165,7 +167,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout8Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 16-23 = 8-bit indexable @@ -192,7 +194,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayout [ | class objOop header classInstSpec instSpec | instSpec := 2. "instSpec for indexable objects with no inst vars (Array et al)" @@ -206,7 +208,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayo ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectMinimumSize [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -216,7 +218,7 @@ VMObjectLayoutTests >> testObjectMinimumSize [ self assert: objOop2 - objOop1 equals: 16 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ | class slots obj1oop obj2oop | "objects always are allocated with at least one slots for forwarding" @@ -227,7 +229,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ self assert: obj2oop - obj1oop equals: self objectHeaderSize + memory allocationUnit ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForwarding [ | class slots oop | slots := 0. @@ -236,7 +238,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForw self assert: (memory bytesInObject: oop) equals: self objectHeaderSize + memory allocationUnit. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ | class objOop slots | slots := 255. @@ -251,7 +253,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ | class objOop bigOopHeader mask numSlots | mask := 16rFFFFFFFFFFFFFF. @@ -265,7 +267,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ self assert: numSlots equals: slots ] ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ "Test of the border case when int = 2r000111111... . The highest possible value using usqInt encoding is (2**61) -1 since (2**61) can be confused with a pointer (on a 64 bits machine) Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guarantees the portability @@ -274,25 +276,25 @@ VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ self deny: (memory isIntegerValue: memory maxCInteger >> memory numSmallIntegerTagBits) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase2 [ "Test of the border case when int = 2r111000000 ... . Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guaranties the portability of the test on 32 and 64 bit computer. " self deny: (memory isIntegerValue: (memory maxCInteger >> memory numSmallIntegerTagBits) bitInvert) "<=> isIntegerValue: (0001111) bitInvert" ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesInRange [ self assert: (memory isIntegerValue: memory maxSmallInteger) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesNotInRange [ self deny: (memory isIntegerValue: memory maxSmallInteger + 1) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testSmallIntegerIsImmediate [ | int | int := memory integerObjectOf: 42. @@ -300,7 +302,7 @@ VMObjectLayoutTests >> testSmallIntegerIsImmediate [ self assert: (memory fetchClassTagOf: int) equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testVariableObjectWithInstVarsHasTheRightSize [ | class objOop fixedFieldsSize indexableSize | indexableSize := 12. diff --git a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st index b3400f900f..c780fcb9c2 100644 --- a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMObjectStackTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMObjectStackTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ @@ -12,7 +14,7 @@ VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ self assert: memory mournQueue equals: (memory objStackAt: 4098"MournQueueRootIndex") ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testNewMournQueueIsEmpty [ | objStack | @@ -22,7 +24,7 @@ VMObjectStackTest >> testNewMournQueueIsEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testNewObjectStackIsEmpty [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -33,7 +35,7 @@ VMObjectStackTest >> testNewObjectStackIsEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ | objStack | @@ -46,7 +48,7 @@ VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ ]. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -60,7 +62,7 @@ VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ ]. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopMournQueueReducesSize [ | objStack | @@ -70,7 +72,7 @@ VMObjectStackTest >> testPopMournQueueReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ | objStack | @@ -79,7 +81,7 @@ VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -89,7 +91,7 @@ VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectStackReducesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -100,14 +102,14 @@ VMObjectStackTest >> testPopObjectStackReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjects: n [ "Create an object stack at the position of the mark stack in the class table (4096)" self testPushObjects: n inStackAtIndex: 4096 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ memory ensureRoomOnObjStackAt: objectStackIndex. @@ -119,19 +121,19 @@ VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ self assert: (memory sizeOfObjStack: (memory objStackAt: objectStackIndex)) equals: n ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjectsAboveObjectStackLimit [ self testPushObjects: memory objectStackPageLimit + 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjectsToObjectStackLimit [ self testPushObjects: memory objectStackPageLimit ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushToMournQueueIncreasesSize [ | objStack | @@ -140,7 +142,7 @@ VMObjectStackTest >> testPushToMournQueueIncreasesSize [ self assert: (memory sizeOfObjStack: objStack) equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushToObjectStackIncreasesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st index 71dbc2dd40..996a095879 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPermanentSpaceImageReadingTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-PermSpace' + #name : 'VMPermanentSpaceImageReadingTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #utilities } +{ #category : 'utilities' } VMPermanentSpaceImageReadingTest >> loadImage [ | memoryClass isa | @@ -38,7 +40,7 @@ VMPermanentSpaceImageReadingTest >> loadImage [ ] -{ #category : #initialization } +{ #category : 'initialization' } VMPermanentSpaceImageReadingTest >> setUp [ super setUp. @@ -50,7 +52,7 @@ VMPermanentSpaceImageReadingTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpaceImageReadingTest >> testLoadingImageHasEmptyPermSpaceWhenImageDoesNotHave [ self saveImage. diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st index 49cf813a85..288eaf2d29 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPermanentSpaceMemoryTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-PermSpace' + #name : 'VMPermanentSpaceMemoryTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #running } +{ #category : 'running' } VMPermanentSpaceMemoryTest >> setUp [ super setUp. @@ -12,7 +14,7 @@ VMPermanentSpaceMemoryTest >> setUp [ self createWeakArrayClass ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ | permanentObject allInstances | @@ -25,7 +27,7 @@ VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ self assert: (memory fetchPointer: 0 ofObject: allInstances) equals: permanentObject. ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ | permanentObject oldObject youngReplacement arrFrom arrTo ec | @@ -52,7 +54,7 @@ VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ self deny: ec equals: PrimNoErr ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenModified [ | oldObject1 permanentObject1 | @@ -73,7 +75,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenMoving [ | oldObject1 permanentObject1 | @@ -94,7 +96,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ | permanentObject newObject | @@ -112,7 +114,7 @@ VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ | permanentObject oldObject | @@ -130,7 +132,7 @@ VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ | oldObject youngObject permanentObject | @@ -159,7 +161,7 @@ VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememberedSet [ | permanentObject youngObject rootObject| @@ -175,7 +177,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememb self assert: (memory getFromPermToNewSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRememberedSet [ | permanentObject oldObject rootObject| @@ -192,7 +194,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRemembe self assert: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded [ | permanentObject oldObject rootObject| @@ -215,7 +217,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ | permanentObject oldObject | @@ -230,7 +232,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesArray [ | permanentObject youngObject rootObject anArray| @@ -254,7 +256,7 @@ VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesAr self assert: (memory getMemoryMap isPermanentObject: youngObject). ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ | permanentObject | @@ -264,7 +266,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ self assert: permanentObject equals: memory getMemoryMap permSpaceStart + 16 "There is a zero-slot objects always in the perm space" ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ | permanentObject | @@ -274,7 +276,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ self deny: (memory getMemoryMap isYoungObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ | permanentObject | @@ -284,7 +286,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ self deny: (memory getMemoryMap isOldObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ | permanentObject | @@ -294,7 +296,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ self assert: (memory getMemoryMap isPermanentObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ | permanentObject nextObject | @@ -306,7 +308,7 @@ VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ | oldObject1 permanentObject1 oldObject2 youngObject | @@ -343,7 +345,7 @@ VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRememberedSetAndThenRemoved [ | oldObject1 oldObject2 permObject2 | @@ -367,7 +369,7 @@ VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRemembered self assert: memory getFromPermToNewSpaceRememberedSet rememberedSetSize equals: 0. ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ @@ -385,7 +387,7 @@ VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 array | @@ -406,7 +408,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInReme ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTheRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array youngObject | @@ -438,7 +440,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTh ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array | @@ -461,7 +463,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFro self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -481,7 +483,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -499,7 +501,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememb ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForwarderInOldSpace [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -514,7 +516,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForw self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: oldObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarderInScanvenge [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -531,7 +533,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarde self deny: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderInGC [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -548,7 +550,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderIn self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompactingForSaving [ | oldObject1 permanentObject1 oldObject2 oldObject2Hash | @@ -572,7 +574,7 @@ VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompa self assert: (memory hashBitsOf: (memory fetchPointer: 0 ofObject: permanentObject1)) equals: oldObject2Hash ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ | permanentObject oldObject oldClass oldClassHash found | @@ -598,7 +600,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ self assert: found ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered [ @@ -611,7 +613,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemembered [ @@ -624,7 +626,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ @@ -636,7 +638,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ @@ -649,7 +651,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedWhenPointingToMachineCodeMethod [ @@ -671,7 +673,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedW ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRememberedSet [ @@ -693,7 +695,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRemem ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -719,7 +721,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | @@ -748,7 +750,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNille ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -771,7 +773,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFire ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st index 7393d6f584..5ba4cc63d3 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #VMPermanentSpacePrimitiveTest, - #superclass : #VMAbstractPrimitiveTest, + #name : 'VMPermanentSpacePrimitiveTest', + #superclass : 'VMAbstractPrimitiveTest', #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : #'VMMakerTests-PermSpace' + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #configuring } +{ #category : 'configuring' } VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ super configureEnvironmentBuilder. @@ -17,7 +19,7 @@ VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ environmentBuilder permSpaceSize: 10*1024*1024. ] -{ #category : #initialization } +{ #category : 'initialization' } VMPermanentSpacePrimitiveTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMPermanentSpacePrimitiveTest >> setUp [ self createWeakArrayClass. ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ interpreter push: (memory integerObjectOf: 42). @@ -35,7 +37,7 @@ VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ interpreter push: (self newZeroSizedObject). @@ -45,7 +47,7 @@ VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ interpreter push: (self newOldSpaceObjectWithSlots: 0). @@ -55,7 +57,7 @@ VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ | oldObj permObject | @@ -69,7 +71,7 @@ VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ | oldObject | @@ -84,7 +86,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ | oldObject | @@ -99,7 +101,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ | newObject | @@ -114,7 +116,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ | oldObject | @@ -129,7 +131,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksWithByteArray [ | oldObject | diff --git a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st index 2b4eea4684..f23f44e730 100644 --- a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMPinnedObjectTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMPinnedObjectTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> lastAliveObject [ ^ self keptObjectInVMVariable2 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> lastPinnedObject [ ^ self keptObjectInVMVariable1 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newAliveObject [ | newAliveObject | newAliveObject := self newOldSpaceObjectWithSlots: 1. @@ -23,12 +25,12 @@ VMPinnedObjectTest >> newAliveObject [ ^ newAliveObject ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newDeadObject [ ^ self newOldSpaceObjectWithSlots: 1 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newKeptPinnedObject [ | newPinned | newPinned := self newOldSpaceObjectWithSlots: 1. @@ -38,7 +40,7 @@ VMPinnedObjectTest >> newKeptPinnedObject [ ^ newPinned ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed aliveHash | "D = Dead @@ -68,7 +70,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOld self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPinnedObject [ | aliveObject destination | "D = Dead @@ -96,7 +98,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPi self assert: self lastAliveObject equals: destination. ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -126,7 +128,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStar self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBeforeFirstPinned [ | aliveObject destination | "D = Dead @@ -154,7 +156,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBefore self assert: self lastAliveObject equals: destination. ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -184,7 +186,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfO self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDead [ | destination aliveObject aliveObjectHash | "D = Dead @@ -210,7 +212,7 @@ VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDea self assert: (memory isFreeObject: (memory objectAfter: self lastPinnedObject)). ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ "if we follow the forwarder, the object is in the old space" | obj | @@ -221,7 +223,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ self assert: (memory isInOldSpace: (memory followForwarded: obj)) ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForwarderBehind [ | obj | obj := self newObjectWithSlots: 0. @@ -231,7 +233,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForward self assert: (memory isForwarded: obj) ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinnedObjectShouldNotBeMovedByGC [ | pinned | self newOldSpaceObjectWithSlots: 0. "deadObject, that differenciate the start of the old space to the pin" diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st index 1c7a580223..87474aad24 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #VMPrimitiveCallAbstractTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMPrimitiveCallAbstractTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'baseMethodIP', 'baseFrame', 'baseMethod' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver arguments: arguments returnAddress: returnAddress [ machineSimulator receiverRegisterValue: receiver. @@ -32,19 +34,19 @@ VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver a ] -{ #category : #helpers } +{ #category : 'helpers' } VMPrimitiveCallAbstractTest >> findMethod: aSelector [ ^ self class lookupSelector: aSelector ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> jitOptions [ ^ super jitOptions @@ -52,13 +54,13 @@ VMPrimitiveCallAbstractTest >> jitOptions [ yourself ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodReturningNil [ ^ nil ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ "This method is used to test sends. @@ -66,7 +68,7 @@ VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ ^ self methodWithSend: $7 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ "This method is used to test sends. @@ -74,7 +76,7 @@ VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ ^ self methodWithSend: Object ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ "This method is used to test sends. @@ -82,7 +84,7 @@ VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ ^ self methodWithSend: nil ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ "This method is used to test the invocation of a primitive. @@ -92,7 +94,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ ^ 84 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ "This method is used to test the invocation of a primitive. @@ -102,7 +104,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ ^ 84 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ @@ -110,7 +112,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ "This method is used to test the invocation of a primitive. @@ -120,7 +122,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ "This method is used to test the invocation of a primitive. @@ -130,13 +132,13 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodToCompile1 [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend [ "This method is used to test sends. @@ -144,7 +146,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend [ ^ self send ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend: arg [ "This method is used to test sends. @@ -152,7 +154,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend: arg [ ^ arg send ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveCallAbstractTest >> setUp [ | primitiveAccessorDepthTable | @@ -177,7 +179,7 @@ VMPrimitiveCallAbstractTest >> setUp [ ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveCallAbstractTest >> setUpTrampolines [ super setUpTrampolines. diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st index 384475fb9b..084419c9cc 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPrimitiveCallingTest, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-InterpreterTests' + #name : 'VMPrimitiveCallingTest', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -26,7 +28,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLongStore [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -48,7 +50,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLong self assert: interpreter fetchByte equals: 16rF4 ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -70,7 +72,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: interpreter framePointer) equals: (memory integerObjectOf: -1) ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTempWithInternalActivation [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st index 6ecb274692..a0493b49f3 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMPrimitiveTest, - #superclass : #VMInterpreterTests, + #name : 'VMPrimitiveTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'imageName' ], @@ -9,10 +9,12 @@ Class { 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #asserting } +{ #category : 'asserting' } VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ | numSlotOop numSlotOopToCompare | @@ -26,7 +28,7 @@ VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMPrimitiveTest >> fillNewSpace [ "Allocate enough space to generate a full new space" @@ -38,7 +40,7 @@ VMPrimitiveTest >> fillNewSpace [ classIndex: memory arrayClassIndexPun) isNotNil ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -49,7 +51,7 @@ VMPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -76,7 +78,7 @@ VMPrimitiveTest >> setUp [ imageName := VMPrimitiveTest name ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> setUpForwardedObjects [ | class1 class2 object1 object2 array1 array2 | @@ -100,14 +102,14 @@ VMPrimitiveTest >> setUpForwardedObjects [ ^ object1. ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveTest >> tearDown [ imageName ifNotNil: [ imageName asFileReference ensureDeleteAll ]. super tearDown ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -120,7 +122,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -133,7 +135,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ | string | @@ -149,7 +151,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ interpreter push: (memory integerObjectOf: 1). @@ -164,7 +166,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -181,7 +183,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflow [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -194,7 +196,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflow [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ | maxSmallInt | @@ -212,7 +214,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -233,7 +235,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferen self assert: (memory isForwarded: object2) equals: true ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -254,7 +256,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ self assert: (memory fetchClassOf: object2) equals: class1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -275,7 +277,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSi self assert: (memory fetchClassOf: (memory followForwarded: object2)) equals: class1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -297,7 +299,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ self assert: (memory fetchInteger: 0 ofObject: object2) equals: 42. ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -323,7 +325,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferen self assert: (memory fetchInteger: 0 ofObject: (memory followForwarded: object2)) equals: 42 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -346,7 +348,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ self assert: (memory rawHashBitsOf: object2) equals: hash1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDifferentSize [ | class1 class2 object1 object2 hash1 hash2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -370,7 +372,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDiff self assert: (memory rawHashBitsOf: (memory followForwarded: object2)) equals: hash1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ | class immediate array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -389,7 +391,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -410,7 +412,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ self assert: interpreter primFailCode equals: PrimErrNoModification ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -430,7 +432,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ self assert: interpreter primFailCode equals: PrimErrObjectIsPinned ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNotCopyHash [ | class object1 object2 hash2BeforeBecome array1 array2 object2FromForwarder | class := self @@ -453,7 +455,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNot self assert: (memory hashBitsOf: object2) equals: hash2BeforeBecome ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -476,7 +478,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHa self deny: (memory hashBitsOf: object2) equals: hash2 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOriginalObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -496,7 +498,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOrigi self assert: (memory followForwarded: object1) equals: object2 ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacter [ interpreter push: (memory integerObjectOf: 65). @@ -506,7 +508,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacter [ self assert: interpreter stackTop equals: (memory characterObjectOf: 65). ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ | invalidNumber | @@ -525,7 +527,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ interpreter push: memory trueObject. @@ -536,7 +538,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -560,7 +562,7 @@ VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: interpreter stackTop. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -571,7 +573,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -586,7 +588,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -600,7 +602,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ | class objectInstance biggerClass objectForwarded array1 array2 | "Forwarding an object happens when becoming it with a bigger object" @@ -630,7 +632,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -642,7 +644,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ | class objectInstance | "I don't know how to force a bad argument count." @@ -665,7 +667,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -681,7 +683,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -696,7 +698,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ | class object slotIndex objectToPutInSlot | @@ -719,7 +721,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ self assert: interpreter primFailCode equals: 2. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -743,7 +745,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ self assert: interpreter primFailCode equals: PrimErrNoModification. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -759,7 +761,7 @@ VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -782,7 +784,7 @@ VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger >> memory numSmallIntegerTagBits)). @@ -793,7 +795,7 @@ VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -804,7 +806,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -815,7 +817,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ | string | @@ -832,7 +834,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ | string | @@ -846,7 +848,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -857,7 +859,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ "This insures the fact that no data is lost during the processing of usqInt by the primitive" @@ -873,7 +875,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ "111... 010110 -> -42 000... 010110 -> 21""" @@ -886,7 +888,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: 21). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -897,7 +899,7 @@ VMPrimitiveTest >> testPrimitiveBitOr1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -912,7 +914,7 @@ VMPrimitiveTest >> testPrimitiveBitOr2 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr3 [ interpreter push: (memory integerObjectOf: 16r0). @@ -927,7 +929,7 @@ VMPrimitiveTest >> testPrimitiveBitOr3 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr4 [ "This is to insure that primitiveBitOr executes a logical Or and not an XOr" @@ -943,7 +945,7 @@ VMPrimitiveTest >> testPrimitiveBitOr4 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ interpreter push: memory trueObject. @@ -957,7 +959,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -968,7 +970,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -979,7 +981,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ "This insure the fact that no data is lost during the processing of usqInt by the primitive" @@ -995,7 +997,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ interpreter push: (memory integerObjectOf: -73). @@ -1006,7 +1008,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> memory numSmallIntegerTagBits) - 1)). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShift1 [ interpreter push: (memory integerObjectOf: 2). @@ -1017,7 +1019,7 @@ VMPrimitiveTest >> testPrimitiveBitShift1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1030,7 +1032,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -1043,7 +1045,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ interpreter push: memory trueObject. @@ -1056,7 +1058,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftLeft [ interpreter push: (memory integerObjectOf: 16). @@ -1067,7 +1069,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftLeft [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftRight [ interpreter push: (memory integerObjectOf: 16). @@ -1078,7 +1080,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftRight [ self assert: interpreter stackTop equals: (memory integerObjectOf: 8). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ memory wordSize = 8 ifFalse: [ ^ self ]. "The 32 bits version of the primitive doesn't handle the negativ number case" @@ -1090,7 +1092,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ equals: (memory integerObjectOf: 16r1C00000000000000) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ "Insures no data is lost when bitshift overflows the integer type." @@ -1102,7 +1104,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ self assert: (interpreter stackTop) > (memory maxSmallInteger). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1113,7 +1115,7 @@ VMPrimitiveTest >> testPrimitiveBitXor1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor2 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1124,7 +1126,7 @@ VMPrimitiveTest >> testPrimitiveBitXor2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor3 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1135,7 +1137,7 @@ VMPrimitiveTest >> testPrimitiveBitXor3 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor4 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1146,7 +1148,7 @@ VMPrimitiveTest >> testPrimitiveBitXor4 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ interpreter push: memory trueObject. @@ -1160,7 +1162,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1171,7 +1173,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1182,7 +1184,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ "This guarantees the fact that no data is lost during the processing of usqInt by the primitive" "111... 111 @@ -1202,7 +1204,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> (memory numSmallIntegerTagBits + 1)))). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ interpreter push: (memory integerObjectOf: -42). @@ -1213,7 +1215,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 40). ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqualsZero [ interpreter push: self setUpForwardedObjects. @@ -1227,7 +1229,7 @@ VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqu ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZero [ interpreter push: self setUpForwardedObjects. @@ -1242,7 +1244,7 @@ VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZ ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ interpreter push: memory trueObject. @@ -1254,7 +1256,7 @@ VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDiv [ interpreter push: (memory integerObjectOf: 15). @@ -1267,7 +1269,7 @@ VMPrimitiveTest >> testPrimitiveDiv [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ interpreter push: (memory trueObject). @@ -1280,7 +1282,7 @@ VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1291,7 +1293,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1302,7 +1304,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ "In the primitive implementation of quo, it doesnt push the rest of the operation on the stack" @@ -1314,7 +1316,7 @@ VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1325,7 +1327,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1336,7 +1338,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 4). @@ -1347,7 +1349,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -1358,7 +1360,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1373,7 +1375,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivide [ interpreter push: (memory integerObjectOf: 4). @@ -1384,7 +1386,7 @@ VMPrimitiveTest >> testPrimitiveDivide [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 2). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ interpreter push: (memory trueObject). @@ -1396,7 +1398,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ "The interpreter fails because 42%4 != 0" @@ -1410,7 +1412,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1421,7 +1423,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1432,7 +1434,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1443,7 +1445,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1454,7 +1456,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 6). @@ -1465,7 +1467,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -42). @@ -1476,7 +1478,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -21). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self installFloatClass. @@ -1489,7 +1491,7 @@ VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1500,7 +1502,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 15). @@ -1511,7 +1513,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 15). @@ -1522,7 +1524,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1537,7 +1539,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory falseObject). @@ -1548,7 +1550,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -1559,7 +1561,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - Float64Array' } +{ #category : 'tests - primitiveAdd - Float64Array' } VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ | x y z result firstTerm size | @@ -1583,7 +1585,7 @@ VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 22.0. ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ interpreter push: (memory integerObjectOf: 1). @@ -1592,7 +1594,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1605,7 +1607,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1619,7 +1621,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1633,7 +1635,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1644,7 +1646,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1655,7 +1657,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1666,7 +1668,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1677,7 +1679,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -1688,7 +1690,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1699,7 +1701,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1714,7 +1716,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1725,7 +1727,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1736,7 +1738,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1747,7 +1749,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1758,7 +1760,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1769,7 +1771,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ interpreter push: (memory integerObjectOf: -1000). @@ -1780,7 +1782,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1791,7 +1793,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1806,7 +1808,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectWithArgCountLessThanOne [ |object1| "Tests the case where objectArg = 1 and: isOopFowarded: stackTop" @@ -1823,7 +1825,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectW self deny: interpreter failed. ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ |object1| "Tests the case where objectArg > 1 and: isOopFowarded: stackTop" @@ -1842,7 +1844,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ |object1| @@ -1858,7 +1860,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ interpreter push: memory trueObject. @@ -1870,7 +1872,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButDifferentType [ | object1 object2 | @@ -1889,7 +1891,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButD ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ | object | @@ -1905,7 +1907,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ | object | @@ -1919,7 +1921,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameValue [ | object1 object2 | @@ -1935,7 +1937,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameV ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ interpreter push: (memory trueObject). @@ -1948,7 +1950,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ interpreter push: (memory characterObjectOf: 66). @@ -1961,7 +1963,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ interpreter push: (memory integerObjectOf: 0). @@ -1974,7 +1976,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -1987,7 +1989,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -2002,7 +2004,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2017,7 +2019,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat . @@ -2033,7 +2035,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2049,7 +2051,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2065,7 +2067,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2090,7 +2092,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedBool [ interpreter push: (memory trueObject). @@ -2101,7 +2103,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedBool [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -2112,7 +2114,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ interpreter push: (memory integerObjectOf: 16). @@ -2123,7 +2125,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2134,7 +2136,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2145,7 +2147,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2156,7 +2158,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2167,7 +2169,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2178,7 +2180,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2193,7 +2195,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2204,7 +2206,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory trueObject). @@ -2215,7 +2217,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2226,7 +2228,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2237,7 +2239,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2248,7 +2250,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2259,7 +2261,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2270,7 +2272,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2281,7 +2283,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2292,7 +2294,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2307,7 +2309,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ | class array | @@ -2327,7 +2329,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ | class array | @@ -2345,7 +2347,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 0.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ | class array | @@ -2365,7 +2367,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ | class array | @@ -2385,7 +2387,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ | class array | @@ -2405,7 +2407,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ | class array | @@ -2425,7 +2427,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ | class array | @@ -2445,7 +2447,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ | class array | @@ -2467,7 +2469,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveMod [ interpreter push: (memory integerObjectOf: 16). @@ -2480,7 +2482,7 @@ VMPrimitiveTest >> testPrimitiveMod [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ interpreter push: (memory trueObject). @@ -2495,7 +2497,7 @@ VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2506,7 +2508,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 42). @@ -2518,7 +2520,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModNegativeValue [ interpreter push: (memory integerObjectOf: 16). @@ -2531,7 +2533,7 @@ VMPrimitiveTest >> testPrimitiveModNegativeValue [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ interpreter push: (memory integerObjectOf: memory maxCInteger >> memory numSmallIntegerTagBits). @@ -2544,7 +2546,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -2555,7 +2557,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2566,7 +2568,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ interpreter push: (memory trueObject). @@ -2579,7 +2581,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ interpreter push: (memory integerObjectOf: 16). @@ -2592,7 +2594,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2607,7 +2609,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -2618,7 +2620,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ interpreter push: (memory integerObjectOf: 16). @@ -2630,7 +2632,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ self assert: (interpreter stackValue: 2) equals: (memory integerObjectOf: 16). ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2642,7 +2644,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ | class | class := self newClassInOldSpaceWithSlots: 4 instSpec: memory nonIndexablePointerFormat. @@ -2653,7 +2655,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: interpreter stackTop) equals: 4 ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ | class | @@ -2667,7 +2669,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ | class | @@ -2681,7 +2683,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2692,7 +2694,7 @@ VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ self deny: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2704,7 +2706,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -2720,7 +2722,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2732,7 +2734,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2744,7 +2746,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2757,7 +2759,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2770,7 +2772,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2783,7 +2785,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ | newObj class | @@ -2800,7 +2802,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: newObj) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ | newObj class | @@ -2816,7 +2818,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: newObj) equals: 7 ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ | newObj class | @@ -2834,7 +2836,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ self assert: (memory getMemoryMap isOldObject: newObj) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ | class | @@ -2850,7 +2852,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ | class | @@ -2864,7 +2866,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ | class | @@ -2879,7 +2881,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ | class | @@ -2895,7 +2897,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ | class | @@ -2909,7 +2911,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ self assert: interpreter primFailCode equals: PrimErrBadArgument ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2920,7 +2922,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ | class | "class object with no slots, so no format" @@ -2932,7 +2934,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ | class | "class with nil used as format" @@ -2945,7 +2947,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2956,7 +2958,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2967,7 +2969,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 16). @@ -2978,7 +2980,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2989,7 +2991,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3004,7 +3006,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -3015,7 +3017,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -3026,7 +3028,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -3037,7 +3039,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ interpreter push: (memory integerObjectOf: 16). @@ -3048,7 +3050,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ interpreter push: (memory instantiateClass: (self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat)). @@ -3060,7 +3062,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ |object object2| @@ -3079,7 +3081,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ self assert: (memory isPinned: object2). ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ |object| @@ -3099,7 +3101,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ |object| @@ -3119,7 +3121,7 @@ VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuo [ interpreter push: (memory integerObjectOf: 15). @@ -3129,7 +3131,7 @@ VMPrimitiveTest >> testPrimitiveQuo [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ interpreter push: (memory trueObject). @@ -3142,7 +3144,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -3153,7 +3155,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -3164,7 +3166,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ "Tests that the rest of the integer division is not pushed into the stack, as this is not expected in a primitive behavior" interpreter push: (memory integerObjectOf: 16). @@ -3176,7 +3178,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ self assert: (interpreter stackValue: 1) equals: (memory integerObjectOf: 16). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ interpreter push: (memory integerObjectOf: 42). @@ -3187,7 +3189,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -3198,7 +3200,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -3209,7 +3211,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ interpreter push: (memory integerObjectOf: -13). @@ -3220,7 +3222,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 6). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -3231,7 +3233,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3246,7 +3248,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ interpreter push: (memory integerObjectOf: 1). @@ -3256,7 +3258,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ self assert: interpreter failed ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ | class object | @@ -3271,7 +3273,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ self assert: (memory isImmutable: object) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ | method | @@ -3286,7 +3288,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ | array1 | @@ -3299,7 +3301,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ | method | @@ -3314,7 +3316,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ | array1 array2 arrayForwarder arrayForwardee | @@ -3339,7 +3341,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderResolutionAndCallPrimitiveAgain [ | array1 array2 arrayForwarder arrayForwardee | @@ -3366,7 +3368,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderReso ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ | class objectInstance | "Forwarding an object happens when becoming it with a bigger object" @@ -3382,7 +3384,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3397,7 +3399,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3412,7 +3414,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3428,7 +3430,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3444,7 +3446,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3460,7 +3462,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3482,7 +3484,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3499,7 +3501,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ equals: (memory smallFloatObjectOf: 10.0) ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3516,7 +3518,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPre self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3533,7 +3535,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3547,7 +3549,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3561,7 +3563,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3579,7 +3581,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3596,7 +3598,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ equals: (memory smallFloatObjectOf: 1.0) ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3613,7 +3615,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeError self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3630,7 +3632,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErro self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3648,7 +3650,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStac self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 0.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3662,7 +3664,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3676,7 +3678,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperan self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3689,7 +3691,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3707,7 +3709,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3722,7 +3724,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3737,7 +3739,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3751,7 +3753,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3765,7 +3767,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3782,7 +3784,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3801,7 +3803,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3816,7 +3818,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3831,7 +3833,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3848,7 +3850,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3865,7 +3867,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithT self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3882,7 +3884,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWith self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3896,7 +3898,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirs self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3910,7 +3912,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSeco self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3930,7 +3932,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3945,7 +3947,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3960,7 +3962,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3977,7 +3979,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3994,7 +3996,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4008,7 +4010,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4022,7 +4024,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4041,7 +4043,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4056,7 +4058,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4071,7 +4073,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4086,7 +4088,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4103,7 +4105,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4120,7 +4122,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4134,7 +4136,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4148,7 +4150,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4167,7 +4169,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4182,7 +4184,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4199,7 +4201,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4215,7 +4217,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOpera ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4231,7 +4233,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOper ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4250,7 +4252,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesSta ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4272,7 +4274,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4288,7 +4290,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4305,7 +4307,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ equals: (memory smallFloatObjectOf: 100.0) ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4324,7 +4326,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErr ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4343,7 +4345,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeEr ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4357,7 +4359,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4371,7 +4373,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4389,7 +4391,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4404,7 +4406,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4419,7 +4421,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4436,7 +4438,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErr self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4453,7 +4455,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4467,7 +4469,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4481,7 +4483,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4500,7 +4502,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4515,7 +4517,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4530,7 +4532,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4547,7 +4549,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4561,7 +4563,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4575,7 +4577,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4594,7 +4596,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ | method frame contextOop contextIdentityHash suspendedContext | @@ -4627,7 +4629,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ equals: contextIdentityHash ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ | method | @@ -4649,7 +4651,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ interpreter imageReader validateImage: imageName ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ | method object objectHash | @@ -4676,7 +4678,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ equals: objectHash ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ | class array | @@ -4697,7 +4699,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ | class array | @@ -4718,7 +4720,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ | class array | @@ -4737,7 +4739,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ | class array | @@ -4756,7 +4758,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ | class array | @@ -4775,7 +4777,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ | class array | @@ -4794,7 +4796,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ | class array | @@ -4813,7 +4815,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4829,7 +4831,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4846,7 +4848,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4864,7 +4866,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonC self assert: string contentEquals: (self newString: 'po') ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4879,7 +4881,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4902,7 +4904,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4920,7 +4922,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonChar self assert: string contentEquals: (self newString: 'po') ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -4940,7 +4942,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4960,7 +4962,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4980,7 +4982,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5000,7 +5002,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ | byteSymbol asciiOrder | @@ -5019,7 +5021,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -5032,7 +5034,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -5045,7 +5047,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ | string | @@ -5060,7 +5062,7 @@ VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ interpreter push: (memory integerObjectOf: 2). @@ -5075,7 +5077,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -5092,7 +5094,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ interpreter push: (memory integerObjectOf: memory minSmallInteger). @@ -5103,7 +5105,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ | minSmallInt | @@ -5121,7 +5123,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ interpreter setImageVersion: 110. @@ -5136,7 +5138,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 110). ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ | slots | @@ -5162,7 +5164,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ memory okayOop: (memory fetchPointer: i ofObject: interpreter stackTop) ] ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterSetsImageVersion [ interpreter push: memory nilObject. diff --git a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st index 8ec7e8c742..895ba3b5f2 100644 --- a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMPushThisContextRoutineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMPushThisContextRoutineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> setUp [ | contextClass | @@ -27,7 +29,7 @@ VMPushThisContextRoutineTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | @@ -72,7 +74,7 @@ VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ equals: contextOop ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -105,7 +107,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: LargeContextSlots. ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -140,7 +142,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: SmallContextSlots ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments expectedStackPointer | @@ -177,7 +179,7 @@ VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ | isLargeContext isInBlock routine numberOfArguments | @@ -214,7 +216,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ self assert: (memory fetchPointer: Context allSlots size +2 ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: 3). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ | isLargeContext isInBlock routine numberOfArguments | @@ -248,7 +250,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ | isLargeContext isInBlock routine numberOfArguments | @@ -283,7 +285,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop expectedStackPointer | @@ -321,7 +323,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ | isLargeContext isInBlock routine numberOfArguments | @@ -356,7 +358,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ self assert: (memory fetchPointer: ReceiverIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ | isLargeContext isInBlock routine numberOfArguments | @@ -396,7 +398,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ self assert: (memory fetchPointer: Context allSlots size + numberOfArguments + 3 ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testSingleContextReturnsNewSpouseInNewSpace [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | diff --git a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st index 9edefda0ad..b5bfa609cb 100644 --- a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSegmentsImageFormatTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-ImageFormat' + #name : 'VMSegmentsImageFormatTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegment [ | header newSegmentSize | @@ -23,7 +25,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegme equals: (memory segmentManager segments at: 0) segSize ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage [ | header newSegmentSize | @@ -46,7 +48,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage equals: header firstSegSize + newSegmentSize ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBigger [ | newSegmentSize | @@ -59,7 +61,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBi self assert: newSegmentSize >= memory growHeadroom ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSmaller [ | newSegmentSize | @@ -74,7 +76,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSm self assert: newSegmentSize >= memory growHeadroom ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testMinimalImageHasASingleSegment [ diff --git a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st index 8a162f9399..9b55da5b97 100644 --- a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMSelectorIndexDereferenceRoutineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSelectorIndexDereferenceRoutineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ "32 bit platforms use a direct selector reference and not an index" @@ -18,7 +20,7 @@ VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ self assert: cogit ceDereferenceSelectorIndex isNil ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -29,7 +31,7 @@ VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ self assert: cogit ceDereferenceSelectorIndex notNil ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSpecialSelectorTable [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -58,7 +60,7 @@ VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSp self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> testPositiveSelectorIndexIsLookedUpInMethodLiterals [ "64 bit platforms use a selector index and a routine to map it to the real selector" diff --git a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st index 8e4b9726e7..34f53a536e 100644 --- a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSessionIdTest, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-InterpreterTests' + #name : 'VMSessionIdTest', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMSessionIdTest >> testGlobalSessionID [ "The globalSessionID is stored as a 64 bit number, but for compatibility with older plugins, is restricted to postive signed 32 bit values" | vm predicted diff | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st index 1a7faad9a6..c9037f3998 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimpleStackBasedCogitAbstractTest, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMSimpleStackBasedCogitAbstractTest', + #superclass : 'VMSpurMemoryManagerTest', #instVars : [ 'cogit', 'codeSize', @@ -31,10 +31,12 @@ Class { 'VMBytecodeConstants', 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ ^ { @@ -42,7 +44,7 @@ VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ } ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ ^ ParametrizedTestMatrix new @@ -51,7 +53,7 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ yourself ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ ^ ParametrizedTestMatrix new @@ -60,26 +62,26 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ yourself ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSizeParameters [ ^ self wordSize64Parameters + self wordSize32Parameters ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> ISA: anISA [ isa := anISA ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> abstractInstructions [ ^ (0 to: cogit getOpcodeIndex - 1) collect: [ :i | cogit abstractOpcodes at: i ] ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure [ | before after | @@ -91,7 +93,7 @@ VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure self assert: (self readMemoryAt: after) equals: anOop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlockClosure [ | before | @@ -103,17 +105,17 @@ VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlock equals: before ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> callerAddress [ ^ callerAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> cogit [ ^ cogit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ "Compiles some native code using the code inside the block closure as builder. This version assumes the block has a single 1-bytecode statement @@ -122,13 +124,13 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ ^ self compile: aBlockClosure bytecodes: 2 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes [ ^ self compile: aBlockClosure bytecodes: bytecodes headerSize: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes headerSize: headerSize [ "Compiles some native code using the code inside the block closure as builder. @@ -153,7 +155,7 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecod ^ allocatedAddress ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ "We will call to this address" @@ -165,7 +167,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ sendAddress := self compile: [ cogit genSpecialSelectorSend ]. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampolineName [ | startAddress | @@ -185,7 +187,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampol ^ startAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytecodes: bytecodes [ "Call a compilation block initializing the compiler before. @@ -203,7 +205,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytec ^ aBlockClosure value ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ "Create the root context with a valid method" @@ -239,7 +241,7 @@ VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ baseFrame := interpreter framePointer ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ self @@ -249,13 +251,13 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ temporaries: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments [ self createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for machine code. @@ -286,7 +288,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress rec builder buildFrame ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ self @@ -295,7 +297,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ arguments: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress receiver: receiver arguments: arguments [. "I create a frameless call @@ -322,7 +324,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress re ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for interpreter. @@ -363,7 +365,7 @@ VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: return cogit needsFrame: true. ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ | specialObjectsOop | @@ -380,19 +382,19 @@ VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ memory specialObjectsOop: specialObjectsOop. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassemble [ ^ self disassembleFrom: cogInitialAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex [ ^ self disassembleFrom: anIndex opcodes: opcodes ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ machineSimulator disassembler @@ -405,25 +407,25 @@ VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberO pc: 0 ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue [ ^ machineSimulator framePointerRegisterValue ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue: aValue [ machineSimulator framePointerRegisterValue: aValue ] -{ #category : #configuration } +{ #category : 'configuration' } VMSimpleStackBasedCogitAbstractTest >> generateCaptureCStackPointers [ ^ true ] -{ #category : #'helpers - cog methods' } +{ #category : 'helpers - cog methods' } VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector: anSelectorOop [ | targetCog allocatedAddress | @@ -442,18 +444,18 @@ VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> getLastAddress [ ^ machineSimulator getLastAddress: self abstractInstructions. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initialCodeSize [ ^ 4 * 1024 ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ "I will create the initial stack with a well-known caller address so we know if the code comes back @@ -465,7 +467,7 @@ VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ | page | @@ -478,31 +480,31 @@ VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ machineSimulator framePointerRegisterValue: page baseAddress. ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> instructionPointer [ ^ self readRegister: machineSimulator instructionPointerRegister ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> interpreterClass [ ^ CogVMSimulatorLSB ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> jitCompilerClass [ ^ SimpleStackBasedCogit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod [ ^ self jitMethod: aHostCompiledMethod selector: memory nilObject ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: aSelectorOop [ | methodOop | @@ -512,7 +514,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: ^ cogit cog: methodOop selector: aSelectorOop ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> jitOptions [ ^ Dictionary newFromPairs: { @@ -522,7 +524,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitOptions [ #ObjectMemory. self memoryClass name } ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ | builder | @@ -531,12 +533,12 @@ VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ ^ builder ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> machineSimulator [ ^ machineSimulator ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ^ self wordSize = 4 @@ -544,7 +546,7 @@ VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ifFalse: [ Spur64BitCoMemoryManager ] ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ | compiler | @@ -559,13 +561,13 @@ VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> openMachineDebugger [ self openMachineDebuggerAt: cogInitialAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ ^ VMMachineCodeDebugger new @@ -576,7 +578,7 @@ VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ openWithSpec. ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pop [ | stackAddressIntegerValue poppedByteArray | @@ -593,13 +595,13 @@ VMSimpleStackBasedCogitAbstractTest >> pop [ ^ poppedByteArray ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> popAddress [ ^ self pop integerAt: 1 size: self wordSize signed: false ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareCall [ machineSimulator hasLinkRegister @@ -612,13 +614,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareCall [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver arguments: arguments [ machineSimulator baseRegisterValue: cogit varBaseAddress. @@ -635,13 +637,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver ar self prepareCall ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> primitiveTraceLogSize [ ^ 256 * 8 "word size" ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ | stackAddressIntegerValue | @@ -662,7 +664,7 @@ VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ | aByteArray | @@ -671,7 +673,7 @@ VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ self push: aByteArray ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ | bytes | @@ -679,7 +681,7 @@ VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ ^ bytes integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ registerValue := ByteArray new: self wordSize. @@ -687,7 +689,7 @@ VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ " @@ -710,26 +712,26 @@ VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ ^ self readMemoryAt: machineSimulator framePointerRegisterValue - ((3 + anIndex) * self wordSize) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> receiverRegister: anInteger [ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> returnValue [ ^ self readRegister: machineSimulator receiverRegister ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress [ ^ self runFrom: startAddress until: endAddress timeout: 100000. "microseconds" ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress timeout: microseconds [ machineSimulator startAt: startAddress @@ -738,7 +740,7 @@ VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress t count: 0. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ "The different platforms generates code in a different way, so the number of opcodes can not be valid. Eg: ARM generates more instructions per opcode. It has to calculate the instructions to run differently" @@ -749,7 +751,7 @@ VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ count: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ machineSimulator startAt: cogInitialAddress @@ -759,7 +761,7 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ machineSimulator startAt: anAddress @@ -769,17 +771,17 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> sentSelector [ ^ sentSelector ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> sentSelector: anObject [ sentSelector := anObject ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUp [ super setUp. @@ -822,7 +824,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUp [ self initializeInitialStackFrame. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit allocateOpcodes: 80 bytecodes: 0 ifFail: [ self error: 'Could not allocate opcodes' ]. @@ -839,7 +841,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit methodZone manageFrom: cogit methodZoneBase to: memory getMemoryMap codeZoneEnd. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ "Create a send trampoline so we can stop..." @@ -866,7 +868,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ ^ (self stackAt: index) @@ -875,7 +877,7 @@ VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ signed: false ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ | stackAddressIntegerValue | @@ -885,37 +887,37 @@ VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ ^ machineSimulator memoryAt: stackAddressIntegerValue readNext: self wordSize. ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue: aValue [ machineSimulator stackPointerRegisterValue: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> temporaryRegisterValue [ ^ self machineSimulator temporaryRegisterValue ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> top [ ^ self stackAt: 0 ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> topAddress [ ^ self top integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st index da38e1895e..c43441d889 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitBytecodeTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitBytecodeTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -25,7 +27,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVa self runGeneratedCode. ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrameful onBlock: generationBlock [ | oldFP oldSP | @@ -45,7 +47,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrame self assert: oldSP equals: self stackPointerRegisterValue. ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister: anAddress withFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -58,7 +60,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister self assert: machineSimulator receiverRegisterValue equals: anAddress ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -69,50 +71,50 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isF self runUntilReturn. ] -{ #category : #'tests - extended store bytecode - store inst var' } +{ #category : 'tests - extended store bytecode - store inst var' } VMSimpleStackBasedCogitBytecodeTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable1 [ self testExtendedPushPushesInstanceVariable: 1 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable2 [ self testExtendedPushPushesInstanceVariable: 2 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable3 [ self testExtendedPushPushesInstanceVariable: 3 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable32 [ self testExtendedPushPushesInstanceVariable: 32 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable64 [ self testExtendedPushPushesInstanceVariable: 64 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable: instanceVariableToWrite [ self testExtendedPushPushesVariableType: 0 "Instance variable type" index: instanceVariableToWrite ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type index: instanceVariableToWrite [ "Type = 0 is instance variable" @@ -136,7 +138,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - jumps' } +{ #category : 'tests - jumps' } VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ | firstBytecode | @@ -176,67 +178,67 @@ VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ equals: memory trueObject ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempPopsValue [ self testPopIntoTempPopsValueAt: 3 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 3 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempPopsValue [ self testPopIntoTempPopsValueAt: 4 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 4 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempPopsValue [ self testPopIntoTempPopsValueAt: 5 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 5 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempPopsValue [ self testPopIntoTempPopsValueAt: 6 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 6 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempPopsValue [ self testPopIntoTempPopsValueAt: 7 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 7 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -244,7 +246,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -252,7 +254,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -260,19 +262,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempPopsValue [ self testPopIntoTempPopsValueAt: 1 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 1 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -280,55 +282,55 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresEigthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFifthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFirstInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFourthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSecondInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSeventhInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSixthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresThirdInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite. @@ -337,7 +339,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStores self assert: (memory fetchPointer: instanceVariableToWrite - 1 ofObject: obj) equals: memory falseObject ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -345,19 +347,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempPopsValue [ self testPopIntoTempPopsValueAt: 2 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 2 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -365,7 +367,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecod self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -373,7 +375,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableUnderTest [ | temporaries | @@ -400,7 +402,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableU self assert: self popAddress equals: memory trueObject ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVariableUnderTest [ | temporaries | @@ -425,7 +427,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVar self assert: (self readTemporaryValueAt: tempVariableUnderTest) equals: memory falseObject ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -433,157 +435,157 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 10 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 10 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 11 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 11 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 12 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 12 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 13 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 13 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 14 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 14 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 15 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 15 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush3rdTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 3 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 4 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 4 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 5 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 5 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 6 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 6 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 7 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 7 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 8 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 8 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 9 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 9 ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse [ self compile: [ cogit genPushConstantFalseBytecode ]. @@ -592,7 +594,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - two bytecodes' } +{ #category : 'tests - two bytecodes' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self compile: [ @@ -604,7 +606,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self assert: machineSimulator receiverRegisterValue equals: memory nilObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self compile: [ cogit genPushConstantNilBytecode ]. @@ -613,7 +615,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self assert: self popAddress equals: memory nilObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self compile: [ cogit genPushConstantTrueBytecode ]. @@ -622,7 +624,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self assert: self popAddress equals: memory trueObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallIntegerZero [ self compile: [ cogit genPushConstantZeroBytecode ]. @@ -631,19 +633,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallI self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 1 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 1 ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusOne [ cogit byte0: 116. @@ -654,7 +656,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusO self assert: self popAddress equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ cogit byte0: 118. @@ -665,7 +667,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ self assert: self popAddress equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ cogit byte0: 119. @@ -676,7 +678,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ self assert: self popAddress equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ cogit byte0: 117. @@ -687,7 +689,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver [ machineSimulator receiverRegisterValue: 75. @@ -698,103 +700,103 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver self assert: self popAddress equals: 75 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEighthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 8 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEleventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 11 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 15 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 5 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFirstVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 1 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 14 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 4 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesNinthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 9 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSecondVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 2 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSeventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 7 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 16 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 6 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 10 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirdVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 3 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 13 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTwelfthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 12 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -813,19 +815,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushe self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 2 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 2 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tempVariableUnderTest [ | arguments | @@ -848,7 +850,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tempVariableUnderTest [ | temporaries | @@ -873,13 +875,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushThirdTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 3 ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -918,7 +920,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFr equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -956,7 +958,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallF equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFrameCallsLargeMethodTrampoline [ | numberOfArguments methodObject method | @@ -993,7 +995,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFram equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFrameCallsSmallMethodTrampoline [ | numberOfArguments methodObject method | @@ -1030,13 +1032,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFram equals: numberOfArguments ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnRegister [ self @@ -1045,19 +1047,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnReg onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRegister [ self @@ -1066,13 +1068,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRe onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInReturnRegister [ self @@ -1083,7 +1085,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInRet cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ @@ -1091,7 +1093,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ @@ -1099,7 +1101,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ @@ -1107,7 +1109,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInReturnRegister [ self @@ -1118,7 +1120,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInRe cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ @@ -1126,7 +1128,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ self @@ -1134,7 +1136,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInReturnRegister [ self @@ -1144,7 +1146,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInR cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ self @@ -1152,7 +1154,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ self @@ -1160,7 +1162,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectInReturnRegister [ self @@ -1170,7 +1172,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectIn cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ self @@ -1178,7 +1180,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1192,7 +1194,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsP equals: memory trueObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1207,7 +1209,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjec equals: memory falseObject ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1244,7 +1246,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector literalIndex | @@ -1272,7 +1274,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesReceiverFromStackTopIntoReceiverRegister [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1296,7 +1298,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesRecei equals: memory falseObject ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1323,7 +1325,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector | @@ -1350,7 +1352,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesReturnValueFromReceiverRegisterAfterReturn [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1379,7 +1381,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesRetu self assert: self popAddress equals: (memory integerObjectOf: 42) ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1394,7 +1396,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjec equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1409,7 +1411,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalOb equals: memory trueObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1429,7 +1431,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1454,7 +1456,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #+. @@ -1469,7 +1471,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1488,7 +1490,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelector equals: selectorAtIndex ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #+. @@ -1507,7 +1509,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1528,7 +1530,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1554,7 +1556,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #at:put:. @@ -1570,7 +1572,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ | signed | @@ -1596,7 +1598,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelector equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #at:put:. @@ -1616,7 +1618,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1635,7 +1637,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMoves equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64Bits [ | signed | @@ -1659,7 +1661,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegated equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #atEnd. @@ -1673,7 +1675,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceive self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelectorIntoClassRegisterIn32Bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1691,7 +1693,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelecto equals: selectorAtIndex ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #atEnd. diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st index e471e136aa..c69374a214 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st @@ -1,19 +1,21 @@ Class { - #name : #VMSimpleStackBasedCogitCoggedMethods, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitCoggedMethods', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogMethodConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitCoggedMethods >> setUp [ super setUp. self setUpCogMethodEntry. ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndContinue [ | cogMethod otherBlock | @@ -28,7 +30,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: otherBlock ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndGoesToAbort [ | cogMethod otherBlock | @@ -43,7 +45,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: cogit ceMethodAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingNoCheckEntryDoesNotCheckClassTag [ | cogMethod otherBlock | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st index 021b93d5c5..e2345429d5 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMSimpleStackBasedCogitMegamorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitMegamorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMMethodCacheConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ | specialSelectorsArray | @@ -25,7 +27,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ cogit generateOpenPICPrototype. ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICReturnsPIC [ | selector createdPic specialObjectsArray | @@ -36,13 +38,13 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICRet self assert: (cogit methodZone openPICWithSelector: selector) equals: createdPic. ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupNonExistingMegamorphicPICReturnsNil [ self assert: (cogit methodZone openPICWithSelector: memory trueObject) equals: nil ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ "We have to call the pic and see if it reaches the abort trampoline" @@ -74,7 +76,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ self assert: machineSimulator sendNumberOfArgumentsRegisterValue equals: createdPic address ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectPicAbortTrampoline [ | createdPic selector | @@ -87,7 +89,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectP equals: (cogit picAbortTrampolineFor: 1) ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numArgs [ | selector createdPic | @@ -96,43 +98,43 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numAr self assert: createdPic cmNumArgs equals: numArgs ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith1 [ self testNewMegamorphicPICNumArgs: 1 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith16 [ self testNewMegamorphicPICNumArgs: 16 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith2 [ self testNewMegamorphicPICNumArgs: 2 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith4 [ self testNewMegamorphicPICNumArgs: 4 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith8 [ self testNewMegamorphicPICNumArgs: 8 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWithoutArgs [ self testNewMegamorphicPICNumArgs: 0 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ | createdPic selector | @@ -141,7 +143,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ self assert: createdPic selector equals: selector ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ | createdPic selector | @@ -150,7 +152,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ self assert: createdPic blockSize equals: cogit openPICSize. ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ | selector createdPic | @@ -160,7 +162,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testRelinkCallSiteToMegamorphicPICCallsNewPIC [ | selector literalIndex method createdPic returnAfterCallAddress patchedCogMethod startAddress | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st index 64f66063c8..e1ff4724cd 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitMonomorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitMonomorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ "Calculate the size of the Closed Pic" @@ -14,7 +16,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ self assert: cogit closedPICSize isNotNil ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineReplacesTheCallTargetWithTheCogMethodAddress [ "This is for the monomorphic case" @@ -64,7 +66,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineR self deny: executedTheTrampoline ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testObtainInlineCacheFromLinkedCall [ | sendingMethod targetCog selector executedTheTrampoline | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st index 1aba76164e..2d4f3a96ab 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimpleStackBasedCogitPolymorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitPolymorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'selector', 'numArgs', @@ -14,10 +14,12 @@ Class { #pools : [ 'CogMethodConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ ^ super testParameters * @@ -26,7 +28,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ yourself) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ | pic | "Only run this test if the test is configured for so much cases" @@ -37,7 +39,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ self assertPIC: pic hits: (cogMethods at: aCase) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ "Receiver is nil, class tag of the first entry is the receiver's class tag. - the receiver matches class tag for case 0 @@ -59,7 +61,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ "Receiver is nil, class tag of the first entry is 1 (a small integer). @@ -80,19 +82,19 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases [ ^ configuredPicCases ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases: aNumber [ configuredPicCases := aNumber ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ cogit @@ -102,7 +104,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ isMNUCase: false. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ | pic | @@ -117,7 +119,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ ^ pic ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ super setUp. @@ -158,7 +160,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ cogMethods at: index - 1 put: cogMethod ] "Maximum polymorphic cases" ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ | pic | @@ -167,7 +169,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ self assert: pic cPICNumCases equals: self configuredPicCases ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ | pic | pic := self makePolymorphicPIC. @@ -175,43 +177,43 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ self assert: (cogit backend callTargetFromReturnAddress: pic asInteger + cogit missOffset) equals: (cogit picAbortTrampolineFor: numArgs) ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase0 [ self assertHitAtCase: 0 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase1 [ self assertHitAtCase: 1 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase2 [ self assertHitAtCase: 2 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase3 [ self assertHitAtCase: 3 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase4 [ self assertHitAtCase: 4 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase5 [ "This is the last case. Cog PICs have 6 cases (0-based)" self assertHitAtCase: 5 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ | pic | pic := self makePolymorphicPIC. @@ -219,7 +221,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ self assert: pic cmType equals: CMPolymorphicIC. ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ | pic | @@ -229,7 +231,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ self assertPICMiss: pic ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ | pic | @@ -238,7 +240,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ self assert: pic cmNumArgs equals: numArgs ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEntryOffset [ | pic methodCheckEntryPoint methodNoCheckEntryPoint passedByCheckEntryPoint | @@ -269,7 +271,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEnt self deny: passedByCheckEntryPoint ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testSelectorInHeader [ | pic | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st index 7ab3e09968..00fe287064 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitRememberedSetTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitRememberedSetTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: value shouldCallTrampoline: shouldCallTrampoline [ | trampoline afterBytecode | @@ -28,14 +30,14 @@ VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: valu ] -{ #category : #initialization } +{ #category : 'initialization' } VMSimpleStackBasedCogitRememberedSetTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesNotCallTrampoline [ | newObject otherNewObject | @@ -48,7 +50,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesN shouldCallTrampoline: false ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesCallTrampoline [ | oldObject otherNewObject | @@ -62,7 +64,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesC shouldCallTrampoline: true ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesNotCallTrampoline [ | oldObject otherOldObject | @@ -76,7 +78,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesN shouldCallTrampoline: false ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInPermObjectDoesCallTrampoline [ | permObject otherPermObject | diff --git a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st index b3b1b69113..a3b6237cbb 100644 --- a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimulatedEnvironmentBuilder, - #superclass : #Object, + #name : 'VMSimulatedEnvironmentBuilder', + #superclass : 'Object', #instVars : [ 'interpreter', 'interpreterClass', @@ -18,17 +18,19 @@ Class { 'permSpaceSize', 'allocateMemory' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> build [ self doBuildSimulator. self doBuild ] -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> doBuild [ "100 k at least to put the class table in the old space. @@ -85,7 +87,7 @@ VMSimulatedEnvironmentBuilder >> doBuild [ ] -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> doBuildSimulator [ objectMemory := objectMemoryClass simulatorClass new. @@ -100,17 +102,17 @@ VMSimulatedEnvironmentBuilder >> doBuildSimulator [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> initialCodeSize: anInteger [ initialCodeSize := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> initializationOptions: aCollection [ initializationOptions := aCollection ] -{ #category : #initialization } +{ #category : 'initialization' } VMSimulatedEnvironmentBuilder >> initialize [ super initialize. @@ -118,58 +120,58 @@ VMSimulatedEnvironmentBuilder >> initialize [ permSpaceSize := 0. ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> interpreter [ ^ interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> interpreterClass: aClass [ interpreterClass := aClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> memoryInitialAddress [ ^ initialAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> methodCacheSize [ ^ methodCacheSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> newSpaceSize [ ^ newSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> objectMemory [ ^ objectMemory ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> objectMemoryClass: aClass [ objectMemoryClass := aClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> oldSpaceSize [ ^ oldSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> permSpaceSize: anInteger [ permSpaceSize := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> primitiveTraceLogSize: anInteger [ primitiveTraceLogSize := anInteger ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ "Unicorn simulator requires mapped memory to be multiple of 4096" @@ -181,7 +183,7 @@ VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ ^ anInteger + (pageSize - remainder) ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ^ 4096. @@ -189,12 +191,12 @@ VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> stackSpaceSize [ ^ stackSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> wordSize: anInteger [ wordSize := anInteger ] diff --git a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st index f1c4a88d03..007b9984d9 100644 --- a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimulationTest, - #superclass : #TestCase, - #category : #'VMMakerTests-Simulation' + #name : 'VMSimulationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests-Simulation', + #package : 'VMMakerTests', + #tag : 'Simulation' } -{ #category : #tests } +{ #category : 'tests' } VMSimulationTest >> testSetUpJITSimulationReadsImage [ | options c | @@ -27,7 +29,7 @@ VMSimulationTest >> testSetUpJITSimulationReadsImage [ extraMemory: 100000. ] -{ #category : #tests } +{ #category : 'tests' } VMSimulationTest >> testSetUpNonJITSimulationReadsImage [ | options c | diff --git a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st index 746c298210..f09dcfb865 100644 --- a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSistaSuperSendsTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSistaSuperSendsTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSistaSuperSendsTest >> jitOptions [ ^ super jitOptions @@ -12,7 +14,7 @@ VMSistaSuperSendsTest >> jitOptions [ yourself ] -{ #category : #'tests - sends/super' } +{ #category : 'tests - sends/super' } VMSistaSuperSendsTest >> testSuperSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector binding literalVariableIndex literalSelectorIndex startPC receiver expectedSelector | diff --git a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st index d5644e8ee9..bcaf2eb03b 100644 --- a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSistaTrampolineTest, - #superclass : #VMTrampolineTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSistaTrampolineTest', + #superclass : 'VMTrampolineTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSistaTrampolineTest >> jitOptions [ ^ super jitOptions @@ -12,7 +14,7 @@ VMSistaTrampolineTest >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMSistaTrampolineTest >> testSendTrampolineWithFourArguments [ | trampolineStart receiver | diff --git a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st index f4a16ac4a2..45d181195e 100644 --- a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpecialSendArithmethicTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSpecialSendArithmethicTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpecialSendArithmethicTest class >> testParameters [ ^ super testParameters * { @@ -13,7 +15,7 @@ VMSpecialSendArithmethicTest class >> testParameters [ } ] -{ #category : #running } +{ #category : 'running' } VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop [ self assert: machineSimulator instructionPointerRegisterValue equals: sendTrampolineAddress. @@ -21,7 +23,7 @@ VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop self assert: machineSimulator arg0RegisterValue equals: argOop. ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTrampoline [ self @@ -31,7 +33,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTram shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoline [ self @@ -42,7 +44,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -52,7 +54,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCa shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCallsTrampoline [ self @@ -62,7 +64,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCalls shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsTrampoline [ self @@ -73,7 +75,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsT shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -83,7 +85,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSmallInteger [ self @@ -94,7 +96,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSm shouldPerformOperationReturning: expectedResult ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -104,7 +106,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgument shouldCallTrampolineWith: (memory integerObjectOf: value1) and: (memory integerObjectOf: value2) ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstReturnsSmallInteger [ self @@ -114,7 +116,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstRet shouldPerformOperationReturning: expectedResult. ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTrampoline [ self @@ -124,7 +126,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTra shouldCallTrampolineWith: (memory integerObjectOf: value2) and: memory trueObject ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -134,7 +136,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampo shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampoline [ self @@ -145,7 +147,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampol shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -156,7 +158,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentRet ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturnsSmallInteger [ self @@ -166,7 +168,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturn ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -177,7 +179,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturns ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampoline [ @@ -188,7 +190,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampo shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampoline [ self @@ -198,7 +200,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampolin ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline [ @@ -209,7 +211,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -220,7 +222,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentRetu shouldPerformOperationReturning: expectedResult ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturnsSmallInteger [ self @@ -231,7 +233,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturns ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -241,7 +243,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsS shouldPerformOperationReturning: expectedReflexiveResult ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampoline [ self @@ -252,7 +254,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampol shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline [ self @@ -262,7 +264,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ self @@ -272,7 +274,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ self @@ -281,7 +283,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ self @@ -291,7 +293,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampoline [ self @@ -301,7 +303,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampo shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampoline [ self @@ -310,7 +312,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampolin shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline [ self @@ -320,7 +322,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ self @@ -331,7 +333,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ self @@ -341,7 +343,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampoline [ self @@ -352,7 +354,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampol shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline [ self @@ -362,7 +364,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusTrueSelfCallsTrampoline [ self diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st deleted file mode 100644 index 400872c055..0000000000 --- a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st +++ /dev/null @@ -1,361 +0,0 @@ -Class { - #name : #VMSpurEphemeronsAlgorithmTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #instVars : [ - 'ephemeronObjectOopOne', - 'ephemeronObjectOopTwo', - 'nonEphemeronObjectOopOne', - 'nonEphemeronObjectOopTwo' - ], - #category : #'VMMakerTests-MemoryTests' -} - -{ #category : #helper } -VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ - - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopTwo -] - -{ #category : #helper } -VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ - "Force ephemerons to not be collected by putting them in special variables" - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo -] - -{ #category : #helper } -VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ - "In pharo Ephemerons have 3 slots" - - ^ self newOldSpaceObjectWithSlots: 3 - format: memory ephemeronFormat - classIndex: (memory ensureBehaviorHash: ourEphemeronClass) -] - -{ #category : #running } -VMSpurEphemeronsAlgorithmTest >> setUp [ - - super setUp. - memory initializeMournQueue. - self createEphemeronClass -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newZeroSizedObject. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newZeroSizedObject. - nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory doScavenge: 1. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect both non ephemeron objects" - memory flushNewSpace. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newZeroSizedObject. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newZeroSizedObject. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge: 1. "TenureByAge" - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopOne. - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoungInverse [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. - nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge: 1. "TenureByAge" - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopOne. - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo -] diff --git a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st index 1965e24efa..6dc630f31b 100644 --- a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMSpurInitializedOldSpaceTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurInitializedOldSpaceTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #testing } +{ #category : 'testing' } VMSpurInitializedOldSpaceTest class >> isAbstract [ ^ self == VMSpurInitializedOldSpaceTest ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> assertFreeListEmpty: aFreeListOop [ self assert: aFreeListOop equals: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createEphemeronClass [ ourEphemeronClass := self createEphemeronClassForSlots: 3 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ | theNewClass formatWithSlots hash | @@ -38,7 +40,7 @@ VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ ^ theNewClass ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ | address | @@ -47,24 +49,24 @@ VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ ^ address ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> denyFreeListEmpty: aFreeListOop [ self deny: aFreeListOop equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurInitializedOldSpaceTest >> forgetObject3 [ memory coInterpreter profileMethod: memory nilObject ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeListForSize: allocationSize [ ^ memory freeLists at: allocationSize / memory allocationUnit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ "Initially the old space has a single big chunk of free memory and no small free chunks. @@ -77,7 +79,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ ^ memory freeLists at: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ "The free tree lists stores the oop of free tree nodes. @@ -88,7 +90,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ ^ memory startOfObject: self freeTreeRootOop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ^ memory @@ -96,7 +98,7 @@ VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ | class | @@ -107,14 +109,14 @@ VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" ^ self newOldEphemeronObjectWithSlots: 3 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ | class | @@ -125,7 +127,7 @@ VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -144,7 +146,7 @@ VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ ^ oop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ^ memory @@ -152,7 +154,7 @@ VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ^ memory @@ -160,7 +162,7 @@ VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ^ memory @@ -168,7 +170,7 @@ VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #running } +{ #category : 'running' } VMSpurInitializedOldSpaceTest >> setUp [ super setUp. @@ -178,7 +180,7 @@ VMSpurInitializedOldSpaceTest >> setUp [ memory classByteArray: (self newClassInOldSpaceWithSlots: 0 instSpec: (memory byteFormatForNumBytes: 0)). ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> smallerNodeOf: aNode [ ^ memory diff --git a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st index 8019a6749c..a63471fcdc 100644 --- a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSpurMemoryManagerTest, - #superclass : #ParametrizedTestCase, + #name : 'VMSpurMemoryManagerTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'memory', 'interpreter', @@ -24,10 +24,12 @@ Class { 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> imageFormatParameters [ ^ { @@ -36,13 +38,13 @@ VMSpurMemoryManagerTest class >> imageFormatParameters [ } ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> testParameters [ ^ self wordSizeParameters * self imageFormatParameters ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -50,7 +52,7 @@ VMSpurMemoryManagerTest class >> wordSizeParameters [ yourself ] -{ #category : #configuring } +{ #category : 'configuring' } VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ environmentBuilder @@ -62,7 +64,7 @@ VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ primitiveTraceLogSize: self primitiveTraceLogSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createActiveProcess [ | processorOopAssociation processorOop processorListsArray priorities | @@ -84,7 +86,7 @@ VMSpurMemoryManagerTest >> createActiveProcess [ memory storePointer: ActiveProcessIndex ofObject: processorOop withValue: (self newArrayWithSlots: 4). ] -{ #category : #initialization } +{ #category : 'initialization' } VMSpurMemoryManagerTest >> createArrayClass [ | ourArrayClass | @@ -102,7 +104,7 @@ VMSpurMemoryManagerTest >> createArrayClass [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createEphemeronClass [ ourEphemeronClass := self newObjectWithSlots: 3. memory @@ -112,7 +114,7 @@ VMSpurMemoryManagerTest >> createEphemeronClass [ memory ensureBehaviorHash: ourEphemeronClass. ] -{ #category : #utils } +{ #category : 'utils' } VMSpurMemoryManagerTest >> createLargeIntegerClasses [ | classLargeInteger classLargeNegativeInteger | @@ -133,7 +135,7 @@ VMSpurMemoryManagerTest >> createLargeIntegerClasses [ withValue: classLargeNegativeInteger. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ | methodOop | @@ -143,7 +145,7 @@ VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ ^ methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> createWeakArrayClass [ ourWeakClass := self newObjectWithSlots: 3. memory @@ -154,43 +156,43 @@ VMSpurMemoryManagerTest >> createWeakArrayClass [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> emptyObjectSize [ "It is the header plus a word, padded to 8 bytes alignment" ^ self objectHeaderSize + "memory wordSize" 8 ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageReaderClass [ ^ imageReaderClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageReaderClass: anObject [ imageReaderClass := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageWriterClass [ ^ imageWriterClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> imageWriterClass: anObject [ imageWriterClass := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> initialCodeSize [ ^ 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializationOptions [ ^ { @@ -204,7 +206,7 @@ VMSpurMemoryManagerTest >> initializationOptions [ imageWriterClass name } ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ | ourArrayClass | @@ -226,7 +228,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ memory flushNewSpace. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ | freeListOop firstClassTablePage | @@ -290,7 +292,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ self deny: memory needGCFlag ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> initializeSpecialSelectors [ | specialSelectorsArrayOop | @@ -306,7 +308,7 @@ VMSpurMemoryManagerTest >> initializeSpecialSelectors [ memory splObj: SpecialSelectors put: specialSelectorsArrayOop ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMSpurMemoryManagerTest >> installFloat64RegisterClass [ | registerClass | @@ -325,7 +327,7 @@ VMSpurMemoryManagerTest >> installFloat64RegisterClass [ ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMSpurMemoryManagerTest >> installFloatClass [ | classFloat | @@ -341,52 +343,52 @@ VMSpurMemoryManagerTest >> installFloatClass [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" ] -{ #category : #accessor } +{ #category : 'accessor' } VMSpurMemoryManagerTest >> interpreter [ ^ interpreter ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> interpreterClass [ ^ StackInterpreterSimulatorLSB ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable1: anOop [ interpreter newMethod: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable2: anOop [ interpreter profileSemaphore: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable3: anOop [ interpreter profileMethod: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable1 [ ^ interpreter newMethod ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable2 [ ^ interpreter profileSemaphore ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable3 [ ^ interpreter profileMethod ] -{ #category : #accessor } +{ #category : 'accessor' } VMSpurMemoryManagerTest >> memory [ ^ memory ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> memoryClass [ ^ self wordSize = 4 @@ -394,13 +396,13 @@ VMSpurMemoryManagerTest >> memoryClass [ ifFalse: [ Spur64BitMemoryManager ] ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new16BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 2 format: memory firstShortFormat ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ | indexable | @@ -410,13 +412,13 @@ VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ ^ indexable ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new32BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 4 format: memory firstLongFormat ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ | indexable | @@ -426,31 +428,31 @@ VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ ^ indexable ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new64BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 8 format: memory sixtyFourBitIndexableFormat ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new8BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 1 format: memory firstByteFormat ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots [ ^ self newArrayWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: memory arrayFormat classIndex: anIndex ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSlot format: format [ | padding numberOfWordSizeSlots desiredByteSize | @@ -463,7 +465,7 @@ VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSl classIndex: self nextOrdinaryClassIndex ] -{ #category : #asd } +{ #category : 'asd' } VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ | oop | @@ -481,7 +483,7 @@ VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ ^ oop ] -{ #category : #'helpers - classes' } +{ #category : 'helpers - classes' } VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: format [ | newClass formatWithSlots | @@ -499,7 +501,7 @@ VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: ^ newClass ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -510,7 +512,7 @@ VMSpurMemoryManagerTest >> newEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arguments [ | method methodHeader | @@ -531,13 +533,13 @@ VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arg ^ method ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots [ ^ self newObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ | format | @@ -548,7 +550,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: format classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -560,7 +562,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: ^ oop ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -579,7 +581,7 @@ VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ ^ oop ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ ^ self @@ -587,13 +589,13 @@ VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots [ ^ self newOldSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -605,7 +607,7 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -617,13 +619,13 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat cla ^ oop ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentObjectWithSlots: slots [ ^ self newPermanentSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -637,7 +639,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: a classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -649,7 +651,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aForm ^ oop ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -695,7 +697,7 @@ VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newString: aString [ | vmString | @@ -714,7 +716,7 @@ VMSpurMemoryManagerTest >> newString: aString [ ^ vmString ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ ^ self @@ -723,7 +725,7 @@ VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ classIndex: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newZeroSizedObject [ ^ memory @@ -732,7 +734,7 @@ VMSpurMemoryManagerTest >> newZeroSizedObject [ classIndex: self zeroSizedObjectClassIndex. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ^ nextIndex @@ -740,18 +742,18 @@ VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ifNotNil: [ nextIndex := nextIndex + 1 ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> objectHeaderSize [ ^ memory baseHeaderSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> primitiveTraceLogSize [ ^ 0 ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ | aClass | aClass := self @@ -764,7 +766,7 @@ VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ withValue: aClass ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ | aClass | aClass := self @@ -777,7 +779,7 @@ VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ | class | @@ -801,7 +803,7 @@ VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUp [ super setUp. @@ -828,7 +830,7 @@ VMSpurMemoryManagerTest >> setUp [ memory lastHash: 1. ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUpScheduler [ "The ScheduleAssocation should be initialized to a valid Processor object" @@ -856,7 +858,7 @@ VMSpurMemoryManagerTest >> setUpScheduler [ memory memoryActiveProcess: activeProcessOop. ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUpUsingImage [ "/!\ Only runnable with a wordsize equals to your image's (needs disabling parametizing of wordsize) /!\" @@ -889,25 +891,25 @@ VMSpurMemoryManagerTest >> setUpUsingImage [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> sizeOfObjectWithSlots: slots [ ^ self objectHeaderSize + ((slots min: 1 "at least one for the forwarder pointer") * memory wordSize "bytes") ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> wordSize [ ^ wordSize ifNil: [ 8 ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> wordSize: aWordSize [ wordSize := aWordSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> zeroSizedObjectClassIndex [ ^ zeroSizedObjectClassIndex ifNil: [ self nextOrdinaryClassIndex ] diff --git a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st index db41fee015..2617ab3f77 100644 --- a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurNewSpaceStructureTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurNewSpaceStructureTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> fillEden [ "Allocate enough objects to fill the eden." @@ -13,7 +15,7 @@ VMSpurNewSpaceStructureTest >> fillEden [ do: [ :index | self newZeroSizedObject ] ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject [ | freeStartBefore | @@ -24,7 +26,7 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAfterObject [ | freeStartBefore | @@ -35,38 +37,38 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAft self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenEndIsAtTheStartOfOldSpace [ self assert: memory scavenger eden limit equals: memory getMemoryMap newSpaceEnd ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenIsRestOfNewSpace [ self assert: memory scavenger eden size > (environmentBuilder newSpaceSize - memory scavenger pastSpace size - memory scavenger futureSpace size - interpreter interpreterAllocationReserveBytes) ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFreeStartIsEdenStart [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceEndIsAtTheStartOfEden [ self assert: memory scavenger futureSpace limit equals: memory scavenger eden start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger futureSpace size equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceStart [ "The future survivor start indicates during the execution of the scavenger, where the next free space in future space starts." @@ -74,13 +76,13 @@ VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceSt self assert: memory scavenger futureSurvivorStart equals: memory scavenger futureSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceEndIsAtTheStartOfFutureSpace [ self assert: memory scavenger pastSpace limit equals: memory scavenger futureSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart [ " - pastSpaceStart points to where the free space in the past space starts => it **does** move @@ -89,19 +91,19 @@ VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsAtTheStartOfNewSpace [ self assert: memory scavenger pastSpace start equals: memory getMemoryMap newSpaceStart ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger pastSpaceBytes equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ "Allocate enough objects to fill the eden." @@ -115,7 +117,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ self assert: error messageText equals: 'no room in eden for allocateNewSpaceSlots:format:classIndex:' ] ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ | futureSpaceStartBefore | @@ -125,7 +127,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ self assert: memory scavenger futureSurvivorStart equals: futureSpaceStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ | pastSpaceStartBefore | @@ -135,7 +137,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ self assert: memory pastSpaceStart equals: pastSpaceStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -146,7 +148,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ self assert: oop equals: freeStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -157,7 +159,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeade self assert: oop equals: freeStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testScavengeThresholdIsInsideTheEden [ self assert:(memory scavengeThreshold diff --git a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st index 9eb2876f3f..04a758a911 100644 --- a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurObjectAllocationTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurObjectAllocationTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ | oldFreeStart | @@ -14,7 +16,7 @@ VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ self assert: memory freeStart > oldFreeStart ] -{ #category : #tests } +{ #category : 'tests' } VMSpurObjectAllocationTest >> testAllocateObjectInOldSpaceMovesFreeStart [ | oldFreeStart | diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st index 2e6576bb9a..b86ff4e514 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurOldSpaceBootstrapTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceBootstrapTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ | tableRoot | @@ -29,7 +31,7 @@ VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ equals: memory classTableRootSlots + memory hiddenRootSlots ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ | freeListOop | @@ -38,7 +40,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ self assert: (memory numSlotsOf: freeListOop) equals: memory numFreeLists ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ | freeListOop | @@ -47,7 +49,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ self assert: (memory formatOf: freeListOop) equals: memory wordIndexableFormat ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ | freeListOop | @@ -57,14 +59,14 @@ VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ self assert: (memory fetchPointer: i ofObject: freeListOop) equals: 0 ] ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid [ memory initializeFreeList. memory validFreeTree ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid2 [ memory initializeFreeList. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index 0830123f51..2aedf2f4cf 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -1,18 +1,20 @@ Class { - #name : #VMSpurOldSpaceGarbageCollectorTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurOldSpaceGarbageCollectorTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'objectStackLimit' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #assertion } +{ #category : 'assertion' } VMSpurOldSpaceGarbageCollectorTest >> assertHashOf: anOop equals: aHash [ self assert: (memory hashBitsOf: anOop) equals: aHash ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ | initialSpace lastObjectToBeRemembered sizeOfLastObject | "The planning compactor frees object by sliding, and therefore does not reclaim memory if there is only dead objects in the oldspace." @@ -33,34 +35,34 @@ VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ ^ initialSpace - sizeOfLastObject - memory totalFreeListBytes ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> initializationOptions [ ^ super initializationOptions , { #ObjStackPageSlots . objectStackLimit } ] -{ #category : #testing } +{ #category : 'testing' } VMSpurOldSpaceGarbageCollectorTest >> isValidFirstBridge [ ^ memory segmentManager isValidSegmentBridge: (memory segmentManager bridgeAt: 0) ] -{ #category : #running } +{ #category : 'running' } VMSpurOldSpaceGarbageCollectorTest >> runCaseManaged [ ^ self runCase ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> setUp [ objectStackLimit := 10. super setUp. ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpace [ | anObjectOop slotsNumber | @@ -71,7 +73,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: anObjectOop isNil ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpaceShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -82,7 +84,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: memory needGCFlag ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFreeChunk [ | chuckSize chunk next object free | @@ -117,7 +119,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFr self assert: (memory isFreeObject: free). ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ | anObjectOop slotsNumber | @@ -128,7 +130,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ self assert: anObjectOop isNotNil ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldBeZero [ | anObjectOop slotsNumber | @@ -139,7 +141,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldB self assert: memory totalFreeOldSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -150,7 +152,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldP self assert: memory needGCFlag ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollected [ | deltaFreeSpace | @@ -160,7 +162,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollec self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShouldBeCollected [ | deltaFreeSpace | @@ -173,7 +175,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShou self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPermObjectShouldBeKept [ | oldObjectSize deltaFreeSpace | @@ -186,7 +188,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPer self assert: deltaFreeSpace equals: oldObjectSize ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedCycleObjectShouldBeCollected [ | deltaFreeSpace | @@ -200,7 +202,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedC self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeKept [ | oldOop objectSize deltaFreeSpace | @@ -214,7 +216,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assert: deltaFreeSpace equals: objectSize ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeMoved [ | anObjectOop hash | @@ -233,7 +235,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assertHashOf: self keptObjectInVMVariable1 equals: hash ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantained [ | deltaFreeSpace arrayOfPerms objectsSize aPermObject anOldObject originalRememberedSetSize afteRememberedSetSize numberOfObjects originalNewRememberedSetSize afteNewRememberedSetSize | @@ -260,7 +262,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: deltaFreeSpace equals: objectsSize + (afteRememberedSetSize - originalRememberedSetSize) + (afteNewRememberedSetSize - originalNewRememberedSetSize) ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantainedWhenObjectsMoved [ | numberOfObjects originalHashes permArray anOldObject | @@ -283,7 +285,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: (originalHashes at: i) equals: (memory hashBitsOf: (memory fetchPointer: i - 1 ofObject: permArray))] ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ | ephemeron | @@ -305,7 +307,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ | ephemeron | @@ -335,7 +337,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ memory fullGC. @@ -346,7 +348,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ self deny: (memory isFreeObject: (memory freeListsObj)). ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ | obj1 obj2 obj3 arrFrom arrTo arrFrom2 arrTo2 | @@ -378,7 +380,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ self assert: (memory isRemembered: arrTo2). ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ | roots ephemeron1 ephemeron2 ephemeron3 key1 key2 key3 | @@ -441,7 +443,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -479,7 +481,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQue equals: numberJustOverLimit ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail [ | ephemeron1 key | @@ -497,7 +499,39 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] -{ #category : #tests } +{ #category : 'testCompactor' } +VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ + + | ephemeronObjectOopOne ephemeronObjectOopTwo nonEphemeronObjectOop | + "set up" + memory initializeMournQueue. + self createEphemeronClass. + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOop := self newOldSpaceObjectWithSlots: 0. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOop. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOop. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect non ephemeron object" + memory fullGC. + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ | freespace freespace2 slotsNumber anObjectOop | @@ -518,7 +552,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ self assert: freespace equals: memory totalFreeOldSpace. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ | roots keyObj ephemeronObj | @@ -537,7 +571,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ self assert: memory dequeueMourner equals: nil. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ | roots keyObj ephemeronObj keyObj2 ephemeronObj2 | @@ -564,7 +598,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ self assert: memory dequeueMourner equals: nil. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -602,7 +636,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ equals: numberJustOverLimit ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronAsKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -617,7 +651,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronA memory fullGC ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -631,7 +665,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemer memory fullGC ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -648,7 +682,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEph memory fullGC ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testPageLimitMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st index 33212d0b85..11d8661998 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMSpurOldSpaceStructureTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceStructureTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceShouldHaveOneSegment [ self assert: memory segmentManager numSegments equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSameSizeAsOldSpace [ self @@ -18,7 +20,7 @@ VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSam equals: memory oldSpaceSize ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSizeShouldBeAskedMemory [ self assert: memory oldSpaceSize equals: oldSpaceSize diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st index b923eade30..131ffcdd73 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurOldSpaceTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ memory allocateOldSpaceChunkOfBytes: memory totalFreeListBytes. @@ -12,7 +14,7 @@ VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ self assert: memory totalFreeListBytes equals: 0 ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self createFreeChunkOfSize: 120. @@ -24,7 +26,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: 24) ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists [ self createFreeChunkOfSize: 120. @@ -36,7 +38,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists self assertFreeListEmpty: (self freeListForSize: 120) ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ | smallerAddress newAddress | @@ -49,7 +51,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ self assert: newAddress equals: smallerAddress ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self createFreeChunkOfSize: 120. @@ -61,7 +63,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self denyFreeListEmpty: (self freeListForSize: 160) ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ | someBytes freeBytesBefore | @@ -72,7 +74,7 @@ VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ self assert: memory totalFreeListBytes equals: freeBytesBefore - someBytes ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ | secondAddress newAddress | @@ -83,7 +85,7 @@ VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ self deny: newAddress equals: secondAddress ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self createFreeChunkOfSize: 160. @@ -95,7 +97,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self denyFreeListEmpty: (self freeListForSize: 200) ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ | secondAddress | @@ -106,7 +108,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ self assert: (self freeListForSize: 160) equals: 0 ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ | secondAddress newAddress | @@ -116,7 +118,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ self assert: newAddress equals: secondAddress ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ memory allocateOldSpaceChunkOfBytes: (memory bytesInObject: self freeTreeRootOop). @@ -124,7 +126,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ self assert: self freeTreeRootOop equals: 0 ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -135,7 +137,7 @@ VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ | size childAddress smallerChildOop largerChildOop aBitBiggerThanHalf | @@ -154,7 +156,7 @@ VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ self assert: (memory bytesInObject: largerChildOop) equals: aBitBiggerThanHalf ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ | freeRootOopBeforeAllocation | @@ -165,7 +167,7 @@ VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ self deny: freeRootOopBeforeAllocation equals: self freeTreeRootOop ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ "Allocation should be contiguous because we have a single big chunk of memory to take memory from" @@ -176,7 +178,7 @@ VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ | address | @@ -185,7 +187,7 @@ VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ self assert: address isNil ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRoot [ | leftOverSize | @@ -195,7 +197,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRo self assert: (memory bytesInObject: self freeTreeRootOop) equals: leftOverSize ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList [ | leftOverSize | @@ -205,7 +207,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -218,7 +220,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ | sizeToAllocate powerOfSizeToAllocate leftOverSize | @@ -231,7 +233,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ | sizeToAllocate powerOfSizeToAllocate nonMultipleAddress newAddress | @@ -253,7 +255,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ self deny: newAddress equals: nonMultipleAddress. ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ | sizeToAllocate powerOfSizeToAllocate | @@ -265,7 +267,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ self assertFreeListEmpty: (self freeListForSize: powerOfSizeToAllocate) ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ | sizeToAllocate freeMultipleAddress newAddress powerOfSizeToAllocate | @@ -277,7 +279,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ self assert: newAddress equals: freeMultipleAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ | secondAddress newAddress | @@ -288,7 +290,7 @@ VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ self assert: newAddress equals: secondAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ | secondAddress thirdAddress | @@ -299,7 +301,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ self assert: secondAddress < thirdAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ | freeChunkStartAddress allocatedSize | @@ -311,7 +313,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ equals: freeChunkStartAddress + allocatedSize ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted [ | freeChunkStartAddressBeforeAllocation allocatedAddress | @@ -322,7 +324,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted equals: freeChunkStartAddressBeforeAllocation ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ | firstAddress byteSize smallerNodeOop | @@ -335,7 +337,7 @@ VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ self assert: smallerNodeOop equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian [ | newAddress freeLargeSpaceAddressBeforeAllocation freeAddress | @@ -349,7 +351,7 @@ VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian self assert: newAddress equals: freeLargeSpaceAddressBeforeAllocation ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ | smallerChild freeTreeRoot parentNode | @@ -362,7 +364,7 @@ VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ self assert: parentNode equals: freeTreeRoot ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ | freeTreeRoot size child1 child2 nextChildOop child3 siblingOop previousOop | @@ -389,7 +391,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ self assert: previousOop equals: nextChildOop. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ | freeTreeRoot size child1 child2 nextChildOop child3 largerOop largerThanSmaller siblingOop | @@ -421,7 +423,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ self assert: largerOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ | freeTreeRoot size child1 child2 nextChild child3 parentOop | @@ -448,7 +450,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ self assert: parentOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ | freeTreeRoot size child1 child2 nextChildOop child3 smallerOop smallerThanSmaller siblingOop | @@ -480,7 +482,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ self assert: smallerOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ | freeRoot address | @@ -492,7 +494,7 @@ VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ self assert: freeRoot equals: (memory freeLists at: 0) ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead [ | smallerChild freeTreeRoot size child1 child2 nextChild child3 | @@ -514,7 +516,7 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead self assert: nextChild equals: child2. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ | smallerChild freeTreeRoot size child1 child2 nextChild | @@ -532,13 +534,13 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ self assert: nextChild equals: child2. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testFalseObjectIsNotAnArray [ self deny: (memory isArray: memory falseObject). ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ | firstAddress secondAddress freeListHead chunkSize | chunkSize := 32. @@ -552,7 +554,7 @@ VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ self assert: freeListHead equals: secondAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ | secondAddress | @@ -562,7 +564,7 @@ VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ self assert: memory allFreeObjects size equals: 2 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize | allocationSize := 32. @@ -578,7 +580,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ self assert: nextFreeChunk equals: firstAddress ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize previousFreeChunk | allocationSize := 32. @@ -595,7 +597,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ self assert: previousFreeChunk equals: freeListHead ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChunks [ | secondAddress newAddress | @@ -607,7 +609,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChu self assert: memory allFreeObjects size equals: 3 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ | secondAddress allocationSize firstAddress | allocationSize := 32. @@ -620,7 +622,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ self assert: memory allFreeListHeads size equals: 1 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ | firstAddress freeListHead | @@ -636,7 +638,7 @@ VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ ] ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ 2 to: memory numFreeLists - 1 do: [ :numberOfSlots | @@ -646,7 +648,7 @@ VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ ] ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ | bigChunk nextNode | @@ -656,7 +658,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ | bigChunk nextNode | @@ -666,7 +668,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ | bigChunk nextNode | @@ -676,7 +678,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ | bigChunk nextNode | @@ -686,7 +688,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ | bigChunk nextNode | @@ -696,13 +698,13 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootIsFreeObject [ self assert: (memory isFreeObject: self freeTreeRootOop) ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ self @@ -710,7 +712,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ equals: memory totalFreeListBytes ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ | firstAddress byteSize smallerNodeOop | @@ -723,7 +725,7 @@ VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ self assert: (memory startOfObject: smallerNodeOop) equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop | @@ -744,7 +746,7 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ self assert: (memory startOfObject: largerChildOop) equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop parentNodeOop | @@ -766,13 +768,13 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ self assert: parentNodeOop equals: newRoot ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testNewMemoryShouldHaveSingleFreeObject [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ | oop | @@ -781,19 +783,19 @@ VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ self assert: (memory getMemoryMap isOldObject: oop) ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectIsNotAnArray [ self deny: (memory isArray: memory nilObject). ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectObjectFormatIsZero [ self assert: (memory formatOf: memory nilObject) equals: 0. ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFreeList [ | secondAddress freeChunksBefore | @@ -806,7 +808,7 @@ VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFr self assert: memory allFreeObjects size equals: freeChunksBefore. ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ | secondAddress | @@ -817,7 +819,7 @@ VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -829,7 +831,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ self assert: (self nextNodeOf: freeListHead) equals: 0 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -841,7 +843,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ self assert: (self previousNodeOf: freeListHead) equals: 0 ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ | smallerChild freeTreeRoot parentNode smallerSize rootSize | @@ -858,7 +860,7 @@ VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ self assert: parentNode equals: freeTreeRoot ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testTrueObjectIsNotAnArray [ self deny: (memory isArray: memory trueObject). diff --git a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st index 674b31f591..dd5b734300 100644 --- a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurRememberedSetTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurRememberedSetTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests - from old to new' } +{ #category : 'tests - from old to new' } VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ | oldObjectAddress rememberedObjectAddress | @@ -22,7 +24,7 @@ VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ ] -{ #category : #'tests - from old to perm' } +{ #category : 'tests - from old to perm' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNewRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -40,7 +42,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNew ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress referencedOldObjectAddress | @@ -63,7 +65,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberP ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOldRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -82,7 +84,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOld ] -{ #category : #'tests - from perm to new' } +{ #category : 'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRememberedToo [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -99,7 +101,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRemembered ] -{ #category : #'tests - from perm to new' } +{ #category : 'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRememberedSet [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -117,7 +119,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRem ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ | oldObjectAddress | @@ -126,7 +128,7 @@ VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ | oldObjectRootAddress originalLimit youngObjectAddress | @@ -156,7 +158,7 @@ VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ self assert: memory getFromOldSpaceRememberedSet rememberedSetLimit equals: originalLimit * 2 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone [ | oldObjectAddress storedOldObjectAddress | @@ -170,7 +172,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: storedOldObjectAddress). ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress | @@ -186,7 +188,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObjec self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyone [ | oldObjectAddress youngObjectAddress | @@ -200,7 +202,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyon self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #'tests - from old to perm' } +{ #category : 'tests - from old to perm' } VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone [ | permObjectAddress oldObjectAddress | @@ -214,7 +216,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #'tests - from perm to perm' } +{ #category : 'tests - from perm to perm' } VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyone [ | permObjectAddress referencedPermObjectAddress | @@ -228,7 +230,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyon self deny: (memory isRemembered: referencedPermObjectAddress). ] -{ #category : #'tests - from new to perm' } +{ #category : 'tests - from new to perm' } VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyone [ | permObjectAddress youngObjectAddress | @@ -242,7 +244,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyo self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress youngObjectAddress | @@ -267,7 +269,7 @@ VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberP ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObject [ | oldObjectAddress youngObjectAddress | @@ -281,7 +283,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObjec self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObject [ | permObjectAddress youngObjectAddress | @@ -295,7 +297,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObj self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAnyone [ | youngObjectAddress storedYoungObjectAddress | @@ -309,7 +311,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAny self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testYoungObjectIsNotRemembered [ | newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st index 665359f03f..634ab1b369 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurScavengeEphemeronTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengeEphemeronTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #initialization } +{ #category : 'initialization' } VMSpurScavengeEphemeronTest >> setUp [ super setUp. @@ -12,7 +14,7 @@ VMSpurScavengeEphemeronTest >> setUp [ self createEphemeronClass ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmptyMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -32,7 +34,7 @@ VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmpty self assert: memory dequeueMourner equals: nil ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ | numberOfEphemerons ephemeronKey | @@ -68,7 +70,7 @@ VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ withValue: memory nilObject ] ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeronClass [ | ephemeronObjectOop | @@ -79,7 +81,7 @@ VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeron equals: ourEphemeronClass ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -102,7 +104,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalO equals: memory nonIndexablePointerFormat ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -123,7 +125,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -150,7 +152,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -179,7 +181,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSu equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -200,7 +202,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAft equals: memory nonIndexablePointerFormat ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -219,7 +221,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -241,7 +243,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -265,7 +267,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorSho equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInEden [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -296,7 +298,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInPastSpace [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -338,7 +340,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlyOneEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -370,7 +372,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: nil ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlySecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -400,7 +402,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldBeQueuedAfterConsumingMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -438,7 +440,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldLeaveFirstOneAsEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -468,7 +470,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: (memory isEphemeron: ephemeronObjectOop) ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldScavengeKeyOfSecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -500,7 +502,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi equals: (memory remapObj: nonEphemeronObjectOop) ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeZeroSizedEphemeronShouldTreatItAsNormalObject [ | ephemeronObjectOop zeroSizedEphemeronClass hashBefore addressBefore | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st index ae428a6af8..56c08746b3 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurScavengeWeakTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengeWeakTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'test-format' } +{ #category : 'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ | weakObjectOop | @@ -14,7 +16,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ self assert: (memory fetchClassOfNonImm: weakObjectOop) equals: ourWeakClass ] -{ #category : #'test-format' } +{ #category : 'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ | weakObjectOop classIndex | @@ -26,7 +28,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ self assert: classIndex equals: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash nilHash | @@ -50,7 +52,7 @@ VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldB equals: nilHash ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nilHash | @@ -70,7 +72,7 @@ VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNi equals: nilHash ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingSurvivorShouldLeaveWeakObjectAsIs [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st index 94f56ee281..08ac1152d9 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st @@ -1,17 +1,19 @@ Class { - #name : #VMSpurScavengerTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengerTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #asserting } +{ #category : 'asserting' } VMSpurScavengerTest >> assertPastSpaceIsEmpty [ self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurScavengerTest >> fullNewSpace [ | rootObjectAddress referencedObjectAddress freeStartAtBeginning | @@ -37,7 +39,7 @@ VMSpurScavengerTest >> fullNewSpace [ self error: 'New space is not full!' ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop receiver: aReceiverOop args: argsOops andStack: stackOops [ | page pointer | @@ -85,7 +87,7 @@ VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop withValue: (memory coInterpreter withSmallIntegerTags: page baseFP) ] ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScavenge [ | times | @@ -97,7 +99,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScaveng self deny: memory needGCFlag ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ | times anObjectOop | @@ -108,7 +110,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ self assert: (memory getMemoryMap isYoungObject: anObjectOop) ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ | times anObject | @@ -126,7 +128,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ self assert: (memory getMemoryMap isOldObject: anObject) ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge [ | times | @@ -144,7 +146,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge self assert: memory needGCFlag ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -165,7 +167,7 @@ VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ | rootObjectAddress | @@ -181,7 +183,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0 "Past space keep not full -> Not tenure next pass" ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ | rootObjectAddress | @@ -196,7 +198,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0.1 "Past space is full -> Tenure next pass" ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -219,7 +221,7 @@ VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -238,7 +240,7 @@ VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -257,7 +259,7 @@ VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -276,7 +278,7 @@ VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -295,7 +297,7 @@ VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -314,7 +316,7 @@ VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -336,7 +338,7 @@ VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ | rootObjectAddress newRootObjectAddress referencedObjectAddress referencedObjectHash | @@ -359,7 +361,7 @@ VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ equals: referencedObjectHash ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -379,7 +381,7 @@ VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress maybeMappedReferenceToYoungObject | @@ -399,7 +401,7 @@ VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterS self assert: maybeMappedReferenceToYoungObject equals: newRememberedObjectAddress ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferencedObjectIsInTheOldSpace [ | permObjectAddress youngObject otherOldObjectAddress | @@ -426,7 +428,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferenced ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceWhenMutatedToPointAPermObject [ | permObjectAddress youngObject otherPermObjectAddress | @@ -450,7 +452,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceW ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -470,7 +472,7 @@ VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ | rootObjectAddress rootObjectHash newRootObjectAddress referencedObjectAddress referencedObjectHash newReferencedObjectAddress | @@ -493,7 +495,7 @@ VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ self assert: (memory hashBitsOf: newReferencedObjectAddress) equals: referencedObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ | youngObjectAddress oneOldObjectAddress otherOldObjectAddress | @@ -518,7 +520,7 @@ VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces [ | oldPastSpaceStart oldFutureSpaceStart | @@ -531,7 +533,7 @@ VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces self assert: memory scavenger futureSpace start equals: oldPastSpaceStart. ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ "Nil should survive." "A new object not referenced should not survive." @@ -542,7 +544,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPastSpace [ "Only Nil should survive." @@ -554,7 +556,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPast self assertPastSpaceIsEmpty ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -579,7 +581,7 @@ VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBefo self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -604,7 +606,7 @@ VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInS self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -621,7 +623,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVar self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -638,7 +640,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObject self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ "Nil should survive. It is referenced by the roots because many of their slots are nilled." @@ -647,7 +649,7 @@ VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ memory doScavenge: 1 "TenureByAge". @@ -655,7 +657,7 @@ VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAndForth [ | oldPastSpaceStart oldFutureSpaceStart | @@ -668,7 +670,7 @@ VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAnd self assert: memory scavenger futureSpace start equals: oldFutureSpaceStart. ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder [ | rootObjectAddress objectThatShouldGoSecond objectThatShouldGoFirst | @@ -686,7 +688,7 @@ VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder self assert: (memory remapObj: objectThatShouldGoFirst) < (memory remapObj: objectThatShouldGoSecond) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects [ | firstRootObjectAddress nonRootObjectAddress secondRootObjectAddress | @@ -704,7 +706,7 @@ VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects self assert: (memory remapObj: secondRootObjectAddress) < (memory remapObj: nonRootObjectAddress) ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ | firstObjectAddress secondObjectAddress | @@ -736,7 +738,7 @@ VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ | rootObjectAddress newRootObjectAddress | @@ -760,7 +762,7 @@ VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ self assert: (memory isInOldSpace: newRootObjectAddress) ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ | objectA objectB | objectA := self newObjectWithSlots: 1. @@ -779,7 +781,7 @@ VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ | unreferencedRootObjectAddress referencedObjectAddress | unreferencedRootObjectAddress := self newObjectWithSlots: 1. @@ -794,7 +796,7 @@ VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -812,7 +814,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanve self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurviveScanvenge [ | permObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -830,7 +832,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurvive self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testYoungObjectsFromPermanentSpaceAreRemapped [ | newObjectOop newObjectHash permObject newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st index 3b597fa124..6c7bc93c59 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMSpurTreeAllocationStrategyForLargeTreeTest, - #superclass : #VMSpurTreeAllocationStrategyForSmallTreeTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurTreeAllocationStrategyForLargeTreeTest', + #superclass : 'VMSpurTreeAllocationStrategyForSmallTreeTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ " 1120 @@ -52,7 +54,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -60,7 +62,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWit self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -68,7 +70,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -76,7 +78,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWithChildrenShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -84,7 +86,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWit self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -92,7 +94,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTree self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -102,7 +104,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTree self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -110,7 +112,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTree self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -118,7 +120,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeN self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -128,7 +130,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeN self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -136,7 +138,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeN self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -144,7 +146,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSm self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -154,7 +156,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSm self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -162,7 +164,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSm self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -170,7 +172,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSma self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -179,7 +181,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSma self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSmallerLeafTreeNodeShouldShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -187,7 +189,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSma self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -195,7 +197,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLa self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -205,7 +207,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLa self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -213,7 +215,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLa self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. @@ -221,7 +223,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLar self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -231,7 +233,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLar self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test37AllocateBestFitLargerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st index 8fe74cb50a..4340d04dd7 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMSpurTreeAllocationStrategyForSmallTreeTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurTreeAllocationStrategyForSmallTreeTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationStrategyForSmallTreeTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUp [ super setUp. self setUpTree. ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ " 560 @@ -61,13 +63,13 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationStrategyForSmallTreeTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -75,7 +77,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithC self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 8. @@ -84,7 +86,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliput self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -92,7 +94,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -103,7 +105,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1152 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -111,7 +113,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRootAddress [ | desiredAddress allocatedAddress | @@ -121,7 +123,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2). @@ -129,7 +131,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNo self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseLargestSmallerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 8. @@ -138,7 +140,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -148,7 +150,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNo self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -159,7 +161,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1088 - allocatedSize) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3). @@ -167,7 +169,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNod self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseSmallerThanRootAddress [ | desiredAddress allocatedAddress | @@ -177,7 +179,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -187,7 +189,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNod self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldUseIntermediateNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -197,7 +199,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4). @@ -205,7 +207,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmal self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | allocatedSize := (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -215,7 +217,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1056 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -225,7 +227,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmal self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldUseRootNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 8. @@ -235,7 +237,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanL self assert: (memory bytesInObject: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 3) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5). @@ -243,7 +245,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmall self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -254,7 +256,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanL self denyFreeListEmpty: (self freeListForSize: 1120 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -263,7 +265,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmall self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldUseLargestLeafNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 8. @@ -272,7 +274,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6). @@ -280,7 +282,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLarg self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -292,7 +294,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1216 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -302,7 +304,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLarg self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldUseIntermediateLargerNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 8. @@ -311,7 +313,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7). @@ -319,7 +321,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLarge self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -331,7 +333,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1184 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -341,7 +343,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLarge self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateSmallerThanLiliputianDiffFromLargestLeaShouldFindNoMemory [ self assert: (memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 8) equals: nil diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st index de185856c6..09933d96de 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMSpurTreeAllocationWithBigNodesTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurTreeAllocationWithBigNodesTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationWithBigNodesTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationWithBigNodesTest >> setUp [ " Allocate a tree that has a large child large enough so a remainder could still be larger than the root @@ -45,13 +47,13 @@ VMSpurTreeAllocationWithBigNodesTest >> setUp [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationWithBigNodesTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: 16. @@ -60,7 +62,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShould self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: 1008 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShouldBeInsertedInLarger [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) + 16. @@ -69,7 +71,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShou self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: 4080 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test03LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) * 2 + 16. diff --git a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st index 03868c02d3..bd476b58e7 100644 --- a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st @@ -27,23 +27,25 @@ Types are not the exact types used. " Class { - #name : #VMStackBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMStackBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'page', 'frames', 'args', 'methodBuilder' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #frames } +{ #category : 'frames' } VMStackBuilder >> addFrame: aFrame [ frames add: aFrame ] -{ #category : #frames } +{ #category : 'frames' } VMStackBuilder >> addNewFrame [ | frame | "'add' a new frame in the sense of an OrderedCollection, which will be iterated with #do: @@ -53,17 +55,17 @@ VMStackBuilder >> addNewFrame [ ^ frame "the frame is then configured by the caller" ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> args [ ^ args ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> args: anObject [ args := anObject ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> buildStack [ self createStackPage. self preparePage. @@ -72,7 +74,7 @@ VMStackBuilder >> buildStack [ ^ frames last ] -{ #category : #stack } +{ #category : 'stack' } VMStackBuilder >> createStackPage [ | sp | frames ifEmpty:[ self error ]. @@ -83,17 +85,17 @@ VMStackBuilder >> createStackPage [ interpreter stackPointer: sp. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> frames [ ^ frames ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> frames: anObject [ frames := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } VMStackBuilder >> initialize [ super initialize. frames := OrderedCollection new. "will be treated in reverse" @@ -103,35 +105,35 @@ VMStackBuilder >> initialize [ page := nil. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> lastFrame [ ^ frames last ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> methodBuilder [ ^ methodBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> methodBuilder: anObject [ methodBuilder := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> page [ ^ page ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> page: anObject [ page := anObject ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> preparePage [ "Page setup before the base frame" interpreter push: memory nilObject. "receiver" @@ -142,7 +144,7 @@ VMStackBuilder >> preparePage [ ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushAllButFirstFrames [ 2 to: frames size do: [ :anIndex | | aFrame | aFrame := frames at: anIndex. @@ -156,19 +158,19 @@ VMStackBuilder >> pushAllButFirstFrames [ ] ] -{ #category : #initialization } +{ #category : 'initialization' } VMStackBuilder >> pushArgs [ args do: [ :anArg | interpreter push: anArg ] ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushBaseFrame [ frames first previousFrameArgsSize: args size. self pushFrame: frames first. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushFrame: aFrame [ interpreter framePointer: interpreter stackPointer. @@ -178,18 +180,18 @@ VMStackBuilder >> pushFrame: aFrame [ page headSP: interpreter stackPointer. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushFrames [ self pushBaseFrame. self pushAllButFirstFrames. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMStackBuilder >> reset [ self initialize. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> setInterpreterVariables [ | lastFrame | interpreter setStackPageAndLimit: page. @@ -204,7 +206,7 @@ VMStackBuilder >> setInterpreterVariables [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> topFrame [ ^ frames last ] diff --git a/smalltalksrc/VMMakerTests/VMStackFrame.class.st b/smalltalksrc/VMMakerTests/VMStackFrame.class.st index ec06607f85..81b9be1e5e 100644 --- a/smalltalksrc/VMMakerTests/VMStackFrame.class.st +++ b/smalltalksrc/VMMakerTests/VMStackFrame.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMStackFrame, - #superclass : #Object, + #name : 'VMStackFrame', + #superclass : 'Object', #instVars : [ 'framePointer', 'interpreter' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^self new framePointer: anInteger; @@ -19,19 +21,19 @@ VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpre yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMStackFrame class >> virtualMachine: aVirtualMachine fp: anInteger [ ^ self newFramePointer: anInteger withInterpreter: aVirtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> bytecodeMethod [ ^ VMBytecodeMethod newOnInterpreter: interpreter methodOop: self method ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> caller [ | callerContext | @@ -65,41 +67,41 @@ VMStackFrame >> caller [ ^ VMContext newOnContext: callerContext withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> callerContext [ ^ interpreter frameCallerContext: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> callerFP [ ^ interpreter frameCallerFP: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> context [ ^VMContext newOnContext: (interpreter frameContext: framePointer) withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> description [ | selector | selector := interpreter findSelectorOfMethod: self methodOop. ^ interpreter stringOf: selector ] -{ #category : #accesing } +{ #category : 'accesing' } VMStackFrame >> framePointer: anInteger [ framePointer := anInteger ] -{ #category : #testing } +{ #category : 'testing' } VMStackFrame >> hasContext [ ^interpreter frameHasContext: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> instructionPointer [ ^ interpreter framePointer = framePointer @@ -107,50 +109,50 @@ VMStackFrame >> instructionPointer [ ifFalse: [ interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : #acccessing } +{ #category : 'acccessing' } VMStackFrame >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : #testing } +{ #category : 'testing' } VMStackFrame >> isMachineCodeFrame [ ^ interpreter isMachineCodeFrame: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> machineCodeMethod [ | methodSurrogate | methodSurrogate := interpreter cogMethodZone methodFor: self method. ^ VMMachineCodeMethod newOnInterpreter: interpreter cogMethodSurrogate: methodSurrogate ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> method [ ^ interpreter iframeMethod: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> methodOop [ ^ interpreter frameMethodObject: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> receiver [ ^ interpreter framePointer = framePointer ifTrue: [ interpreter receiver ] ifFalse: [ self halt. interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> sender [ ^ VMStackFrame newFramePointer:(interpreter frameCallerFP: framePointer) withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> sourceCode [ ^ self isMachineCodeFrame @@ -158,7 +160,7 @@ VMStackFrame >> sourceCode [ ifFalse: [ self bytecodeMethod disassemble ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> stack [ | stack currentFrame | stack := OrderedCollection new. @@ -169,7 +171,7 @@ VMStackFrame >> stack [ ^ stack ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> stackPage [ ^interpreter stackPages stackPageFor: framePointer. ] diff --git a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st index 4a73d7c65e..2e9960b95e 100644 --- a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st @@ -1,32 +1,34 @@ Class { - #name : #VMStackInterpreterTest, - #superclass : #TestCase, + #name : 'VMStackInterpreterTest', + #superclass : 'TestCase', #instVars : [ 'stackInterpreterClass' ], - #category : #'VMMakerTests-StackInterpreter' + #category : 'VMMakerTests-StackInterpreter', + #package : 'VMMakerTests', + #tag : 'StackInterpreter' } -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> setUp [ super setUp. stackInterpreterClass := StackInterpreter. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackInterpreterTest >> stackInterpreterClass [ ^ stackInterpreterClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackInterpreterTest >> stackInterpreterClass: anObject [ stackInterpreterClass := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> testIsObjectAccessor [ self @@ -35,7 +37,7 @@ VMStackInterpreterTest >> testIsObjectAccessor [ assert: (self stackInterpreterClass isObjectAccessor: #fetchClassOf:) ] -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> testIsStackAccessor [ self diff --git a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st index e36709438e..c643d5e0b8 100644 --- a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMStackMappingTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMStackMappingTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMStackMappingTest >> buildStackFromFrames [ 3 timesRepeat: [ @@ -17,7 +19,7 @@ VMStackMappingTest >> buildStackFromFrames [ stackBuilder buildStack ] -{ #category : #helpers } +{ #category : 'helpers' } VMStackMappingTest >> newContext [ | method | @@ -30,13 +32,13 @@ VMStackMappingTest >> newContext [ ip: 10 ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testCreatingNewContextByHandShouldbeSingle [ self assert: (interpreter isSingleContext: self newContext) ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ | context fp | context := self newContext. @@ -46,7 +48,7 @@ VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ self assert: (interpreter isSingleContext: context) ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testDivorceFramesInPage [ | page | self buildStackFromFrames. @@ -67,7 +69,7 @@ VMStackMappingTest >> testDivorceFramesInPage [ ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testMarryNewContextIsMarried [ | context | context := self newContext. @@ -75,7 +77,7 @@ VMStackMappingTest >> testMarryNewContextIsMarried [ self assert: (interpreter isStillMarriedContext: context) ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ | aContext framePointerToMarry stackPointerToMarry oldPage | self buildStackFromFrames. @@ -89,7 +91,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ self assert: oldPage isFree ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext | self buildStackFromFrames. @@ -103,7 +105,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSen self assert: expectedDivorcedContext equals: aContext. ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry oldPage newPage | self buildStackFromFrames. @@ -117,7 +119,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ self deny: oldPage equals: newPage ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -129,7 +131,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext oldBaseFramePointer callerContext | self buildStackFromFrames. @@ -149,7 +151,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsS ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -163,7 +165,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ self assert: initialiNumberOfusedPages + 1 equals: newNumberOfUsedPages ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -175,7 +177,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ | aContext initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -187,7 +189,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ self assert: initialiNumberOfusedPages equals: newNumberOfUsedPages ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryTopFrame [ | aContext | self buildStackFromFrames. diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st index 076488f560..fd296015d6 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMStackToRegisterMappingCogitTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMStackToRegisterMappingCogitTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'methodReceiver', 'receiverOperationBlock', @@ -15,21 +15,23 @@ Class { 'expectedResult', 'expectedReflexiveResult' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> argumentOperation: aFullBlockClosure [ argumentOperation := aFullBlockClosure ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> arguments: aCollection [ arguments := aCollection ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> buildStackFrame [ "Let's prepare the trampoline in case of non-optimized path" self createSpecialSelectorArray. @@ -49,7 +51,7 @@ VMStackToRegisterMappingCogitTest >> buildStackFrame [ ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> compileMethod [ codeAddress := self compile: [ @@ -61,54 +63,54 @@ VMStackToRegisterMappingCogitTest >> compileMethod [ cogit genReturnTopFromMethod ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult [ ^ expectedReflexiveResult ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult: anObject [ expectedReflexiveResult := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedResult [ ^ expectedResult ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedResult: anObject [ expectedResult := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingCogitTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> methodReceiver: anOop [ methodReceiver := anOop ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> receiverOperation: aFullBlockClosure [ receiverOperationBlock := aFullBlockClosure ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> sendBytecode [ ^ sendBytecode ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> sendBytecode: anObject [ sendBytecode := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingCogitTest >> setUp [ super setUp. @@ -116,7 +118,7 @@ VMStackToRegisterMappingCogitTest >> setUp [ arguments := #(). ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperation and: argumentOfOperation [ self buildStackFrame. @@ -126,7 +128,7 @@ VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperati self assertSpecialSendTo: receiverOfOperation value withArg: argumentOfOperation value ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self buildStackFrame. @@ -136,22 +138,22 @@ VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: aValue). ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value1 [ ^ value1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value1: anObject [ value1 := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value2 [ ^ value2 ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value2: anObject [ value2 := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st index 1033cc50ad..f67ef4a755 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMStackToRegisterMappingTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMStackToRegisterMappingTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingTest >> setUp [ super setUp. @@ -29,7 +31,7 @@ VMStackToRegisterMappingTest >> setUp [ cogit needsFrame: true ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testFlushBelowTop [ | stop stackPointerBefore framePointer | @@ -57,7 +59,7 @@ VMStackToRegisterMappingTest >> testFlushBelowTop [ self assert: self popAddress equals: (memory integerObjectOf: 17) ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopConstant [ cogit ssPushConstant: 1. @@ -67,7 +69,7 @@ VMStackToRegisterMappingTest >> testPopConstant [ self assert: cogit ssTop equals: cogit simSelf. ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -94,7 +96,7 @@ VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopRegister [ cogit ssPushRegister: TempReg. @@ -104,7 +106,7 @@ VMStackToRegisterMappingTest >> testPopRegister [ self assert: cogit ssTop equals: cogit simSelf ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ | stop stackPointerBefore framePointer | @@ -130,7 +132,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ self assert: self machineSimulator smalltalkStackPointerRegisterValue equals: stackPointerBefore ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPopFromStack [ | stop stackPointerBefore framePointer | @@ -157,7 +159,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPop self assert: self popAddress equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -184,7 +186,7 @@ VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPushConstant [ cogit ssPushConstant: 1. @@ -195,7 +197,7 @@ VMStackToRegisterMappingTest >> testPushConstant [ self deny: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPushRegister [ cogit ssPushRegister: TempReg. @@ -206,7 +208,7 @@ VMStackToRegisterMappingTest >> testPushRegister [ self deny: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testSpillConstant [ cogit ssPushConstant: 1. @@ -223,7 +225,7 @@ VMStackToRegisterMappingTest >> testSpillConstant [ self assert: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testSpillRegister [ cogit ssPushRegister: TempReg. @@ -242,7 +244,7 @@ VMStackToRegisterMappingTest >> testSpillRegister [ self assert: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testTopOfEmptyIsSimSelf [ self assert: cogit ssSize equals: 1. diff --git a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st index 267fd1873e..e1964ec1c5 100644 --- a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st @@ -1,14 +1,15 @@ Class { - #name : #VMTestMockInterpreter, - #superclass : #StackInterpreterSimulatorLSB, + #name : 'VMTestMockInterpreter', + #superclass : 'StackInterpreterSimulatorLSB', #instVars : [ 'interpreteBlock', 'allocatedElements' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'memory testing' } +{ #category : 'memory testing' } VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ | allocated | @@ -19,43 +20,43 @@ VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ ^ allocated ] -{ #category : #'memory testing' } +{ #category : 'memory testing' } VMTestMockInterpreter >> allocatedElements [ ^ allocatedElements ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> basicInitialize [ super basicInitialize. allocatedElements := Set new ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> enterSmalltalkExecutiveImplementation [ interpreteBlock value ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> free: aPointer [ allocatedElements remove: aPointer. ^ super free: aPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> interpreteBlock [ ^ interpreteBlock ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> interpreteBlock: anObject [ interpreteBlock := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> malloc: aSize [ ^ allocatedElements add: (super malloc: aSize) diff --git a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st index dd1e43a5cc..22b52f0abb 100644 --- a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMTrampolineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMTrampolineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'registerMask', 'isAligned', @@ -10,10 +10,12 @@ Class { 'CogAbstractRegisters', 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMTrampolineTest class >> testParameters [ ^ super testParameters * { @@ -22,25 +24,25 @@ VMTrampolineTest class >> testParameters [ } ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> isAligned [ ^ isAligned ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> isAligned: aBoolean [ isAligned := aBoolean ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> setUp [ super setUp. @@ -60,7 +62,7 @@ VMTrampolineTest >> setUp [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ | inc baseMethod baseMethodIP ctx page | @@ -123,7 +125,7 @@ VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ equals: (memory integerObjectOf: 3) ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testDetectFrameNotPointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -138,7 +140,7 @@ VMTrampolineTest >> testDetectFrameNotPointerInUse [ self deny: cogit isCFramePointerInUse ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testDetectFramePointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -153,7 +155,7 @@ VMTrampolineTest >> testDetectFramePointerInUse [ self assert: cogit isCFramePointerInUse ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -171,7 +173,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self assert: self framePointerRegisterValue equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -189,7 +191,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self assert: machineSimulator smalltalkStackPointerRegisterValue equals: 17 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ | initialStackPointer | @@ -207,7 +209,7 @@ VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue equals: initialStackPointer ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDereferenceSelectorRoutine [ | dereferenceRoutine previousLinkRegister trampoline | @@ -238,7 +240,7 @@ VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDeref self assert: self interpreter stackTop equals: previousLinkRegister ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -252,7 +254,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self assert: machineSimulator framePointerRegisterValue equals: 888 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -266,7 +268,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self assert: machineSimulator stackPointerRegisterValue equals: 777 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ cogit backend hasLinkRegister ifFalse: [ ^ self skip ]. @@ -282,7 +284,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ self assert: self interpreter stackTop equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -299,7 +301,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePoint self assert: self interpreter framePointer equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -316,7 +318,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPoint self assert: self interpreter stackPointer equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ "Some architectures such as ARMv8 require that the SP is always aligned to some value even in between calls. @@ -329,7 +331,7 @@ VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue \\ cogit stackPointerAlignment equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testStoreRegistersPushesValuesToStack [ | initialStackPointer actualPushedBytes | diff --git a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st index 9827cf8874..1951d51644 100644 --- a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMX64InstructionTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMX64InstructionTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMX64InstructionTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -15,13 +17,13 @@ VMX64InstructionTest class >> wordSizeParameters [ yourself ] -{ #category : #configuration } +{ #category : 'configuration' } VMX64InstructionTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ | mem | @@ -45,7 +47,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ | mem | @@ -70,7 +72,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupSRVr [ @@ -86,7 +88,7 @@ VMX64InstructionTest >> testDupSRVr [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFaddSRvRvRv [ | result | @@ -105,7 +107,7 @@ VMX64InstructionTest >> testFaddSRvRvRv [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ | result | @@ -124,7 +126,7 @@ VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFsubSRvRvRv [ | result | @@ -143,7 +145,7 @@ VMX64InstructionTest >> testFsubSRvRvRv [ self assert: (result doubleAt: 9) equals: -1.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFsubSRvRvRvWithThreeDifferentRegisters [ | result | diff --git a/smalltalksrc/VMMakerTests/package.st b/smalltalksrc/VMMakerTests/package.st index 328d153d5f..285bf148e9 100644 --- a/smalltalksrc/VMMakerTests/package.st +++ b/smalltalksrc/VMMakerTests/package.st @@ -1 +1 @@ -Package { #name : #VMMakerTests } +Package { #name : 'VMMakerTests' } From 00f99f14309fb4572d20b3b4369a3c89e817a135 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Fri, 20 Sep 2024 17:06:43 +0200 Subject: [PATCH 07/11] Revert "Removed new testing class and only kept the test for testing the ephemerons in the old space." This reverts commit 210b40d2501883cf1318f113961c0b6b5ef4a192. --- smalltalksrc/VMMakerTests/Array.extension.st | 6 +- .../VMMakerTests/ByteSymbol.extension.st | 6 +- .../VMMakerTests/Character.extension.st | 6 +- smalltalksrc/VMMakerTests/Cogit.extension.st | 12 +- .../VMMakerTests/CompiledBlock.extension.st | 4 +- .../VMMakerTests/DummyProcessor.class.st | 56 +- .../VMMakerTests/ExitInterpreter.class.st | 9 +- .../VMMakerTests/LiteralVariable.extension.st | 4 +- .../ManifestVMMakerTests.class.st | 14 +- .../VMMakerTests/MethodBuilderTest.class.st | 30 +- .../MockVMStructWithReservedWords.class.st | 13 +- ...ckVMStructWithoutTypeDeclarations.class.st | 9 +- .../ParametrizedTestMatrix.extension.st | 4 +- .../VMMakerTests/ProcessorSimulator.class.st | 258 ++++--- .../VMMakerTests/RegisterDescriptor.class.st | 33 +- .../VMMakerTests/SmallInteger.extension.st | 4 +- .../SpurMemoryManager.extension.st | 4 +- .../VMMakerTests/StackBuilderTest.class.st | 76 +- .../StackToRegisterMappingCogit.extension.st | 4 +- .../VMMakerTests/UndefinedObject.extension.st | 4 +- .../UnicornARMv5Simulator.class.st | 136 ++-- .../UnicornARMv8Simulator.class.st | 212 +++--- .../UnicornI386Simulator.class.st | 106 ++- .../UnicornInvalidMemoryAccess.class.st | 28 +- .../VMMakerTests/UnicornProcessor.class.st | 160 ++-- .../UnicornRISCVSimulator.class.st | 264 ++++--- .../UnicornRegisterDescriptor.class.st | 30 +- .../UnicornSimulationTrap.class.st | 26 +- .../VMMakerTests/UnicornSimulator.class.st | 28 +- .../VMMakerTests/UnicornTimeout.class.st | 12 +- .../VMMakerTests/UnicornX64Simulator.class.st | 162 ++-- .../VMARMStackAlignmentTest.class.st | 24 +- .../VMARMV8SIMDEncodingTest.class.st | 38 +- .../VMARMV8SpecificEncodingTest.class.st | 72 +- .../VMMakerTests/VMAbstractBuilder.class.st | 18 +- .../VMMakerTests/VMAbstractFFITest.class.st | 23 +- .../VMAbstractImageFormatTest.class.st | 22 +- .../VMAbstractPrimitiveTest.class.st | 19 +- .../VMMakerTests/VMBlockTest.class.st | 40 +- .../VMMakerTests/VMByteCodesTest.class.st | 136 ++-- .../VMMakerTests/VMBytecodeMethod.class.st | 32 +- .../VMCodeCompactionTest.class.st | 38 +- .../VMMakerTests/VMCogitHelpersTest.class.st | 28 +- .../VMCompiledCodeBuilder.class.st | 72 +- smalltalksrc/VMMakerTests/VMContext.class.st | 28 +- .../VMMakerTests/VMContextAccessTest.class.st | 22 +- .../VMDivisionInstructionTest.class.st | 28 +- .../VMFFIArgumentMarshallingTest.class.st | 95 ++- .../VMMakerTests/VMFFICallbacksTest.class.st | 17 +- .../VMMakerTests/VMFFIHelpersTest.class.st | 31 +- .../VMFFIReturnMarshallingTest.class.st | 47 +- ...SameThreadArgumentMarshallingTest.class.st | 13 +- .../VMFFISameThreadCalloutTest.class.st | 11 +- ...FISameThreadReturnMarshallingTest.class.st | 11 +- ...MFFIWorkerArgumentMarshallingTest.class.st | 19 +- .../VMFFIWorkerCalloutTest.class.st | 27 +- .../VMFFIWorkerReturnMarshallingTest.class.st | 13 +- ...ForwardLiteralInMachineMethodTest.class.st | 14 +- .../VMMakerTests/VMFrameBuilder.class.st | 92 ++- .../VMImageHeaderWritingTest.class.st | 50 +- .../VMMakerTests/VMImageReadingTest.class.st | 32 +- .../VMMakerTests/VMInterpreterTests.class.st | 14 +- .../VMJITPrimitiveCallingTest.class.st | 82 +-- .../VMJITVMPrimitiveTest.class.st | 20 +- .../VMJistMethodTestObject.class.st | 10 +- .../VMMakerTests/VMJitMethodTest.class.st | 30 +- .../VMJitMethodWithImmutabilityTest.class.st | 16 +- .../VMMakerTests/VMJitSimdBytecode.class.st | 26 +- .../VMJittedBoxFloatPrimitivesTest.class.st | 14 +- ...ittedByteArrayAccessPrimitiveTest.class.st | 112 ++- ...xternalAddressAccessPrimitiveTest.class.st | 12 +- .../VMJittedGeneralPrimitiveTest.class.st | 306 ++++---- .../VMMakerTests/VMJittedLookupTest.class.st | 22 +- .../VMJittedPrimitiveAtPutTest.class.st | 14 +- .../VMJittedPrimitiveAtTest.class.st | 74 +- .../VMJittedPrimitiveSizeTest.class.st | 32 +- .../VMJittedPrimitivesTest.class.st | 20 +- .../VMJittedSmallFloatPrimitiveTest.class.st | 52 +- .../VMMakerTests/VMLiterRulesTest.class.st | 13 +- .../VMMakerTests/VMLookUpTest.class.st | 62 +- .../VMMASTTranslationTest.class.st | 87 ++- .../VMMachineCodeFrameBuilderForTest.class.st | 41 +- .../VMMakerTests/VMMachineCodeMethod.class.st | 20 +- .../VMMachineSimulatorTest.class.st | 42 +- .../VMMakerTests/VMMockCodeGenerator.class.st | 26 +- ...MObjectAccessorIdentificationTest.class.st | 10 +- .../VMMakerTests/VMObjectLayoutTests.class.st | 60 +- .../VMMakerTests/VMObjectStackTest.class.st | 38 +- .../VMPermanentSpaceImageReadingTest.class.st | 14 +- .../VMPermanentSpaceMemoryTest.class.st | 90 ++- .../VMPermanentSpacePrimitiveTest.class.st | 30 +- .../VMMakerTests/VMPinnedObjectTest.class.st | 36 +- .../VMPrimitiveCallAbstractTest.class.st | 44 +- .../VMPrimitiveCallingTest.class.st | 16 +- .../VMMakerTests/VMPrimitiveTest.class.st | 696 +++++++++--------- .../VMPushThisContextRoutineTest.class.st | 32 +- .../VMSegmentsImageFormatTest.class.st | 18 +- ...lectorIndexDereferenceRoutineTest.class.st | 16 +- .../VMMakerTests/VMSessionIdTest.class.st | 10 +- ...SimpleStackBasedCogitAbstractTest.class.st | 164 ++--- ...SimpleStackBasedCogitBytecodeTest.class.st | 312 ++++---- ...impleStackBasedCogitCoggedMethods.class.st | 16 +- ...StackBasedCogitMegamorphicPICTest.class.st | 40 +- ...StackBasedCogitMonomorphicPICTest.class.st | 14 +- ...StackBasedCogitPolymorphicPICTest.class.st | 52 +- ...eStackBasedCogitRememberedSetTest.class.st | 20 +- .../VMSimulatedEnvironmentBuilder.class.st | 48 +- .../VMMakerTests/VMSimulationTest.class.st | 12 +- .../VMSistaSuperSendsTest.class.st | 12 +- .../VMSistaTrampolineTest.class.st | 12 +- .../VMSpecialSendArithmethicTest.class.st | 80 +- .../VMSpurEphemeronsAlgorithmTest.class.st | 361 +++++++++ .../VMSpurInitializedOldSpaceTest.class.st | 48 +- .../VMSpurMemoryManagerTest.class.st | 154 ++-- .../VMSpurNewSpaceStructureTest.class.st | 46 +- .../VMSpurObjectAllocationTest.class.st | 12 +- .../VMSpurOldSpaceBootstrapTest.class.st | 20 +- ...MSpurOldSpaceGarbageCollectorTest.class.st | 110 +-- .../VMSpurOldSpaceStructureTest.class.st | 14 +- .../VMMakerTests/VMSpurOldSpaceTest.class.st | 140 ++-- .../VMSpurRememberedSetTest.class.st | 46 +- .../VMSpurScavengeEphemeronTest.class.st | 48 +- .../VMSpurScavengeWeakTest.class.st | 18 +- .../VMMakerTests/VMSpurScavengerTest.class.st | 96 ++- ...llocationStrategyForLargeTreeTest.class.st | 56 +- ...llocationStrategyForSmallTreeTest.class.st | 76 +- ...purTreeAllocationWithBigNodesTest.class.st | 20 +- .../VMMakerTests/VMStackBuilder.class.st | 54 +- .../VMMakerTests/VMStackFrame.class.st | 50 +- .../VMStackInterpreterTest.class.st | 18 +- .../VMMakerTests/VMStackMappingTest.class.st | 38 +- ...VMStackToRegisterMappingCogitTest.class.st | 48 +- .../VMStackToRegisterMappingTest.class.st | 34 +- .../VMTestMockInterpreter.class.st | 23 +- .../VMMakerTests/VMTrampolineTest.class.st | 46 +- .../VMX64InstructionTest.class.st | 26 +- smalltalksrc/VMMakerTests/package.st | 2 +- 137 files changed, 3788 insertions(+), 3687 deletions(-) create mode 100644 smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st diff --git a/smalltalksrc/VMMakerTests/Array.extension.st b/smalltalksrc/VMMakerTests/Array.extension.st index a4a387884a..ef74d1b24b 100644 --- a/smalltalksrc/VMMakerTests/Array.extension.st +++ b/smalltalksrc/VMMakerTests/Array.extension.st @@ -1,13 +1,13 @@ -Extension { #name : 'Array' } +Extension { #name : #Array } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Array >> forMemory: aMemory inMethod: anObject [ ^ aMemory newArrayWith: (self collect: [ :anElement | anElement forMemory: aMemory inMethod: nil ]) ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Array >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st index 3fde704597..e9a6595a9d 100644 --- a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st +++ b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'ByteSymbol' } +Extension { #name : #ByteSymbol } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ByteSymbol >> forMemory: aMemory inMethod: anObject [ | vmString instSpec numSlots | @@ -27,7 +27,7 @@ ByteSymbol >> forMemory: aMemory inMethod: anObject [ ^ vmString ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ByteSymbol >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Character.extension.st b/smalltalksrc/VMMakerTests/Character.extension.st index 79a30d41b3..26f22ec3fe 100644 --- a/smalltalksrc/VMMakerTests/Character.extension.st +++ b/smalltalksrc/VMMakerTests/Character.extension.st @@ -1,12 +1,12 @@ -Extension { #name : 'Character' } +Extension { #name : #Character } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Character >> forMemory: memory [ ^ memory characterObjectOf: self codePoint ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Character >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Cogit.extension.st b/smalltalksrc/VMMakerTests/Cogit.extension.st index c8d411581d..3b587c4699 100644 --- a/smalltalksrc/VMMakerTests/Cogit.extension.st +++ b/smalltalksrc/VMMakerTests/Cogit.extension.st @@ -1,28 +1,28 @@ -Extension { #name : 'Cogit' } +Extension { #name : #Cogit } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> byte0: anInteger [ byte0 := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> inBlock: anInteger [ inBlock := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> methodOrBlockNumArgs: anInteger [ methodOrBlockNumArgs := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> needsFrame [ ^ true ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> needsFrame: aFalse [ needsFrame := aFalse ] diff --git a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st index 87094e4db8..436740ae7f 100644 --- a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st +++ b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'CompiledBlock' } +Extension { #name : #CompiledBlock } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } CompiledBlock >> forMemory: memory inMethod: aMethodBuilder [ | methodBuilder | diff --git a/smalltalksrc/VMMakerTests/DummyProcessor.class.st b/smalltalksrc/VMMakerTests/DummyProcessor.class.st index 3c4e14ea5a..7779177d07 100644 --- a/smalltalksrc/VMMakerTests/DummyProcessor.class.st +++ b/smalltalksrc/VMMakerTests/DummyProcessor.class.st @@ -1,6 +1,6 @@ Class { - #name : 'DummyProcessor', - #superclass : 'Object', + #name : #DummyProcessor, + #superclass : #Object, #instVars : [ 'stackPointer', 'framePointer', @@ -10,151 +10,149 @@ Class { 'linkRegisterValue', 'receiverRegisterValue' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> baseRegisterValue: anInteger [ baseRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> cResultRegister [ ^ nil ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> disassembler [ ^ LLVMDisassembler aarch64 ] -{ #category : 'operations' } +{ #category : #operations } DummyProcessor >> flushICacheFrom: anInteger to: anInteger2 [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> fp [ ^ framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> fp: anInteger [ framePointer := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> framePointerRegisterValue: anInteger [ framePointer := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> hasLinkRegister [ ^ true ] -{ #category : 'initialization' } +{ #category : #initialization } DummyProcessor >> initializeStackFor: aSimpleStackBasedCogit [ "We are dummy...." ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> instructionPointerRegisterValue [ ^ programCounter ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> integerRegisterState [ ^ #() ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> linkRegisterValue: anInteger [ linkRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> machineSimulator [ ^ self ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> memoryAt: anInteger write: aCollection size: anInteger3 [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> pc [ ^ programCounter ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> pc: anInteger [ programCounter := anInteger ] -{ #category : 'operations' } +{ #category : #operations } DummyProcessor >> pushWord: anInteger [ stackPointer := stackPointer - 8 ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> receiverRegisterValue: anInteger [ receiverRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> runUntil: anInteger [ programCounter := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> setFramePointer: aFPValue stackPointer: aSPValue [ stackPointer := aSPValue. framePointer := aFPValue ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> simulateLeafCallOf: anInteger nextpc: anInteger2 memory: anUndefinedObject [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> smalltalkStackPointerRegisterValue [ ^ smalltalkStackPointerRegisterValue ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> smalltalkStackPointerRegisterValue: anInteger [ smalltalkStackPointerRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> sp [ ^ stackPointer diff --git a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st index 4aff38ec53..86c280b059 100644 --- a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st @@ -1,14 +1,13 @@ Class { - #name : 'ExitInterpreter', - #superclass : 'Error', + #name : #ExitInterpreter, + #superclass : #Error, #instVars : [ 'returnValue' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } ExitInterpreter >> returnValue: anInteger [ returnValue := anInteger diff --git a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st index 02d3f47f5a..6579fb7e3b 100644 --- a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st +++ b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'LiteralVariable' } +Extension { #name : #LiteralVariable } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } LiteralVariable >> forMemory: aMemory inMethod: anObject [ | aVariable | diff --git a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st index 267b338feb..84a27ad5d5 100644 --- a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st +++ b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st @@ -2,28 +2,26 @@ I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser " Class { - #name : 'ManifestVMMakerTests', - #superclass : 'PackageManifest', - #category : 'VMMakerTests-Manifest', - #package : 'VMMakerTests', - #tag : 'Manifest' + #name : #ManifestVMMakerTests, + #superclass : #PackageManifest, + #category : #'VMMakerTests-Manifest' } -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> ruleBadMessageRule2V1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#UnicornARMv8Simulator #smashCallerSavedRegistersWithValuesFrom:by:in: #false)) #'2023-05-12T09:19:16.384586+02:00') #(#(#RGMethodDefinition #(#UnicornARMv8Simulator #postCallArgumentsNumArgs:in: #false)) #'2023-05-12T09:20:41.357283+02:00') #(#(#RGMethodDefinition #(#ProcessorSimulator #smashRegistersWithValuesFrom:by: #false)) #'2023-05-12T09:25:17.137958+02:00') ) ] -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> rulePrecedenceRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2023-05-12T09:19:42.605517+02:00') ) ] -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> ruleUncommonMessageSendRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2020-07-24T12:05:44.86595+02:00') ) ] diff --git a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st index 882ae1c75a..fada9181db 100644 --- a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'MethodBuilderTest', - #superclass : 'VMInterpreterTests', + #name : #MethodBuilderTest, + #superclass : #VMInterpreterTests, #instVars : [ 'literals', 'numberOfArguments', @@ -11,19 +11,17 @@ Class { 'methodHeader', 'method' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testAddingBytecodesDoesntOverrideHeader [ method := methodBuilder newMethod buildMethod. self assert: methodBuilder buildMethodHeader equals: (memory integerValueOf: (memory fetchPointer: 0 ofObject: method)). ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ method := methodBuilder newMethod; buildMethod. @@ -35,14 +33,14 @@ MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ self shouldnt:[ methodBuilder newMethod; buildMethod ] raise: AssertionFailure ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBuildEmptyMethodIsCompiledMethod [ "checking the format" method := methodBuilder newMethod; buildMethod. self assert: (memory isCompiledMethod: method) ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ | bytecodeAddress | literals := { }. @@ -56,7 +54,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | @@ -71,7 +69,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ | bytecodeAddress | @@ -86,13 +84,13 @@ MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testClassOfCompiledMethodIsCompiledMethod [ self assert: (memory fetchClassOf: methodBuilder newMethod buildMethod) equals: (memory splObj: 16). ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testGeneratingCompiledMethod [ method := methodBuilder newMethod @@ -101,7 +99,7 @@ MethodBuilderTest >> testGeneratingCompiledMethod [ self assert: (memory isCompiledMethod: method) ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ | numberOfByteCode | @@ -116,7 +114,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ | numberOfByteCode | @@ -131,7 +129,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testSecondBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st index 1ffa0754bb..92814927f5 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st @@ -1,28 +1,27 @@ Class { - #name : 'MockVMStructWithReservedWords', - #superclass : 'VMStructType', + #name : #MockVMStructWithReservedWords, + #superclass : #VMStructType, #instVars : [ 'foo', 'case' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'enumerating' } +{ #category : #enumerating } MockVMStructWithReservedWords class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ aBinaryBlock value: 'foo' value: 'char *'. aBinaryBlock value: 'case' value: 'char *' ] -{ #category : 'accessing' } +{ #category : #accessing } MockVMStructWithReservedWords >> case [ ^ case ] -{ #category : 'accessing' } +{ #category : #accessing } MockVMStructWithReservedWords >> case: anObject [ case := anObject diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st index 077e789b01..15627d4255 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st @@ -1,15 +1,14 @@ Class { - #name : 'MockVMStructWithoutTypeDeclarations', - #superclass : 'VMStructType', + #name : #MockVMStructWithoutTypeDeclarations, + #superclass : #VMStructType, #instVars : [ 'foo', 'bar' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'enumerating' } +{ #category : #enumerating } MockVMStructWithoutTypeDeclarations class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ "Missing the bar type declaration" diff --git a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st index b9250409cb..f5910338a6 100644 --- a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st +++ b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'ParametrizedTestMatrix' } +Extension { #name : #ParametrizedTestMatrix } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ParametrizedTestMatrix >> + aParametrizedTestMatrix [ | newMatrix | diff --git a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st index a61f9c0b74..37e4e7c26c 100644 --- a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st +++ b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st @@ -1,48 +1,46 @@ Class { - #name : 'ProcessorSimulator', - #superclass : 'Object', + #name : #ProcessorSimulator, + #superclass : #Object, #instVars : [ 'simulator', 'registerAliases', 'registerSmalltalkAliases', 'memory' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> ARMv5 [ ^ UnicornARMv5Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> ARMv8 [ ^ UnicornARMv8Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> IA32 [ ^ UnicornI386Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> X64 [ ^ UnicornX64Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> aarch64 [ ^ UnicornARMv8Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> riscv64 [ "TODO: Add riscv32 and possibly two subclasses for the RISCV simulator" @@ -50,203 +48,203 @@ ProcessorSimulator class >> riscv64 [ "^ SpikeRISCVSimulator new" ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> simulatorFor: isa [ ^ (self subclasses detect: [ :each | each supportsISA: isa ]) perform: isa asSymbol ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> aliasForRegister: aRegisterName [ ^ registerAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> aliasSmalltalkForRegister: aRegisterName [ ^ registerSmalltalkAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0Register [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue [ ^ self readRegister: self arg0Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue: aValue [ ^ self writeRegister: self arg0Register value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1Register [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue [ ^ self readRegister: self arg1Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue: aValue [ ^ self writeRegister: self arg1Register value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue [ ^ self readRegister: self baseRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue: aValue [ ^ self writeRegister: self baseRegister value: aValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegister [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegisterValue [ ^ self readRegister: self cResultRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegisterValue: aValue [ self writeRegister: self cResultRegister value: aValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg0RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0RegisterValue [ ^ self readRegister: self carg0Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg1RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1RegisterValue [ ^ self readRegister: self carg1Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg2RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2RegisterValue [ ^ self readRegister: self carg2Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg3RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3RegisterValue [ ^ self readRegister: self carg3Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue [ ^ self readRegister: self classRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue: aValue [ ^ self writeRegister: self classRegister value: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> cogit [ ^ memory interpreter cogit ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleCurrentInstruction [ ^ (self disassembleFrom: self instructionPointerRegisterValue opcodes: 1) first ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ self disassembler @@ -257,7 +255,7 @@ ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ pc: self instructionPointerRegisterValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleFrom: start to: stop [ ^ self disassembler @@ -268,114 +266,114 @@ ProcessorSimulator >> disassembleFrom: start to: stop [ pc: self instructionPointerRegisterValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembler [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister0 value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister1 value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister2 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister2 value: aValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ ^ self subclassResponsibility ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> finishMappingMemory [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> flushICacheFrom: startAddress to: endAddress [ simulator removeInstructionCacheFrom: startAddress to: endAddress ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> fp [ ^ self framePointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> fp: aValue [ ^ self framePointerRegisterValue: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue [ ^ self readRegister: self framePointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue: aValue [ self writeRegister: self framePointerRegister value: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> getLastAddress: abstractInstructions [ | last | @@ -383,13 +381,13 @@ ProcessorSimulator >> getLastAddress: abstractInstructions [ ^ last address + last machineCodeSize ] -{ #category : 'testing' } +{ #category : #testing } ProcessorSimulator >> hasLinkRegister [ ^ false ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initialize [ super initialize. @@ -399,91 +397,91 @@ ProcessorSimulator >> initialize [ self initializeRegisterSmalltalkAliases. ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initializeRegisterAliases [ "Hook for subclasses" ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initializeRegisterSmalltalkAliases [ "Hook for subclasses" ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue [ ^ self readRegister: self instructionPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue: aValue [ ^ self writeRegister: self instructionPointerRegister value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> integerRegisterState [ ^ { } ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastExecutedInstructionAddress [ ^ simulator lastExecutedInstructionAddress ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastExecutedInstructionSize [ ^ simulator lastExecutedInstructionSize ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastInstructionCount [ ^ simulator lastInstructionCount ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue [ ^ self readRegister: self linkRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue: aValue [ ^ self writeRegister: self linkRegister value: aValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> lr [ ^ self linkRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> lr: aValue [ ^ self linkRegisterValue: aValue ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> mapMemory: aMemory at: anAddress [ simulator @@ -492,7 +490,7 @@ ProcessorSimulator >> mapMemory: aMemory at: anAddress [ withPermissions: UnicornConstants permissionAll. ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ aSlangMemoryManager regionsDo: [ :startAddress :region | @@ -502,42 +500,42 @@ ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ self finishMappingMemory. ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> memory [ ^ memory ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> memory: aSpur64BitMMLECoSimulator [ memory := aSpur64BitMMLECoSimulator ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> memoryAt: address readNext: byteSize [ ^ simulator memoryAt: address readNext: byteSize ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> memoryAt: address write: bytes size: size [ simulator memoryAt: address write: bytes size: size ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> pc [ ^ self instructionPointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> pc: aValue [ ^ self instructionPointerRegisterValue: aValue ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> peek [ | stackAddressIntegerValue peekedByteArray | @@ -551,13 +549,13 @@ ProcessorSimulator >> peek [ ^ peekedByteArray ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> peekAddress [ ^ self peek integerAt: 1 size: self wordSize signed: false ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> popBytes [ | stackAddressIntegerValue aByteArray | @@ -574,7 +572,7 @@ ProcessorSimulator >> popBytes [ ^ aByteArray ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> popWord [ | aByteArray | @@ -582,7 +580,7 @@ ProcessorSimulator >> popWord [ ^ aByteArray integerAt: 1 size: self wordSize signed: false. ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> pushBytes: aByteArray [ | stackAddressIntegerValue | @@ -603,7 +601,7 @@ ProcessorSimulator >> pushBytes: aByteArray [ ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> pushWord: anInteger [ | aByteArray | @@ -612,7 +610,7 @@ ProcessorSimulator >> pushWord: anInteger [ self pushBytes: aByteArray ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readFloat64Register: aRegisterID [ | registerValue | @@ -622,7 +620,7 @@ ProcessorSimulator >> readFloat64Register: aRegisterID [ ^ registerValue doubleAt: 1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ | registerValue | @@ -631,7 +629,7 @@ ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ ^ registerValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readRegister: aRegisterID [ | registerValue size | @@ -640,37 +638,37 @@ ProcessorSimulator >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: size signed: false ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue [ ^ self readRegister: self receiverRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue: anInteger [ self writeRegister: self receiverRegister value: anInteger ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> register: anIndex readInto: aByteArray [ simulator register: anIndex readInto: aByteArray ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerAliases [ ^ registerAliases ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerDescriptors [ ^ self registerList collect: [ :reg | @@ -682,98 +680,98 @@ ProcessorSimulator >> registerDescriptors [ yourself ] ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerList [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue [ ^ self readRegister: self sendNumberOfArgumentsRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue: aValue [ ^ self writeRegister: self sendNumberOfArgumentsRegister value: aValue ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegister [ "By default they are the same" ^ self stackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue [ ^ self readRegister: self smalltalkStackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue: aValue [ self writeRegister: self smalltalkStackPointerRegister value: aValue ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> smashRegisterAccessors [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smashRegistersWithValuesFrom: base by: step [ self smashRegisterAccessors withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> sp [ ^ self stackPointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> sp: aValue [ ^ self stackPointerRegisterValue: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue [ ^ self readRegister: self stackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue: aValue [ self writeRegister: self stackPointerRegister value: aValue ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> stackValueAt: anInteger [ "Get a value from the stack at a 0-base position" @@ -782,7 +780,7 @@ ProcessorSimulator >> stackValueAt: anInteger [ ^ aByteArray integerAt: 1 size: self wordSize signed: false ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> stackValueBytesAt: position [ "Get the bytes from the stack at a 0-base position" @@ -800,7 +798,7 @@ ProcessorSimulator >> stackValueBytesAt: position [ ^ aByteArray ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> stackValues [ | initialValue | @@ -811,14 +809,14 @@ ProcessorSimulator >> stackValues [ ] ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> startAt: begin until: until timeout: timeout count: count [ self subclassResponsibility ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> step [ self @@ -828,36 +826,36 @@ ProcessorSimulator >> step [ count: 1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue [ ^ self readRegister: self temporaryRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue: anInteger [ ^ self writeRegister: self temporaryRegister value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> wordAt: anInteger [ ^ memory longAt: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> wordSize [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ | value | @@ -867,7 +865,7 @@ ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st index f4b6a25c2b..7f3419228e 100644 --- a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st @@ -1,50 +1,49 @@ Class { - #name : 'RegisterDescriptor', - #superclass : 'Object', + #name : #RegisterDescriptor, + #superclass : #Object, #instVars : [ 'simulator', 'name', 'alias', 'smalltalkAlias' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> alias [ ^ alias ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> name [ ^ name ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -54,35 +53,35 @@ RegisterDescriptor >> printOn: aStream [ ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> smalltalkAlias [ ^ smalltalkAlias ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> smalltalkAlias: aString [ smalltalkAlias := aString ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/SmallInteger.extension.st b/smalltalksrc/VMMakerTests/SmallInteger.extension.st index d5f6ef6f2a..f6dcb4fca2 100644 --- a/smalltalksrc/VMMakerTests/SmallInteger.extension.st +++ b/smalltalksrc/VMMakerTests/SmallInteger.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'SmallInteger' } +Extension { #name : #SmallInteger } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } SmallInteger >> forMemory: aMemory inMethod: anObject [ (self > aMemory maxSmallInteger or: [ self < aMemory minSmallInteger ]) ifTrue: [ self halt ]. diff --git a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st index b5d4de558f..e75c5e91a4 100644 --- a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st +++ b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'SpurMemoryManager' } +Extension { #name : #SpurMemoryManager } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } SpurMemoryManager >> hiddenRootsObject: anInteger [ hiddenRootsObj := anInteger diff --git a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st index aec69a0f71..8fce0dcfbe 100644 --- a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st @@ -15,8 +15,8 @@ temp2 method " Class { - #name : 'StackBuilderTest', - #superclass : 'VMInterpreterTests', + #name : #StackBuilderTest, + #superclass : #VMInterpreterTests, #instVars : [ 'stackElement1', 'stackElement2', @@ -32,12 +32,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> addFullFrame [ | frame | @@ -71,78 +69,78 @@ StackBuilderTest >> addFullFrame [ ^ frame ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument1 [ ^ self offsetArgument2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument1FromBaseFP [ ^ self offsetArgument2FromBaseFP + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument2 [ "we skip the frame pointer" ^ self offsetMethod + 2 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument2FromBaseFP [ ^ 2 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetCallerFP [ ^ self offsetMethod + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetContext [ ^ self offsetFlags + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetFlags [ ^ self offsetReceiver + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetInstructionPointer [ ^ 0 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetMethod [ ^ self offsetContext + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetReceiver [ ^ self offsetTemp1 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetStackElement1 [ ^ self offsetStackElement2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetStackElement2 [ ^ self offsetInstructionPointer + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetTemp1 [ ^ self offsetTemp2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetTemp2 [ ^ self offsetStackElement1 + 1 ] -{ #category : 'running' } +{ #category : #running } StackBuilderTest >> setUp [ super setUp. @@ -157,14 +155,14 @@ StackBuilderTest >> setUp [ ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testCallerFrameOfTopFrameShouldBeSecondFrameBuilderObject [ "For debug purpose, we added a link to the caller frame in the current frame." self assert: (stackBuilder topFrame callerFrame) equals: (stackBuilder frames nextToLast) ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -172,7 +170,7 @@ StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ equals: stackBuilder frames second instructionPointer. ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ | frame | @@ -187,7 +185,7 @@ StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ | frame | @@ -202,7 +200,7 @@ StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -210,7 +208,7 @@ StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ "We have 3 frames. The caller of the top frame should be the middle one" @@ -218,7 +216,7 @@ StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPushed [ method := methodBuilder newMethod buildMethod. @@ -230,7 +228,7 @@ StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPu equals: (methodBuilder bytecodeAt: 0 forMethod: method) ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ | frame argNum | @@ -249,7 +247,7 @@ StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ self assert: frame argumentSize equals: argNum ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ | frame tempNum | @@ -270,37 +268,37 @@ StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ equals: (OrderedCollection new: tempNum withAll: memory nilObject) ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderArgument1InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument1FromBaseFP * memory bytesPerOop)) equals: argument1 ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderArgument2InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument2FromBaseFP * memory bytesPerOop)) equals: argument2 ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderContext [ self assert: (interpreter stackValue: self offsetContext) equals: context ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderMethod [ self assert: (interpreter stackValue: self offsetMethod) equals: method ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderReceiver [ self assert: (interpreter stackValue: self offsetReceiver) equals: receiver ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderStackElementIsReversed [ self assert: (interpreter stackValue: self offsetStackElement1) equals: stackElement1. @@ -308,7 +306,7 @@ StackBuilderTest >> testOrderStackElementIsReversed [ equals: stackElement2. ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ "When a process is suspended, the Instruction Pointer is pushed on the stack of the frame. It should be the last thing pushed, and therefore, be at the top. " @@ -316,7 +314,7 @@ StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ equals: instructionPointer. ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderTempIsReversed [ self assert: (interpreter stackValue: self offsetTemp1) equals: temp1. @@ -324,7 +322,7 @@ StackBuilderTest >> testOrderTempIsReversed [ equals: temp2. ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testPageHeadFPIsLastFrameFP [ "The FramePointer of the interpreter should be the FramePointer of the current process last pushed frame." self assert: interpreter framePointer diff --git a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st index f2768e954f..1ad516b356 100644 --- a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st +++ b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'StackToRegisterMappingCogit' } +Extension { #name : #StackToRegisterMappingCogit } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } StackToRegisterMappingCogit >> methodOrBlockNumTemps: anInteger [ methodOrBlockNumTemps := anInteger diff --git a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st index 6d460c8943..bbe289597b 100644 --- a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st +++ b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'UndefinedObject' } +Extension { #name : #UndefinedObject } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } UndefinedObject >> forMemory: aMemory inMethod: anObject [ ^ aMemory nilObject diff --git a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st index 386b5360a0..f2ff996e16 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st @@ -1,66 +1,64 @@ Class { - #name : 'UnicornARMv5Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornARMv5Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> arg0Register [ ^ UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> arg1Register [ ^ UcARMRegisters r4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> baseRegister [ ^ UcARMRegisters r10 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> cResultRegister [ ^ UcARMRegisters r0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg0Register [ ^ UcARMRegisters r0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg1Register [ ^ UcARMRegisters r1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg2Register [ ^ UcARMRegisters r2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg3Register [ ^ UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> classRegister [ ^ UcARMRegisters r8 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ anInteger < 0 ifFalse: [ ^ anInteger ]. @@ -68,7 +66,7 @@ UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ ^ 16rFFFFFFFF - anInteger abs + 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ (aTwoComplementNumber bitAnd: 1 << 31) = 0 ifTrue: [ @@ -77,7 +75,7 @@ UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ ^ aTwoComplementNumber - 16rFFFFFFFF - 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> createUnicorn [ "Enable Floating Point... @@ -114,13 +112,13 @@ UnicornARMv5Simulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv5Simulator >> disassembler [ ^ LLVMARMDisassembler armv7 ] -{ #category : 'executing' } +{ #category : #executing } UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | actualCount result error startTime remainingTimeout currentTime | @@ -176,25 +174,25 @@ UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout c self instructionPointerRegisterValue = until ifTrue: [ ^ result ]] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARMRegisters d0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARMRegisters d1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARMRegisters d2 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -205,42 +203,42 @@ UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> framePointerRegister [ ^ UcARMRegisters fp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornARMv5Simulator >> hasLinkRegister [ ^ true ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> instructionPointerRegister [ ^ UcARMRegisters pc ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> integerRegisterState [ ^ #() ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> linkRegister [ ^ UcARMRegisters lr ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -255,177 +253,177 @@ UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r0 [ ^ self readRegister: UcARMRegisters r0 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r0: anInteger [ ^ self writeRegister: UcARMRegisters r0 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r1 [ ^ self readRegister: UcARMRegisters r1 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r10 [ ^ self readRegister: UcARMRegisters r10 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r10: anInteger [ ^ self writeRegister: UcARMRegisters r10 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r11: anInteger [ ^ self writeRegister: UcARMRegisters r11 value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> r12 [ ^ self readRegister: UcARMRegisters r12 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r12: anInteger [ self writeRegister: UcARMRegisters r12 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r1: anInteger [ ^ self writeRegister: UcARMRegisters r1 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r2 [ ^ self readRegister: UcARMRegisters r2 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r2: anInteger [ ^ self writeRegister: UcARMRegisters r2 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r3 [ ^ self readRegister: UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r3: anInteger [ ^ self writeRegister: UcARMRegisters r3 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r4 [ ^ self readRegister: UcARMRegisters r4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r4: anInteger [ ^ self writeRegister: UcARMRegisters r4 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r5 [ ^ self readRegister: UcARMRegisters r5 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r5: anInteger [ ^ self writeRegister: UcARMRegisters r5 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r6 [ ^ self readRegister: UcARMRegisters r6 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r6: anInteger [ ^ self writeRegister: UcARMRegisters r6 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r7 [ ^ self readRegister: UcARMRegisters r7 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r7: anInteger [ ^ self writeRegister: UcARMRegisters r7 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r8 [ ^ self readRegister: UcARMRegisters r8 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r8: anInteger [ ^ self writeRegister: UcARMRegisters r8 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r9 [ ^ self readRegister: UcARMRegisters r9 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r9: anInteger [ ^ self writeRegister: UcARMRegisters r9 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> receiverRegister [ ^ UcARMRegisters r5 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> registerList [ ^ #(lr pc sp fp r0 r1 r2 r3 r4 r5 r6 r7 r8 r9) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> registerStateGetters [ ^#(r0 r1 r2 r3 r4) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> retpcIn: aMemory [ "The return address is on the stack, having been pushed by either simulateCallOf:nextpc:memory: or simulateJumpCallOf:memory:" ^memory longAt: self fp + 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> sendNumberOfArgumentsRegister [ ^ UcARMRegisters r6 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -440,40 +438,40 @@ UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ self pc: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self fp: self popWord. self pc: self popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(r0: r1: r2: r3: r9: r12: lr:) withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> smashRegisterAccessors [ ^ #(r0: r1: r2: r3:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> stackPointerRegister [ ^ UcARMRegisters sp ] -{ #category : 'executing' } +{ #category : #executing } UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: count [ begin == until ifTrue: [ ^ self ]. @@ -481,13 +479,13 @@ UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: cou ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> temporaryRegister [ ^ UcARMRegisters r2 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> wordSize [ ^ 4 ] diff --git a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st index 50b83cf1f2..bdda0e9ccd 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st @@ -1,96 +1,94 @@ Class { - #name : 'UnicornARMv8Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornARMv8Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg0Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg1Register [ ^ UcARM64Registers x1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg2Register [ ^ UcARM64Registers x2 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg3Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> baseRegister [ ^ UcARM64Registers x24 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> cResultRegister [ ^ UcARM64Registers x0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg0Register [ ^ UcARM64Registers x0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg1Register [ ^ UcARM64Registers x1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg2Register [ ^ UcARM64Registers x2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg3Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> carry [ ^ (self nzcv bitAnd: (1<<29))~= 0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> classRegister [ ^ UcARM64Registers x22 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1 [ ^ self readRegister: UcARM64Registers cpacr_el1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1: anInteger [ self writeRegister: UcARM64Registers cpacr_el1 value: anInteger ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornARMv8Simulator >> createUnicorn [ simulator := Unicorn arm64. @@ -99,31 +97,31 @@ UnicornARMv8Simulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv8Simulator >> disassembler [ ^ LLVMARMDisassembler aarch64 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARM64Registers d0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARM64Registers d1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARM64Registers d2 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -134,24 +132,24 @@ UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> framePointerRegister [ ^ UcARM64Registers fp ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornARMv8Simulator >> hasLinkRegister [ ^ true ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornARMv8Simulator >> initializeRegisterAliases [ registerAliases @@ -164,37 +162,37 @@ UnicornARMv8Simulator >> initializeRegisterAliases [ at: #x30 put: #linkRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> instructionPointerRegister [ ^ UcARM64Registers pc ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> linkRegister [ ^ UcARM64Registers x30 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> negative [ ^ (self nzcv bitAnd: (1<<31))~= 0 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> nzcv [ ^ self readRegister: UcARM64Registers nzcv ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> overflow [ ^ (self nzcv bitAnd: (1<<28)) ~= 0 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemory [ "" "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -208,37 +206,37 @@ UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemo ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> receiverRegister [ ^ UcARM64Registers x23 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv8Simulator >> registerList [ ^ #(lr pc sp fp x28 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x16 x19 x20 x22 x23 x24 x25 zero negative carry overflow v0 v1 v2) ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> registerStateGetters [ ^#( x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x12 sp lr pc) ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> retpcIn: aMemory [ ^ memory longAt: self fp + 8 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> sendNumberOfArgumentsRegister [ ^ UcARM64Registers x25 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -255,14 +253,14 @@ UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ self instructionPointerRegisterValue: address ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self framePointerRegisterValue: self popWord. @@ -272,13 +270,13 @@ UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> smalltalkStackPointerRegister [ "Internally to execute Smalltalk code we use X28 as the stack pointer register" ^ UcARM64Registers x28 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(x0: x1: x2: x3: x4: x5: lr:) withIndexDo: @@ -286,373 +284,373 @@ UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step self perform: accessor with: index - 1 * step + base] ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x0: x1: x2: x3: x4: x5: x6: x7: x8: x9: x10: x11: x12: ) ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> stackPointerRegister [ ^ UcARM64Registers sp ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> temporaryRegister [ ^ UcARM64Registers x1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v0 [ ^ self readRawRegister: UcARM64Registers v0 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v1 [ ^ self readRawRegister: UcARM64Registers v1 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v2 [ ^ self readRawRegister: UcARM64Registers v2 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcARM64Registers v0 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister1Value [ ^ simulator readRegisterId: UcARM64Registers v1 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister2Value [ ^ simulator readRegisterId: UcARM64Registers v2 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> w25: anInteger [ self writeRegister: UcARM64Registers w25 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> w6: anInteger [ self writeRegister: UcARM64Registers w6 value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv8Simulator >> wordSize [ ^ 8 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x0 [ ^ self readRegister: UcARM64Registers x0 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x0: anInteger [ self writeRegister: UcARM64Registers x0 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x1 [ ^ self readRegister: UcARM64Registers x1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x10 [ ^ self readRegister: UcARM64Registers x10 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x10: anInteger [ ^ self writeRegister: UcARM64Registers x10 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x11 [ ^ self readRegister: UcARM64Registers x11 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x11: anInteger [ ^ self writeRegister: UcARM64Registers x11 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x12 [ ^ self readRegister: UcARM64Registers x12 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x12: anInteger [ ^ self writeRegister: UcARM64Registers x12 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x13: anInteger [ self writeRegister: UcARM64Registers x13 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x14: anInteger [ self writeRegister: UcARM64Registers x14 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x15: anInteger [ self writeRegister: UcARM64Registers x15 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x16 [ ^ self readRegister: UcARM64Registers x16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x16: anInteger [ self writeRegister: UcARM64Registers x16 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x17: anInteger [ self writeRegister: UcARM64Registers x17 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x18: anInteger [ self writeRegister: UcARM64Registers x18 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x19 [ ^ self readRegister: UcARM64Registers x19 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x19: anInteger [ self writeRegister: UcARM64Registers x19 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x1: anInteger [ ^ self writeRegister: UcARM64Registers x1 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x2 [ ^ self readRegister: UcARM64Registers x2 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x20 [ ^ self readRegister: UcARM64Registers x20 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x22 [ ^ self readRegister: UcARM64Registers x22 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x23 [ ^ self readRegister: UcARM64Registers x23 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x23: anInteger [ self writeRegister: UcARM64Registers x23 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x24 [ ^ self readRegister: UcARM64Registers x24 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x24: anInteger [ self writeRegister: UcARM64Registers x24 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x25 [ ^ self readRegister: UcARM64Registers x25 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x25: anInteger [ self writeRegister: UcARM64Registers x25 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x28 [ ^ self readRegister: UcARM64Registers x28 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x28: anInteger [ self writeRegister: UcARM64Registers x28 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x29: anInteger [ ^ self writeRegister: UcARM64Registers x29 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x2: anInteger [ ^ self writeRegister: UcARM64Registers x2 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x3 [ ^ self readRegister: UcARM64Registers x3 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x30: anInteger [ self writeRegister: UcARM64Registers x30 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x3: anInteger [ ^ self writeRegister: UcARM64Registers x3 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x4 [ ^ self readRegister: UcARM64Registers x4 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x4: anInteger [ ^ self writeRegister: UcARM64Registers x4 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x5 [ ^ self readRegister: UcARM64Registers x5 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x5: anInteger [ ^ self writeRegister: UcARM64Registers x5 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x6 [ ^ self readRegister: UcARM64Registers x6 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x6: anInteger [ ^ self writeRegister: UcARM64Registers x6 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x7 [ ^ self readRegister: UcARM64Registers x7 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x7: anInteger [ ^ self writeRegister: UcARM64Registers x7 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x8 [ ^ self readRegister: UcARM64Registers x8 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x8: anInteger [ ^ self writeRegister: UcARM64Registers x8 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x9 [ ^ self readRegister: UcARM64Registers x9 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x9: anInteger [ ^ self writeRegister: UcARM64Registers x9 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> xzr [ ^ self readRegister: UcARM64Registers xzr ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> xzr: anInteger [ ^ self writeRegister: UcARM64Registers xzr value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> zero [ ^ (self nzcv bitAnd: (1<<30)) ~= 0 diff --git a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st index 539e97b80e..3130e440a5 100644 --- a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st @@ -1,193 +1,191 @@ Class { - #name : 'UnicornI386Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornI386Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> arg0Register [ ^ UcX86Registers esi ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> baseRegister [ ^ UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> cResultRegister [ ^ UcX86Registers eax ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg0 [ "Stack value 0 is return address" ^ self stackValueAt: 1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg1 [ "Stack value 0 is return address" ^ self stackValueAt: 2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg2 [ "Stack value 0 is return address" ^ self stackValueAt: 3 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg3 [ "Stack value 0 is return address" ^ self stackValueAt: 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> classRegister [ ^ UcX86Registers ecx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> createUnicorn [ ^ Unicorn x86 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornI386Simulator >> disassembler [ ^ LLVMDisassembler i386 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> eax [ ^ self readRegister: UcX86Registers eax ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eax: anInteger [ self writeRegister: UcX86Registers eax value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ebp [ ^ self readRegister: UcX86Registers ebp ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ebp: anInteger [ self framePointerRegisterValue: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ebx [ ^ self readRegister: UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ebx: anInteger [ self writeRegister: UcX86Registers ebx value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ecx [ ^ self readRegister: UcX86Registers ecx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ecx: anInteger [ self writeRegister: UcX86Registers ecx value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> edi [ ^ self readRegister: UcX86Registers edi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> edi: anInteger [ self writeRegister: UcX86Registers edi value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> edx [ ^ self readRegister: UcX86Registers edx ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> edx: anInteger [ ^ self writeRegister: UcX86Registers edx value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eflags [ ^ self readRegister: UcX86Registers eflags ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> eip [ ^ self readRegister: UcX86Registers eip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eip: anInteger [ self writeRegister: UcX86Registers eip value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> esi [ ^ self readRegister: UcX86Registers esi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> esi: anInteger [ self writeRegister: UcX86Registers esi value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> esp [ ^ self readRegister: UcX86Registers esp ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> esp: anInteger [ self stackPointerRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -197,38 +195,38 @@ UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> framePointerRegister [ ^ UcX86Registers ebp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> hasLinkRegister [ ^ false ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> instructionPointerRegister [ ^ UcX86Registers eip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> integerRegisterState [ ^{ self eax. self ebx. self ecx. self edx. self esp. self ebp. self esi. self edi. self eip. self eflags } ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. On IA32 this typically means accessing stacked arguments @@ -239,31 +237,31 @@ UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ memory longAt: self ebp + i ] ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> receiverRegister [ ^ UcX86Registers edx ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> registerList [ ^ #(eip eax ebx ecx edx esp ebp esi edi) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> retpcIn: aMemory [ ^ memory longAt: self ebp + 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -275,21 +273,21 @@ UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ self eip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self eip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateReturnIn: aMemory [ self ebp: self popWord. self eip: self popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(eax: ecx: edx:) withIndexDo: @@ -297,26 +295,26 @@ UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step i self perform: accessor with: index - 1 * step + base] ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> smashRegisterAccessors [ ^#(eax: ebx: ecx: edx: esi: edi:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> stackPointerRegister [ ^ UcX86Registers esp ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> temporaryRegister [ "Assume SysV" ^ UcX86Registers eax ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> wordSize [ ^ 4 diff --git a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st index be91859d3a..8931a8e659 100644 --- a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st +++ b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st @@ -1,65 +1,63 @@ Class { - #name : 'UnicornInvalidMemoryAccess', - #superclass : 'Error', + #name : #UnicornInvalidMemoryAccess, + #superclass : #Error, #instVars : [ 'type', 'address', 'size', 'value' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> address [ ^ address ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> address: anObject [ address := anObject ] -{ #category : 'testing' } +{ #category : #testing } UnicornInvalidMemoryAccess >> isFetch [ ^ self type value anyMask: UcMemoryAccessType UC_MEM_FETCH value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> messageText [ ^ type item asString, ' at ', address hex ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> size [ ^ size ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> size: anObject [ size := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> type [ ^ type ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> type: anObject [ type := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> value [ ^ value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> value: anObject [ value := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st index 43e7716bc9..474a23f736 100644 --- a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st @@ -1,106 +1,104 @@ Class { - #name : 'UnicornProcessor', - #superclass : 'Object', + #name : #UnicornProcessor, + #superclass : #Object, #instVars : [ 'machineSimulator' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> cResultRegister [ ^ machineSimulator cResultRegisterValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> cResultRegister: anInteger [ machineSimulator cResultRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> convertIntegerToInternal: anInteger [ ^ machineSimulator convertIntegerToInternal: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> convertInternalToInteger: anInteger [ ^ machineSimulator convertInternalToInteger: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> eax: anInteger [ machineSimulator eax: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ebp: anInteger [ machineSimulator ebp: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ebx: anInteger [ machineSimulator ebx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ecx: anInteger [ machineSimulator ecx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> edi: anInteger [ machineSimulator edi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> edx: anInteger [ ^ machineSimulator edx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> esp: anInteger [ machineSimulator esp: anInteger ] -{ #category : 'caching' } +{ #category : #caching } UnicornProcessor >> flushICacheFrom: startAddress to: endAddress [ "Do nothing for now..." machineSimulator flushICacheFrom: startAddress to: endAddress ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> fp [ ^ machineSimulator framePointerRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> fp: aValue [ ^ machineSimulator framePointerRegisterValue: aValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> hasLinkRegister [ ^ machineSimulator hasLinkRegister ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> initializeStackFor: aCompiler [ "Initialize the machine code simulator" @@ -111,192 +109,192 @@ UnicornProcessor >> initializeStackFor: aCompiler [ aCompiler backend configureStackAlignment ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> integerRegisterState [ ^ machineSimulator integerRegisterState ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> linkRegisterValue [ ^ machineSimulator linkRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> lr: anInteger [ machineSimulator lr: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> machineSimulator [ ^ machineSimulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> machineSimulator: aMachineSimulator [ machineSimulator := aMachineSimulator ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> pc [ ^ machineSimulator instructionPointerRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> pc: anInteger [ ^ machineSimulator instructionPointerRegisterValue: anInteger ] -{ #category : 'stack-management' } +{ #category : #'stack-management' } UnicornProcessor >> popWord [ ^ machineSimulator popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory [ ^ machineSimulator postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory ] -{ #category : 'stack-management' } +{ #category : #'stack-management' } UnicornProcessor >> pushWord: anInteger [ machineSimulator pushWord: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r0: anInteger [ ^ machineSimulator r0: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r10: anInteger [ machineSimulator r10: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r11: anInteger [ machineSimulator r11: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r1: anInteger [ ^ machineSimulator r1: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r2: anInteger [ machineSimulator r2: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r3: anInteger [ machineSimulator r3: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r4: anInteger [ machineSimulator r4: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r5: anInteger [ machineSimulator r5: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r6: anInteger [ machineSimulator r6: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r8 [ ^ machineSimulator r8 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r8: anInteger [ machineSimulator r8: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r9: anInteger [ machineSimulator r9: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r9b: anInteger [ machineSimulator r9b: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rax: anInteger [ machineSimulator rax: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rbp: anInteger [ machineSimulator rbp: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rcx: anInteger [ machineSimulator rcx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> rdi: anInteger [ machineSimulator rdi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rdx: anInteger [ machineSimulator rdx: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> retpcIn: aSpurSimulatedMemory [ ^ machineSimulator retpcIn: aSpurSimulatedMemory ] -{ #category : 'accessing registers' } +{ #category : #'accessing registers' } UnicornProcessor >> rsi: anInteger [ ^ machineSimulator rsi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rsp: anInteger [ machineSimulator rsp: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnlyBelow: minimumWritableAddress [ @@ -306,7 +304,7 @@ UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnly count: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> runUntil: anAddress [ ^ machineSimulator startAt: machineSimulator instructionPointerRegisterValue @@ -315,165 +313,165 @@ UnicornProcessor >> runUntil: anAddress [ count: 0 ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornProcessor >> setFramePointer: framePointer stackPointer: stackPointer [ machineSimulator framePointerRegisterValue: framePointer. machineSimulator stackPointerRegisterValue: stackPointer ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory [ machineSimulator simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ machineSimulator simulateLeafCallOf: address nextpc: nextpc memory: aMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateReturnIn: aSpurSimulatedMemory [ ^ machineSimulator simulateReturnIn: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory [ machineSimulator smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> smashRegistersWithValuesFrom: base by: step [ machineSimulator smashRegistersWithValuesFrom: base by: step ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> sp [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> sp: anInteger [ machineSimulator stackPointerRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> w25: anInteger [ machineSimulator w25: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> w6: anInteger [ machineSimulator w6: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x12: anInteger [ machineSimulator x12: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x16: anInteger [ machineSimulator x16: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x19: anInteger [ machineSimulator x19: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x1: anInteger [ machineSimulator x1: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x23: anInteger [ machineSimulator x23: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x24: anInteger [ machineSimulator x24: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x25: anInteger [ machineSimulator x25: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x28: anInteger [ machineSimulator x28: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x29: anInteger [ machineSimulator x29: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x30: anInteger [ machineSimulator x30: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x3: anInteger [ machineSimulator x3: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x4: anInteger [ machineSimulator x4: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x5: anInteger [ machineSimulator x5: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x6: anInteger [ machineSimulator x6: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x7: anInteger [ machineSimulator x7: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> xzr [ ^ machineSimulator xzr ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> xzr: anInteger [ machineSimulator xzr: anInteger diff --git a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st index 2895ec60c8..c65b477cae 100644 --- a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st @@ -1,66 +1,64 @@ Class { - #name : 'UnicornRISCVSimulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornRISCVSimulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> arg0Register [ ^ UcRISCVRegisters x10 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> arg1Register [ ^ UcRISCVRegisters x11 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> baseRegister [ ^ UcRISCVRegisters x26 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> cResultRegister [ ^ UcRISCVRegisters x12 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg0Register [ ^ UcRISCVRegisters x12 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg1Register [ ^ UcRISCVRegisters x13 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg2Register [ ^ UcRISCVRegisters x14 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg3Register [ ^ UcRISCVRegisters x15 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> classRegister [ ^ UcRISCVRegisters x23 ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornRISCVSimulator >> createUnicorn [ simulator := Unicorn riscv64. @@ -69,290 +67,290 @@ UnicornRISCVSimulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> disassembler [ ^ LLVMRV64Disassembler riscv64 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister0 [ ^ UcRISCVRegisters f0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister1 [ ^ UcRISCVRegisters f1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister2 [ ^ UcRISCVRegisters f2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f0 [ ^ self readRegister: UcRISCVRegisters f0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f1 [ ^ self readRegister: UcRISCVRegisters f1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f10 [ ^ self readRegister: UcRISCVRegisters f10 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f11 [ ^ self readRegister: UcRISCVRegisters f11 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f12 [ ^ self readRegister: UcRISCVRegisters f12 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f13 [ ^ self readRegister: UcRISCVRegisters f13 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f14 [ ^ self readRegister: UcRISCVRegisters f14 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f15 [ ^ self readRegister: UcRISCVRegisters f15 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f16 [ ^ self readRegister: UcRISCVRegisters f16 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f17 [ ^ self readRegister: UcRISCVRegisters f17 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f18 [ ^ self readRegister: UcRISCVRegisters f18 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f19 [ ^ self readRegister: UcRISCVRegisters f19 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f2 [ ^ self readRegister: UcRISCVRegisters f2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f20 [ ^ self readRegister: UcRISCVRegisters f20 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f21 [ ^ self readRegister: UcRISCVRegisters f21 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f22 [ ^ self readRegister: UcRISCVRegisters f22 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f23 [ ^ self readRegister: UcRISCVRegisters f23 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f24 [ ^ self readRegister: UcRISCVRegisters f24 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f25 [ ^ self readRegister: UcRISCVRegisters f25 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f26 [ ^ self readRegister: UcRISCVRegisters f26 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f27 [ ^ self readRegister: UcRISCVRegisters f27 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f28 [ ^ self readRegister: UcRISCVRegisters f28 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f29 [ ^ self readRegister: UcRISCVRegisters f29 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f3 [ ^ self readRegister: UcRISCVRegisters f3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f30 [ ^ self readRegister: UcRISCVRegisters f30 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f31 [ ^ self readRegister: UcRISCVRegisters f31 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f4 [ ^ self readRegister: UcRISCVRegisters f4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f5 [ ^ self readRegister: UcRISCVRegisters f5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f6 [ ^ self readRegister: UcRISCVRegisters f6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f7 [ ^ self readRegister: UcRISCVRegisters f7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f8 [ ^ self readRegister: UcRISCVRegisters f8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f9 [ ^ self readRegister: UcRISCVRegisters f9 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagCarryRegister [ ^ UcRISCVRegisters x31 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagCarryRegisterValue [ ^ self readRegister: self flagCarryRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegister [ ^ UcRISCVRegisters x30 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegisterValue [ ^ self readRegister: self flagOverflowRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagSignRegister [ ^ UcRISCVRegisters x29 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagSignRegisterValue [ ^ self readRegister: self flagSignRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagZeroRegister [ ^ UcRISCVRegisters x28 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagZeroRegisterValue [ ^ self readRegister: self flagZeroRegister ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> framePointerRegister [ "Frame Pointer" ^ UcRISCVRegisters x8 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornRISCVSimulator >> hasLinkRegister [ ^ true ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> initializeRegisterAliases [ registerAliases @@ -398,7 +396,7 @@ UnicornRISCVSimulator >> initializeRegisterAliases [ at: #f7 put: #ft7 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ registerSmalltalkAliases @@ -427,43 +425,43 @@ UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ at: #x31 put: #carry ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> instructionPointerRegister [ ^ UcRISCVRegisters pc ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> linkRegister [ ^ UcRISCVRegisters x1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatus [ ^ UcRISCVRegisters mstatus ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue [ ^ self readRegister: self mstatus ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue: aValue [ ^ self writeRegister: self mstatus value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> receiverRegister [ ^ UcRISCVRegisters x24 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRISCVSimulator >> registerList [ ^ #(lr pc sp fp @@ -472,375 +470,375 @@ UnicornRISCVSimulator >> registerList [ f0 f1 f2 f3 f4 f5 f6 f7) ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s0 [ ^ self readRegister: UcRISCVRegisters s0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s0: aValue [ ^ self writeRegister: UcRISCVRegisters s0 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s2 [ ^ self readRegister: UcRISCVRegisters s2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s2: aValue [ ^ self writeRegister: UcRISCVRegisters s2 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s7 [ ^ self readRegister: UcRISCVRegisters s7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s7: aValue [ ^ self writeRegister: UcRISCVRegisters s7 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s8 [ ^ self readRegister: UcRISCVRegisters s8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s8: aValue [ ^ self writeRegister: UcRISCVRegisters s8 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s9 [ ^ self readRegister: UcRISCVRegisters s9 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s9: aValue [ ^ self writeRegister: UcRISCVRegisters s9 value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> sendNumberOfArgumentsRegister [ ^ UcRISCVRegisters x25 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> simulateLeafCallOf: destinationAddress nextpc: returnAddress memory: anUndefinedObject [ self linkRegisterValue: returnAddress. self instructionPointerRegisterValue: destinationAddress ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x1: x5: x6: x7: x10: x11: x12: x13: x14: x15: x16: x17: x28: x29: x30: x31:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> stackPointerRegister [ ^ UcRISCVRegisters x2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t0 [ ^ self readRegister: UcRISCVRegisters t0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t0: aValue [ ^ self writeRegister: UcRISCVRegisters t0 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t1 [ ^ self readRegister: UcRISCVRegisters t1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t1: aValue [ ^ self writeRegister: UcRISCVRegisters t1 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t2 [ ^ self readRegister: UcRISCVRegisters t2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t2: aValue [ ^ self writeRegister: UcRISCVRegisters t2 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t3 [ ^ self readRegister: UcRISCVRegisters t3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t3: aValue [ ^ self writeRegister: UcRISCVRegisters t3 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t4 [ ^ self readRegister: UcRISCVRegisters t4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t4: aValue [ ^ self writeRegister: UcRISCVRegisters t4 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t5 [ ^ self readRegister: UcRISCVRegisters t5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t5: aValue [ ^ self writeRegister: UcRISCVRegisters t5 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t6 [ ^ self readRegister: UcRISCVRegisters t6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t6: aValue [ ^ self writeRegister: UcRISCVRegisters t6 value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> temporaryRegister [ ^ UcRISCVRegisters x22 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRISCVSimulator >> wordSize [ ^ 8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x0 [ ^ self readRegister: UcRISCVRegisters x0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x1 [ ^ self readRegister: UcRISCVRegisters x1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x10 [ ^ self readRegister: UcRISCVRegisters x10 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x11 [ ^ self readRegister: UcRISCVRegisters x11 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x12 [ ^ self readRegister: UcRISCVRegisters x12 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x13 [ ^ self readRegister: UcRISCVRegisters x13 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x14 [ ^ self readRegister: UcRISCVRegisters x14 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x15 [ ^ self readRegister: UcRISCVRegisters x15 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x16 [ ^ self readRegister: UcRISCVRegisters x16 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x17 [ ^ self readRegister: UcRISCVRegisters x17 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x18 [ ^ self readRegister: UcRISCVRegisters x18 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x19 [ ^ self readRegister: UcRISCVRegisters x19 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x2 [ ^ self readRegister: UcRISCVRegisters x2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x20 [ ^ self readRegister: UcRISCVRegisters x20 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x21 [ ^ self readRegister: UcRISCVRegisters x21 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x22 [ ^ self readRegister: UcRISCVRegisters x22 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x23 [ ^ self readRegister: UcRISCVRegisters x23 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x24 [ ^ self readRegister: UcRISCVRegisters x24 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x25 [ ^ self readRegister: UcRISCVRegisters x25 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x26 [ ^ self readRegister: UcRISCVRegisters x26 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x27 [ ^ self readRegister: UcRISCVRegisters x27 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x28 [ ^ self readRegister: UcRISCVRegisters x28 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x29 [ ^ self readRegister: UcRISCVRegisters x29 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x3 [ ^ self readRegister: UcRISCVRegisters x3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x30 [ ^ self readRegister: UcRISCVRegisters x30 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x31 [ ^ self readRegister: UcRISCVRegisters x31 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x4 [ ^ self readRegister: UcRISCVRegisters x4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x5 [ ^ self readRegister: UcRISCVRegisters x5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x6 [ ^ self readRegister: UcRISCVRegisters x6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x7 [ ^ self readRegister: UcRISCVRegisters x7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x8 [ ^ self readRegister: UcRISCVRegisters x8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x9 [ ^ self readRegister: UcRISCVRegisters x9 diff --git a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st index 401ef8c3e9..4302fb7c83 100644 --- a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st @@ -1,50 +1,48 @@ Class { - #name : 'UnicornRegisterDescriptor', - #superclass : 'Object', + #name : #UnicornRegisterDescriptor, + #superclass : #Object, #instVars : [ 'simulator', 'name', 'alias' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> alias [ ^ alias ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> name [ ^ name ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -54,23 +52,23 @@ UnicornRegisterDescriptor >> printOn: aStream [ ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st index cd421437e1..0b5790d901 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st @@ -1,16 +1,14 @@ Class { - #name : 'UnicornSimulationTrap', - #superclass : 'Object', + #name : #UnicornSimulationTrap, + #superclass : #Object, #instVars : [ 'unicornInvalidAccess', 'simulator' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemoryAccess [ ^ self new @@ -19,13 +17,13 @@ UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemor yourself ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> address [ ^ unicornInvalidAccess address ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> nextpc [ | instruction | @@ -33,7 +31,7 @@ UnicornSimulationTrap >> nextpc [ ^ self simulator instructionPointerRegisterValue + instruction size ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> registerAccessor [ "Assume this is a read of a value into a register" @@ -46,18 +44,18 @@ UnicornSimulationTrap >> registerAccessor [ ^ (registerName , ':') asSymbol ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> type [ unicornInvalidAccess type = UcMemoryAccessType UC_MEM_WRITE_UNMAPPED @@ -70,12 +68,12 @@ UnicornSimulationTrap >> type [ self halt ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> unicornInvalidAccess: anUnicornInvalidMemoryAccess [ unicornInvalidAccess := anUnicornInvalidMemoryAccess ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> writtenValue [ "This is the value that was tried to be written but failed (if this is a failed write)" ^ unicornInvalidAccess value diff --git a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st index fc5d4a2eff..c8194d7391 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st @@ -1,28 +1,26 @@ Class { - #name : 'UnicornSimulator', - #superclass : 'ProcessorSimulator', + #name : #UnicornSimulator, + #superclass : #ProcessorSimulator, #instVars : [ 'stopReason', 'invalidAccessHandler' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } UnicornSimulator class >> supportsISA: isa [ ^ #( #ARMv5 #ARMv8 #IA32 #X64 #aarch64 #riscv64 ) includes: isa ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> createUnicorn [ self subclassResponsibility ] -{ #category : 'executing' } +{ #category : #executing } UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | result error startTime currentTime remainingTimeout remainingCount | @@ -73,13 +71,13 @@ UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: ifTrue: [ ^ result ]] ] -{ #category : 'stack-access' } +{ #category : #'stack-access' } UnicornSimulator >> finishMappingMemory [ "Do nothing in the case of Unicorn, is useful if the simulator used has to map memory by hand" ] -{ #category : 'handling invalid accesses' } +{ #category : #'handling invalid accesses' } UnicornSimulator >> handleInvalidAccess: invalidAccess [ | previousInstructionPointer hasToContinue | @@ -97,7 +95,7 @@ UnicornSimulator >> handleInvalidAccess: invalidAccess [ ^ hasToContinue ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> initialize [ super initialize. @@ -112,7 +110,7 @@ UnicornSimulator >> initialize [ true] ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> initializeUnicorn [ simulator @@ -128,12 +126,12 @@ UnicornSimulator >> initializeUnicorn [ false ] ] -{ #category : 'handling invalid accesses' } +{ #category : #'handling invalid accesses' } UnicornSimulator >> invalidAccessHandler: aFullBlockClosure [ invalidAccessHandler := aFullBlockClosure ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ simulator @@ -142,7 +140,7 @@ UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ address = anAddress ifTrue: [ aBlock value ] ] ] -{ #category : 'executing' } +{ #category : #executing } UnicornSimulator >> startAt: begin until: until timeout: timeout count: count [ ^ self doStartAt: begin until: until timeout: timeout count: count. diff --git a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st index e070ae5e0a..12be3bf4bf 100644 --- a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st +++ b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st @@ -1,20 +1,18 @@ Class { - #name : 'UnicornTimeout', - #superclass : 'Error', + #name : #UnicornTimeout, + #superclass : #Error, #instVars : [ 'target' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornTimeout >> target [ ^ target ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornTimeout >> target: anObject [ target := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st index 4dfd2f5b9d..d7176e7d9a 100644 --- a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st @@ -1,100 +1,98 @@ Class { - #name : 'UnicornX64Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornX64Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> arg0Register [ ^ UcX86Registers rdi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> arg1Register [ ^ UcX86Registers rsi ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> baseRegister [ ^ UcX86Registers rbx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> cResultRegister [ ^ UcX86Registers rax ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg0Register [ "Assume SysV" ^ UcX86Registers rdi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg1Register [ "Assume SysV" ^ UcX86Registers rsi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg2Register [ "Assume SysV" ^ UcX86Registers rdx ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg3Register [ "Assume SysV" ^ UcX86Registers rcx ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> classRegister [ ^ UcX86Registers rcx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> createUnicorn [ ^ Unicorn x8664 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornX64Simulator >> disassembler [ ^ LLVMDisassembler amd64 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcX86Registers xmm1 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcX86Registers xmm2 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -104,25 +102,25 @@ UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> framePointerRegister [ ^ UcX86Registers rbp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : 'testing' } +{ #category : #testing } UnicornX64Simulator >> hasLinkRegister [ ^ false ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornX64Simulator >> initializeRegisterAliases [ registerAliases @@ -133,19 +131,19 @@ UnicornX64Simulator >> initializeRegisterAliases [ at: #rbp put: #framePointerRegister ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> instructionPointerRegister [ ^ UcX86Registers rip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> integerRegisterState [ ^ #() ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a Win64 or SysV ABI call. On X64 this simply means accessing register arguments. @@ -160,266 +158,266 @@ UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ self perform: getter] ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r10 [ ^ self readRegister: UcX86Registers r10 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r10: anInteger [ ^ self writeRegister: UcX86Registers r10 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r11 [ ^ self readRegister: UcX86Registers r11 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r11: anInteger [ ^ self writeRegister: UcX86Registers r11 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r12 [ ^ self readRegister: UcX86Registers r12 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r12: anInteger [ ^ self writeRegister: UcX86Registers r12 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r13: anInteger [ self writeRegister: UcX86Registers r13 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r14: anInteger [ self writeRegister: UcX86Registers r14 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r15: anInteger [ self writeRegister: UcX86Registers r15 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r1: anInteger [ ^ self writeRegister: UcX86Registers r1 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r2: anInteger [ ^ self writeRegister: UcX86Registers r2 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r3: anInteger [ ^ self writeRegister: UcX86Registers r3 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r4: anInteger [ ^ self writeRegister: UcX86Registers r4 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r5: anInteger [ ^ self writeRegister: UcX86Registers r5 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r6: anInteger [ ^ self writeRegister: UcX86Registers r6 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r7: anInteger [ ^ self writeRegister: UcX86Registers r7 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r8 [ ^ self readRegister: UcX86Registers r8 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r8: anInteger [ ^ self writeRegister: UcX86Registers r8 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r9 [ ^ self readRegister: UcX86Registers r9 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r9: anInteger [ ^ self writeRegister: UcX86Registers r9 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r9b: anInteger [ self writeRegister: UcX86Registers r9b value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rax [ ^ self readRegister: UcX86Registers rax ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rax: anInteger [ self writeRegister: UcX86Registers rax value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbp [ ^ self readRegister: UcX86Registers rbp ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbp: anInteger [ ^ self writeRegister: UcX86Registers rbp value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbx [ ^ self readRegister: UcX86Registers rbx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbx: aValue [ ^ self writeRegister: UcX86Registers rbx value: aValue ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rcx [ ^ self readRegister: UcX86Registers rcx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rcx: anInteger [ ^ self writeRegister: UcX86Registers rcx value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdi [ ^ self readRegister: UcX86Registers rdi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rdi: anInteger [ self writeRegister: UcX86Registers rdi value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdx [ ^ self readRegister: UcX86Registers rdx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdx: anInteger [ ^ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> receiverRegister [ ^ UcX86Registers rdx ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> registerList [ ^ #(rip rax rbx rcx rdx rsp rbp r8 r9 r10 r11 r12 rsi rdi) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> retpcIn: aSpurSimulatedMemory [ ^ memory long64At: self rbp + 8 ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rip [ ^ self readRegister: UcX86Registers rip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rip: anInteger [ self writeRegister: UcX86Registers rip value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsi [ ^ self readRegister: UcX86Registers rsi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rsi: anInteger [ self writeRegister: UcX86Registers rsi value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsp [ ^ self readRegister: UcX86Registers rsp ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsp: anInteger [ ^ self writeRegister: UcX86Registers rsp value: anInteger ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers r9 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -439,21 +437,21 @@ UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ self rip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self rip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateReturnIn: aMemory [ self rbp: (self popWord). self rip: (self popWord) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ | volatileRegisters | CogX64Compiler isSysV @@ -471,50 +469,50 @@ UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in self perform: setter with: index - 1 * step + base] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> smashRegisterAccessors [ ^#(rax: rbx: rcx: rdx: rsi: rdi: r8: r9: r10: r11: r12: r13: r14: r15:) ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> stackPointerRegister [ ^ UcX86Registers rsp ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> temporaryRegister [ "Both in System V and Windows" ^ UcX86Registers rax ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> wordSize [ ^ 8 ] -{ #category : 'accessing - registers' } +{ #category : #'accessing - registers' } UnicornX64Simulator >> xmm0 [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> xmm1 [ ^ simulator readRegisterId: UcX86Registers xmm1 size: 16 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> xmm2 [ ^ simulator readRegisterId: UcX86Registers xmm2 size: 16 diff --git a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st index 386f10c484..a4cd67ccdf 100644 --- a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMARMStackAlignmentTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMARMStackAlignmentTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'instructions' ], #pools : [ 'CogAbstractRegisters' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMStackAlignmentTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -20,25 +18,25 @@ VMARMStackAlignmentTest class >> wordSizeParameters [ yourself ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> addInstruction: anInstruction [ instructions add: anInstruction ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> disassembleInstructions [ ^ self disassembleFrom: cogInitialAddress opcodes: instructions size ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> runInstructions [ ^ self runFrom: cogInitialAddress until: cogInitialAddress + (instructions size * 4) ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> setUp [ super setUp. @@ -47,7 +45,7 @@ VMARMStackAlignmentTest >> setUp [ machineSimulator stackPointerRegisterValue: interpreter rumpCStackAddress ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ "To start the stack pointer should be aligned" @@ -98,7 +96,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ equals: 'Unhandled CPU exception (UC_ERR_EXCEPTION)' ] ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ "To start the stack pointer should be aligned" @@ -137,7 +135,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> writeInstructions [ cogInitialAddress := cogit methodZone allocate: instructions size * 4 . diff --git a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st index 522508bad7..82faa50100 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMARMV8SIMDEncodingTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMARMV8SIMDEncodingTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMV8SIMDEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -14,7 +12,7 @@ VMARMV8SIMDEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> armInstructionAt: index [ | addr inst | @@ -24,20 +22,20 @@ VMARMV8SIMDEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : 'configuration' } +{ #category : #configuration } VMARMV8SIMDEncodingTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : 'accessing' } +{ #category : #accessing } VMARMV8SIMDEncodingTest >> initializationOptions [ ^ super initializationOptions , { #ProcessorClass . DummyProcessor } ] -{ #category : 'accessing' } +{ #category : #accessing } VMARMV8SIMDEncodingTest >> jitOptions [ ^ super jitOptions @@ -46,7 +44,7 @@ VMARMV8SIMDEncodingTest >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ self compile: [ cogit DupS: 64 R: 3 Vr: 0 ]. @@ -56,7 +54,7 @@ VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ equals: 'dup v0.2d, x3' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ self compile: [ cogit FaddS: 32 Rv: 0 Rv: 1 Rv: 2 ]. @@ -66,7 +64,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ equals: 'fadd v2.4s, v0.4s, v1.4s' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ self compile: [ cogit FaddS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -76,7 +74,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ equals: 'fadd v2.2d, v0.2d, v1.2d' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ self compile: [ cogit FsubS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -86,7 +84,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ equals: 'fsub v2.2d, v0.2d, v1.2d' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -96,7 +94,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.4s }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -106,7 +104,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.2d }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 0 ]. @@ -116,7 +114,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ equals: 'ld1 { v0.2d }, [x1]' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -126,7 +124,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.4s }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -136,7 +134,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.2d }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 0 ]. diff --git a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st index 50b7051a80..ff35f32f94 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMARMV8SpecificEncodingTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMARMV8SpecificEncodingTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMV8SpecificEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -14,7 +12,7 @@ VMARMV8SpecificEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> armInstructionAt: index [ | addr inst | @@ -24,7 +22,7 @@ VMARMV8SpecificEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ | expectedAddress expectedValue | @@ -48,7 +46,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ | expectedAddress expectedValue | @@ -72,7 +70,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ | expectedAddress expectedValue | @@ -94,7 +92,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ | constant | @@ -110,7 +108,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ | negativeConstant12Bits | @@ -125,7 +123,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstant [ | negativeConstant12Bits | @@ -140,7 +138,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstant [ | negativeConstant12Bits | @@ -155,7 +153,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ | negativeConstant12Bits | @@ -170,7 +168,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ | positiveConstant12Bits | @@ -185,7 +183,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ | positiveConstant12Bits | @@ -200,7 +198,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstant [ | positiveConstant12Bits | @@ -215,7 +213,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstant [ | positiveConstant12Bits | @@ -230,7 +228,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ @@ -245,7 +243,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ @@ -260,7 +258,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ @@ -277,7 +275,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ self assert: machineSimulator x24 hex equals: completementValue hex ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ self doTestEncodeMoveMbrR: -256. @@ -285,7 +283,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMbrR: -1024. @@ -293,7 +291,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ self doTestEncodeMoveMbrR: 255. @@ -301,7 +299,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMbrR: 1024. @@ -309,35 +307,35 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegative9BitConstant [ self doTestEncodeMoveMwrR: -256 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMwrR: -20056 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositive12BitConstant [ self doTestEncodeMoveMwrR: 16r100 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMwrR: 20056 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ self doTestEncodeMoveRMwr: -256. @@ -348,28 +346,28 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ equals: 'stur x23, [x3, #-256]' ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitButShiftableConstant [ self doTestEncodeMoveRMwr: 512 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitNegativeConstant [ self doTestEncodeMoveRMwr: -61440 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithPositive9BitConstant [ self doTestEncodeMoveRMwr: 256 ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self compile: [ @@ -381,7 +379,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self assert: machineSimulator receiverRegisterValue equals: 16r1FF ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self compile: [ @@ -393,7 +391,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self assert: machineSimulator receiverRegisterValue equals: (67108865 bitOr: 16r100) ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithNonEncodableConstant [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st index c7defd272a..e712546ea2 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMAbstractBuilder', - #superclass : 'Object', + #name : #VMAbstractBuilder, + #superclass : #Object, #instVars : [ 'interpreter', 'memory' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ "convinience method to put an oop at a specific place No need to take care of the size of the collection, I'm taking care of it!" @@ -22,22 +20,22 @@ VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> interpreter [ ^ interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> interpreter: anObject [ interpreter := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> memory [ ^ memory ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> memory: anObject [ memory := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st index afe2f98aa3..4b0874a231 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st @@ -1,14 +1,13 @@ Class { - #name : 'VMAbstractFFITest', - #superclass : 'VMAbstractPrimitiveTest', + #name : #VMAbstractFFITest, + #superclass : #VMAbstractPrimitiveTest, #pools : [ 'LibFFIConstants' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argumentTypes withReturnType: returnType [ | functionAddress tfExternalFunction functionExternalAddress tfFunctionDefinition cif cifExternalAddress | @@ -32,7 +31,7 @@ VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argume ^ tfExternalFunction ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ ^ self @@ -41,7 +40,7 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ withReturnType: interpreter libFFI float ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTypes: argumentTypes [ ^ self @@ -50,20 +49,20 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTy withReturnType: interpreter libFFI float ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_FFI . true } ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> interpreterClass [ ^ VMTestMockInterpreter ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> newExternalAddress: anInteger [ | anExternalAddress | @@ -76,7 +75,7 @@ VMAbstractFFITest >> newExternalAddress: anInteger [ ^ anExternalAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> readyProcesses [ | collection | @@ -85,7 +84,7 @@ VMAbstractFFITest >> readyProcesses [ ^ collection ] -{ #category : 'initialization' } +{ #category : #initialization } VMAbstractFFITest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st index 9ae991c41c..1d8d2fb4e2 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st @@ -1,40 +1,38 @@ Class { - #name : 'VMAbstractImageFormatTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMAbstractImageFormatTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'imageReader' ], - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractImageFormatTest >> defaultTimeLimit [ ^ 30 seconds ] -{ #category : 'tests' } +{ #category : #tests } VMAbstractImageFormatTest >> imageFileName [ ^ 'lala.image' ] -{ #category : 'tests' } +{ #category : #tests } VMAbstractImageFormatTest >> readHeader [ ^ imageReader readHeaderFromImage: self imageFileName ] -{ #category : 'actions' } +{ #category : #actions } VMAbstractImageFormatTest >> saveImage [ interpreter writeImageFileIO. ] -{ #category : 'running' } +{ #category : #running } VMAbstractImageFormatTest >> setUp [ super setUp. @@ -57,7 +55,7 @@ VMAbstractImageFormatTest >> setUp [ ] -{ #category : 'ston' } +{ #category : #ston } VMAbstractImageFormatTest >> stonPretty: anObject [ ^ String streamContents: [ :s | @@ -68,7 +66,7 @@ VMAbstractImageFormatTest >> stonPretty: anObject [ ] ] -{ #category : 'running' } +{ #category : #running } VMAbstractImageFormatTest >> tearDown [ self imageFileName asFileReference ensureDeleteAll. diff --git a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st index 9657b0b0bd..11812a06b3 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st @@ -1,17 +1,16 @@ Class { - #name : 'VMAbstractPrimitiveTest', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMAbstractPrimitiveTest, + #superclass : #VMSpurMemoryManagerTest, #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ | aProcess | @@ -24,7 +23,7 @@ VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ ^ aProcess ] -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPriority [ | suspendedContext aProcess | @@ -46,7 +45,7 @@ VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPrior ^ aProcess ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMAbstractPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -57,7 +56,7 @@ VMAbstractPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ ^ methodBuilder @@ -66,7 +65,7 @@ VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ buildMethod ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -115,7 +114,7 @@ VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" diff --git a/smalltalksrc/VMMakerTests/VMBlockTest.class.st b/smalltalksrc/VMMakerTests/VMBlockTest.class.st index 8481eab72c..b257001c87 100644 --- a/smalltalksrc/VMMakerTests/VMBlockTest.class.st +++ b/smalltalksrc/VMMakerTests/VMBlockTest.class.st @@ -1,26 +1,24 @@ Class { - #name : 'VMBlockTest', - #superclass : 'VMInterpreterTests', + #name : #VMBlockTest, + #superclass : #VMInterpreterTests, #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> anEmptyMethod [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> evaluatingABlock [ [^1] value ] -{ #category : 'helpers' } +{ #category : #helpers } VMBlockTest >> installFullBlockClosureClass [ | aClass | aClass := self @@ -34,14 +32,14 @@ VMBlockTest >> installFullBlockClosureClass [ withValue: aClass ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodReturningABlock [ ^ [] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ true ifTrue: [ @@ -50,14 +48,14 @@ VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ ^ [ anArgument ] ] ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodReturningABlockWithTwoArguments [ ^ [:a :b] ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodWithLocalReturningABlock [ | a | @@ -65,14 +63,14 @@ VMBlockTest >> methodWithLocalReturningABlock [ ^ [ a ] ] -{ #category : 'running' } +{ #category : #running } VMBlockTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testCreatingABlockCapturesReceiver [ | methodReturning initialMethod | @@ -97,7 +95,7 @@ VMBlockTest >> testCreatingABlockCapturesReceiver [ self assert: (memory fetchPointer: FullClosureReceiverIndex ofObject: interpreter stackTop) equals: memory trueObject ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ | methodReturning initialMethod placeTakenByLiterals closure blockInitialPC compiledBlock | @@ -134,7 +132,7 @@ VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ | methodReturning initialMethod | @@ -161,7 +159,7 @@ VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ assert: (memory fetchPointer: FullClosureFirstCopiedValueIndex ofObject: interpreter stackTop) equals: (memory integerObjectOf: 2) ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ | methodReturning initialMethod | @@ -190,7 +188,7 @@ VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ self assert: (interpreter isWidowedContext: (memory outerContextOf: interpreter stackTop)) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable [ | methodReturning initialMethod | @@ -217,7 +215,7 @@ VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ | methodReturning initialMethod | @@ -244,7 +242,7 @@ VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testEvaluatingABlock [ | methodReturning initialMethod | @@ -276,7 +274,7 @@ VMBlockTest >> testEvaluatingABlock [ equals: (memory classAtIndex: ClassFullBlockClosureCompactIndex) ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testPushClosureBytecodePushesClosure [ | methodReturning initialMethod | diff --git a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st index 459f61526b..1fea546beb 100644 --- a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMByteCodesTest', - #superclass : 'VMInterpreterTests', + #name : #VMByteCodesTest, + #superclass : #VMInterpreterTests, #instVars : [ 'contextOop', 'context', 'callingFrame', 'topFrame' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -23,7 +21,7 @@ VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ self assert: (interpreter temporary: anIndex in: interpreter framePointer) equals: anOop ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock pushed: anOop [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -35,7 +33,7 @@ VMByteCodesTest >> assert: aBlock pushed: anOop [ ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock returned: anOop [ | callerSP | callerSP := interpreter frameCallerSP: interpreter framePointer. @@ -47,7 +45,7 @@ VMByteCodesTest >> assert: aBlock returned: anOop [ ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assertPopped: aBlock [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -58,24 +56,24 @@ VMByteCodesTest >> assertPopped: aBlock [ ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> firstPushTemporaryVariableBytecode [ "in v3 bytecode table" ^ 16 ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> firstStoreAndPopTemporaryVariableBytecode [ ^ 104 ] -{ #category : 'helper-interpret' } +{ #category : #'helper-interpret' } VMByteCodesTest >> interpret: aBlock [ aBlock value ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> interpretNextBytecode [ | count | @@ -85,7 +83,7 @@ VMByteCodesTest >> interpretNextBytecode [ count = 1 ] ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> interpretWithFrame: aBlock [ callingFrame := stackBuilder addNewFrame method: @@ -97,7 +95,7 @@ VMByteCodesTest >> interpretWithFrame: aBlock [ self interpret: aBlock ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> pushTempTest: index [ stackBuilder addNewFrame tempAt: index put: (memory integerObjectOf: 42). @@ -111,13 +109,13 @@ VMByteCodesTest >> pushTempTest: index [ ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> pushTemporaryVariableBytecodeAt: offset [ ^ self firstPushTemporaryVariableBytecode + offset. ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> pushThisContextTopFrame [ self interpretWithFrame: [ interpreter pushActiveContextBytecode ]. @@ -128,14 +126,14 @@ VMByteCodesTest >> pushThisContextTopFrame [ withInterpreter: interpreter ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> setUp [ super setUp. self installFloat64RegisterClass ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ stackBuilder addNewFrame @@ -151,12 +149,12 @@ VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ intoTemporary: index ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> storeAndPopTemporaryVariableBytecodeAt: anInteger [ ^ self firstStoreAndPopTemporaryVariableBytecode + anInteger ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ | oldMaybeSenderContext newMaybeSenderContext | self interpretWithFrame: [ interpreter pushActiveContextBytecode. ]. @@ -166,7 +164,7 @@ VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ self assert: oldMaybeSenderContext equals: newMaybeSenderContext ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testAddVectorBytecode [ | index v0 v1 result firstTerm size | @@ -193,7 +191,7 @@ VMByteCodesTest >> testAddVectorBytecode [ ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testArraySumUsingVectorBytecode [ | cm x y result simulatedMethod z | @@ -235,7 +233,7 @@ VMByteCodesTest >> testArraySumUsingVectorBytecode [ ] -{ #category : 'tests-complex' } +{ #category : #'tests-complex' } VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMethod [ | class object objectToPutInSlot attemptToAssignMethod attemptToAssignSelector aMethodDictionary | @@ -279,7 +277,7 @@ VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMe self assert: topFrame method equals: attemptToAssignMethod ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ | v0 v1 result method | @@ -306,7 +304,7 @@ VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 6.0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testDuplicateStackTop [ stackBuilder addNewFrame ; buildStack. @@ -323,7 +321,7 @@ VMByteCodesTest >> testDuplicateStackTop [ ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPopStackTopBytecode [ stackBuilder addNewFrame ; buildStack. @@ -339,7 +337,7 @@ VMByteCodesTest >> testPopStackTopBytecode [ ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testPushArrayToRegisterBytecode [ | array index result | @@ -364,7 +362,7 @@ VMByteCodesTest >> testPushArrayToRegisterBytecode [ ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantFalseBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -372,7 +370,7 @@ VMByteCodesTest >> testPushConstantFalseBytecode [ pushed: memory falseObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantMinusOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -380,7 +378,7 @@ VMByteCodesTest >> testPushConstantMinusOneBytecode [ pushed: (memory integerObjectOf: -1) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantNilBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -388,7 +386,7 @@ VMByteCodesTest >> testPushConstantNilBytecode [ pushed: memory nilObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -396,7 +394,7 @@ VMByteCodesTest >> testPushConstantOneBytecode [ pushed: (memory integerObjectOf: 1) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantReceiverBytecode [ | intReceiver | intReceiver := memory integerObjectOf: 42. @@ -409,7 +407,7 @@ VMByteCodesTest >> testPushConstantReceiverBytecode [ pushed: intReceiver ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantTrueBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -417,7 +415,7 @@ VMByteCodesTest >> testPushConstantTrueBytecode [ pushed: memory trueObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantTwoBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -425,7 +423,7 @@ VMByteCodesTest >> testPushConstantTwoBytecode [ pushed: (memory integerObjectOf: 2) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantZeroBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -433,74 +431,74 @@ VMByteCodesTest >> testPushConstantZeroBytecode [ pushed: (memory integerObjectOf: 0) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp0 [ self pushTempTest: 0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp1 [ self pushTempTest: 1 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp10 [ self pushTempTest: 10 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp11 [ self pushTempTest: 11 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp2 [ self pushTempTest: 2 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp3 [ self pushTempTest: 3 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp4 [ self pushTempTest: 4 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp5 [ self pushTempTest: 5 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp6 [ self pushTempTest: 6 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp7 [ self pushTempTest: 7 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp8 [ self pushTempTest: 8 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp9 [ self pushTempTest: 9 ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextIsContext [ self pushThisContextTopFrame. self assert: (memory isContext: interpreter stackTop). ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ self pushThisContextTopFrame. @@ -510,7 +508,7 @@ VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ equals: (interpreter frameCallerFP: interpreter framePointer) ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ self pushThisContextTopFrame. @@ -521,28 +519,28 @@ VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ equals: interpreter framePointer ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidReceiver [ self pushThisContextTopFrame. self assert: topFrame receiver equals: context receiver ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameContext: interpreter framePointer) equals: interpreter stackTop. ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetFlagContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameHasContext: interpreter framePointer). ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ | previousTop newTop | self interpretWithFrame: [ @@ -554,7 +552,7 @@ VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ self assert: newTop equals: previousTop. ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testReturnFalse [ "We need to return to a method. @@ -570,7 +568,7 @@ VMByteCodesTest >> testReturnFalse [ returned: memory falseObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testReturnTrue [ "We need to return to a method. @@ -586,7 +584,7 @@ VMByteCodesTest >> testReturnTrue [ returned: memory trueObject ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ | topFrameContext | self interpretWithFrame: [ @@ -600,7 +598,7 @@ VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ self assert: (interpreter isWidowedContext: topFrameContext) ] -{ #category : 'tests-send' } +{ #category : #'tests-send' } VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ | selectorOop aMethod aMethodToActivate receiver receiverClass aMethodDictionary arg1 arg2 | @@ -647,47 +645,47 @@ VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ self assert: interpreter stackTop equals: receiver ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary0 [ self storeAndPopTemporaryIntoTempTest: 0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary1 [ self storeAndPopTemporaryIntoTempTest: 1 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary2 [ self storeAndPopTemporaryIntoTempTest: 2 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary3 [ self storeAndPopTemporaryIntoTempTest: 3 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary4 [ self storeAndPopTemporaryIntoTempTest: 4 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary5 [ self storeAndPopTemporaryIntoTempTest: 5 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary6 [ self storeAndPopTemporaryIntoTempTest: 6 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary7 [ self storeAndPopTemporaryIntoTempTest: 7 ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ | register index array result | @@ -718,7 +716,7 @@ VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ self assert: (memory fetchFloat64: 3 ofObject: array) equals: 6.0. ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testSubVectorBytecode [ | index vector0 vector1 result | diff --git a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st index 1abed9f7a5..517ef6edc4 100644 --- a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMBytecodeMethod', - #superclass : 'Object', + #name : #VMBytecodeMethod, + #superclass : #Object, #instVars : [ 'virtualMachine', 'methodOop' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop [ ^ self new @@ -19,13 +17,13 @@ VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> at: index [ ^ virtualMachine objectMemory fetchByte: index - 1 "0 based" ofObject: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> disassemble [ | symbolicBytecodes | symbolicBytecodes := SymbolicBytecodeBuilder decode: self. @@ -33,52 +31,52 @@ VMBytecodeMethod >> disassemble [ ' join: (symbolicBytecodes collect: [ :sbc | sbc description ]) ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> encoderClass [ ^ EncoderForSistaV1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> endPC [ ^ virtualMachine objectMemory bytesInObject: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> initialPC [ "Answer the program counter for the receiver's first bytecode." ^ (self numLiterals + 1) * virtualMachine objectMemory wordSize + 1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> literalAt: anInteger [ ^ 'literal key' -> 'literal?' ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> methodOop [ ^ methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> methodOop: anObject [ methodOop := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> numLiterals [ ^ virtualMachine objectMemory literalCountOf: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st index 800da59986..05a1565127 100644 --- a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMCodeCompactionTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMCodeCompactionTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod [ "Create the root context with a valid method" @@ -34,7 +32,7 @@ VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod ] -{ #category : 'utils' } +{ #category : #utils } VMCodeCompactionTest >> createFillingMethods: anInteger [ | firstMethod | @@ -47,7 +45,7 @@ VMCodeCompactionTest >> createFillingMethods: anInteger [ ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> fillCodeZone [ | aMethod | @@ -63,13 +61,13 @@ VMCodeCompactionTest >> fillCodeZone [ ] -{ #category : 'running' } +{ #category : #running } VMCodeCompactionTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -112,7 +110,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenUsingPrimCallMayCallBackShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -151,7 +149,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToTheBeginning [ | firstMethod compactMethod methodOop | @@ -174,7 +172,7 @@ VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToThe ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ | firstMethod cogMethod methodOop | @@ -208,7 +206,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ | firstMethod cogMethod methodOop | @@ -241,7 +239,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ | firstMethod cogMethod methodOop | @@ -274,7 +272,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ equals: (interpreter cogMethodOf: methodOop) ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ | firstMethod callerMethodOop calleeCogMethod selector callerCogMethod calleeMethodOop | @@ -324,7 +322,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ equals: (interpreter cogMethodOf: calleeMethodOop) asInteger + cogit entryOffset ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -421,7 +419,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ equals: cogit ceCPICMissTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -511,7 +509,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbo equals: cogit cePICAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -585,7 +583,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsi equals: cogit cePICAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testRelocatingAMethodDoesNotAffectTheFrameCreationPushes [ | firstMethod compactMethod methodOop readOnlyObject | diff --git a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st index 1ba5d89ee9..8f8e44af1f 100644 --- a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMCogitHelpersTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMCogitHelpersTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'checkIsSmallInteger', 'checkNotSmallInteger' @@ -9,12 +9,10 @@ Class { 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -24,7 +22,7 @@ VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -34,7 +32,7 @@ VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -44,7 +42,7 @@ VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -54,14 +52,14 @@ VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> runUntilReturnFrom: anAddress [ self prepareCall. super runUntilReturnFrom: anAddress ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> setUp [ super setUp. @@ -92,7 +90,7 @@ VMCogitHelpersTest >> setUp [ ]. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ self assertNotInSmallIntegerRange: memory maxSmallInteger + 1. @@ -103,14 +101,14 @@ VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithValidSmallIntegers [ self denyIsNotInSmallIntegerRange: 0. self denyIsNotInSmallIntegerRange: memory maxSmallInteger. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ self denyIsInSmallIntegerRange: memory maxSmallInteger + 1. @@ -121,7 +119,7 @@ VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithValidSmallIntegers [ self assertIsInSmallIntegerRange: 0. diff --git a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st index a12f0e88c7..0daae71c73 100644 --- a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMCompiledCodeBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMCompiledCodeBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'slotSize', 'numberOfTemporaries', @@ -15,18 +15,16 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> address [ ^ method ] -{ #category : 'deprecated' } +{ #category : #deprecated } VMCompiledCodeBuilder >> build [ self @@ -36,14 +34,14 @@ VMCompiledCodeBuilder >> build [ ^ self buildMethod ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> buildMethod [ self instantiateMethod. self fillMethod. ^ method ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> buildMethodHeader [ ^ (numberOfArguments bitShift: 24) @@ -53,7 +51,7 @@ VMCompiledCodeBuilder >> buildMethodHeader [ + (isPrimitive asBit << 16) ] -{ #category : 'helper' } +{ #category : #helper } VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ | methodHeader | "1 based" @@ -63,17 +61,17 @@ VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> bytecodes [ ^ bytecodes ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> bytecodes: anObject [ bytecodes := anObject ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> classIndexToUse [ | newClass | memory nilObject = (memory splObj: 16) ifTrue: [ @@ -90,7 +88,7 @@ VMCompiledCodeBuilder >> classIndexToUse [ ^ memory classTagForClass: (memory splObj: 16) ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self newMethod. @@ -101,7 +99,7 @@ VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self fillLiteralsFromPharo: aCompiledMethod allLiterals ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ originalLiterals := pharoLiterals copy. @@ -109,14 +107,14 @@ VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillMethod [ self putHeaderInMethod. self putLiteralInMethod. self putBytecodesInMethod. ] -{ #category : 'initialization' } +{ #category : #initialization } VMCompiledCodeBuilder >> initialize [ bytecodes := #[1 2 3 4 5 6 7 8 9 0]. literals := OrderedCollection new. @@ -131,7 +129,7 @@ VMCompiledCodeBuilder >> initialize [ slotSize := nil. ] -{ #category : 'inspecting' } +{ #category : #inspecting } VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ @@ -159,7 +157,7 @@ VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ yourself ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> instantiateMethod [ slotSize := literals size + (bytecodes size / memory wordSize) ceiling @@ -172,73 +170,73 @@ VMCompiledCodeBuilder >> instantiateMethod [ method ifNotNil: [ memory fillObj: method numSlots: slotSize with: memory nilObject ]. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isPrimitive [ ^ isPrimitive ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isPrimitive: anObject [ isPrimitive := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isSmall [ ^ isSmall ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isSmall: anObject [ isSmall := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literalAt: anIndex put: anOop [ self collection: literals at: anIndex put: anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literals [ ^ literals ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literals: anObject [ literals := anObject. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> method [ ^ method ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> newMethod [ self initialize. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfArguments [ ^ numberOfArguments ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfArguments: anObject [ numberOfArguments := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfTemporaries [ ^ numberOfTemporaries ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfTemporaries: anObject [ numberOfTemporaries := anObject ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putBytecodesInMethod [ bytecodes doWithIndex:[ :aBytecode :anIndex | memory storeByte: @@ -251,7 +249,7 @@ VMCompiledCodeBuilder >> putBytecodesInMethod [ ] ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putHeaderInMethod [ memory storePointer: 0 ofObject: method @@ -259,7 +257,7 @@ VMCompiledCodeBuilder >> putHeaderInMethod [ ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putLiteralInMethod [ originalLiterals doWithIndex: [ :aLiteral :anIndex | @@ -277,7 +275,7 @@ VMCompiledCodeBuilder >> putLiteralInMethod [ memory storePointer: anIndex ofObject: method withValue: aLiteral ] ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ "In the case of CompiledBlocks we need to put the outerCode object (the last literal). @@ -286,7 +284,7 @@ VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ literals at: literals size put: aVMCompiledCodeBuilder address ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> slotSize [ "Do not set by hand !" ^ slotSize diff --git a/smalltalksrc/VMMakerTests/VMContext.class.st b/smalltalksrc/VMMakerTests/VMContext.class.st index 4458533aba..af9973c650 100644 --- a/smalltalksrc/VMMakerTests/VMContext.class.st +++ b/smalltalksrc/VMMakerTests/VMContext.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMContext', - #superclass : 'Object', + #name : #VMContext, + #superclass : #Object, #instVars : [ 'contextOop', 'interpreter' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^ self new contextOop: anInteger; @@ -21,7 +19,7 @@ VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSim yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> caller [ | senderContext | @@ -37,12 +35,12 @@ VMContext >> caller [ ^ VMContext newOnContext: senderContext withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> contextOop: anInteger [ contextOop := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> description [ | homeContextOop method selector | homeContextOop := interpreter findHomeForContext: contextOop. @@ -52,32 +50,32 @@ VMContext >> description [ ^ interpreter stringOf: selector ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> instructionPointer [ ^interpreter objectMemory fetchPointer: InstructionPointerIndex ofObject: contextOop. ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : 'testing' } +{ #category : #testing } VMContext >> isMarried [ ^interpreter isStillMarriedContext: contextOop. ] -{ #category : 'testing' } +{ #category : #testing } VMContext >> isNilObject [ ^interpreter objectMemory nilObject = contextOop. ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> receiver [ ^interpreter objectMemory fetchPointer: ReceiverIndex ofObject: contextOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> sender [ ^interpreter objectMemory fetchPointer: SenderIndex ofObject: contextOop. ] diff --git a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st index 24c05b336c..a43fdf619d 100644 --- a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st +++ b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMContextAccessTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMContextAccessTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: anIndex [ | originalPC copiedPC | @@ -19,7 +17,7 @@ VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: a self assert: copiedPC equals: originalPC ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> pushActiveContext [ interpreter pushActiveContextBytecode. @@ -27,7 +25,7 @@ VMContextAccessTest >> pushActiveContext [ ^ interpreter stackTop ] -{ #category : 'running' } +{ #category : #running } VMContextAccessTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -61,7 +59,7 @@ VMContextAccessTest >> setUp [ self initializeOldSpaceForFullGC ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectPC [ | contextOop newContext | @@ -75,7 +73,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPC [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ | contextOop newContext | @@ -93,7 +91,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ | contextOop newContext | @@ -108,7 +106,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectSenderWhenItIsNil [ | contextOop newContext | diff --git a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st index 052c3aafb4..a6cdd6a8b6 100644 --- a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMDivisionInstructionTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMDivisionInstructionTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotient remainer: remainer [ | expectedQuotient expectedRemainer | @@ -32,63 +30,63 @@ VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotien self assert: machineSimulator classRegisterValue equals: expectedRemainer ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 7 quotient: -1 remainer: -3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorAndDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -7 quotient: 1 remainer: -3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -7 quotient: -1 remainer: 3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 7 quotient: 1 remainer: 3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 2 quotient: 5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -2 quotient: -5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorAndDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -2 quotient: 5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 2 quotient: -5 remainer: 0. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMDivisionInstructionTest >> twoComplementOf: anInteger [ ^ self wordSize = 8 diff --git a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st index 0d7d7a6f1c..ad4a802dc9 100644 --- a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st @@ -1,29 +1,28 @@ Class { - #name : 'VMFFIArgumentMarshallingTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIArgumentMarshallingTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'private' } +{ #category : #private } VMFFIArgumentMarshallingTest class >> isAbstract [ ^ self == VMFFIArgumentMarshallingTest ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self subclassResponsibility ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self subclassResponsibility ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ | newLargeInteger byteSize class | @@ -44,7 +43,7 @@ VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ ^ newLargeInteger ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorrectly [ self @@ -53,7 +52,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorr expectedValue: 17 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrectly [ self @@ -62,7 +61,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrect expectedValue: 17.0 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectly [ self @@ -71,7 +70,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectl expectedValue: 17.0 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrectly [ self @@ -80,7 +79,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrec expectedValue: 17 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -89,7 +88,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -98,7 +97,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesBadArgument [ self @@ -108,7 +107,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesBadArgument [ self @@ -118,7 +117,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue aValueToStore | @@ -135,7 +134,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -150,7 +149,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -159,7 +158,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -168,7 +167,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesBadArgument [ | valueToStore | @@ -184,7 +183,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesBadArgument [ self @@ -194,7 +193,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue | @@ -206,7 +205,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -225,7 +224,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -238,7 +237,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveVa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -247,7 +246,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -256,7 +255,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -265,7 +264,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsM expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -274,7 +273,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsM expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBadArgument [ self @@ -284,7 +283,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBadArgument [ self @@ -294,7 +293,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -311,7 +310,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshall expectedValue: storedValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -328,7 +327,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalled expectedValue: storedValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFails [ self @@ -337,7 +336,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -346,7 +345,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIs expectedValue: 8 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self @@ -355,7 +354,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -370,7 +369,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -385,7 +384,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveVa expectedValue: 16r3FFFFFFF + 2 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFails [ self @@ -394,7 +393,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -403,7 +402,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ | valueToStore | @@ -418,7 +417,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -437,7 +436,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -449,7 +448,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFails [ self @@ -458,7 +457,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -467,7 +466,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFails [ self @@ -476,7 +475,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFail failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -485,7 +484,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsM expectedValue: 8 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self diff --git a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st index b5bcbc2d51..be1875a921 100644 --- a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFICallbacksTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFICallbacksTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ interpreter push: memory nilObject. @@ -17,7 +16,7 @@ VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -52,7 +51,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProc interpreter primitiveSameThreadCallout. ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcessesInReady [ | parametersArray tfExternalFunction callbackContext processBefore | @@ -78,7 +77,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcesse self assertCollection: self readyProcesses hasSameElements: processBefore ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -105,7 +104,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess self assert: interpreter activeProcess equals: oldActiveProcess. ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadReentrantCallbackRestoresCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext numberOfCallbacks innerCallbackContext tfExternalFunction2 | diff --git a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st index 8d27531029..57db1b5e98 100644 --- a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFIHelpersTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIHelpersTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> assertPopInEmptyStackFails [ [ interpreter popSameThreadCalloutSuspendedProcess. @@ -16,7 +15,7 @@ VMFFIHelpersTest >> assertPopInEmptyStackFails [ equals: 'SameThreadCalloutSuspendedProcessStack is empty' ] ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesError [ self assert: (memory splObj: SuspendedProcessInCallout) equals: memory nilObject. @@ -24,7 +23,7 @@ VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesEr self assertPopInEmptyStackFails ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcess [ | aProcess anotherProcess | @@ -42,7 +41,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -60,7 +59,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcess [ | aProcess anotherProcess | @@ -76,7 +75,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -92,7 +91,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresThePassedProcess [ | aProcess | @@ -105,7 +104,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresT ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdatesNextLinkWithNil [ | aProcess | @@ -118,7 +117,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdates ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackFails [ | aProcess | @@ -133,7 +132,7 @@ VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptySt ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsProcessWithNilInNextLink [ | aProcess | @@ -146,7 +145,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsPushedProcess [ | aProcess | @@ -159,7 +158,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testReadAddressReadsTheValidAddressValue [ | anExternalAddress | diff --git a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st index a3aefe8ff7..03182807ca 100644 --- a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st @@ -1,23 +1,22 @@ Class { - #name : 'VMFFIReturnMarshallingTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIReturnMarshallingTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'private' } +{ #category : #private } VMFFIReturnMarshallingTest class >> isAbstract [ ^ self = VMFFIReturnMarshallingTest ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ self subclassResponsibility ] -{ #category : 'utils' } +{ #category : #utils } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedLargeIntegerValue: expectedValue [ self @@ -37,7 +36,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedSmalltalkValue: expectedValue [ self @@ -51,7 +50,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteArray [ | valueToReturn | @@ -73,7 +72,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteAr ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatInStack [ self @@ -85,7 +84,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatI ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatInStack [ self @@ -97,7 +96,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatIn ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExternalAddress [ @@ -111,7 +110,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExtern ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallInteger [ self @@ -120,7 +119,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeInteger [ | value | @@ -132,7 +131,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallInteger [ | value | @@ -146,7 +145,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeInteger [ self @@ -155,7 +154,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallInteger [ self @@ -164,7 +163,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger [ self @@ -173,7 +172,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger expectedSmalltalkValue: INT8_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallInteger [ self @@ -182,7 +181,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeInteger [ | value | @@ -194,7 +193,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallInteger [ | value | @@ -208,7 +207,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeInteger [ self @@ -217,7 +216,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallInteger [ self @@ -226,7 +225,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT8PushSmallInteger [ self diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st index ba96a06ec5..d18e6ecd88 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadArgumentMarshallingTest', - #superclass : 'VMFFIArgumentMarshallingTest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadArgumentMarshallingTest, + #superclass : #VMFFIArgumentMarshallingTest, + #category : #VMMakerTests } -{ #category : 'implementation' } +{ #category : #implementation } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ | parametersArray tfExternalFunction savedValue | @@ -29,7 +28,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: savedValue equals: expectedValue. ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ | parametersArray tfExternalFunction savedValue | @@ -53,7 +52,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFISameThreadArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ | parametersArray tfExternalFunction functionCalled | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st index 4a8ee9389a..33727d32a7 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadCalloutTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadCalloutTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - callouts' } +{ #category : #'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess | @@ -25,7 +24,7 @@ VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProce self assert: interpreter activeProcess equals: oldActiveProcess ] -{ #category : 'tests - callouts' } +{ #category : #'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutShouldKeepTheNewMethodVariable [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st index 71a34defe3..bccbc9e6b1 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadReturnMarshallingTest', - #superclass : 'VMFFIReturnMarshallingTest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadReturnMarshallingTest, + #superclass : #VMFFIReturnMarshallingTest, + #category : #VMMakerTests } -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ | parametersArray tfExternalFunction | @@ -27,7 +26,7 @@ VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType aBlock value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st index 177e8e7463..884e602d1e 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerArgumentMarshallingTest', - #superclass : 'VMFFIArgumentMarshallingTest', + #name : #VMFFIWorkerArgumentMarshallingTest, + #superclass : #VMFFIArgumentMarshallingTest, #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -11,11 +11,10 @@ Class { 'task', 'savedValue' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -33,7 +32,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: savedValue equals: expectedValue ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -42,7 +41,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofType: argumentType [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. @@ -78,21 +77,21 @@ VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofTy interpreter primitiveWorkerCallout ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerArgumentMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'running' } +{ #category : #running } VMFFIWorkerArgumentMarshallingTest >> setUp [ super setUp. interpreter libFFI testWorker clear ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st index 0cabd48fa0..10fc6eeb4f 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerCalloutTest', - #superclass : 'VMAbstractFFITest', + #name : #VMFFIWorkerCalloutTest, + #superclass : #VMAbstractFFITest, #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -9,17 +9,16 @@ Class { 'workerOop', 'semaphoreIndex' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes [ ^ self doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: interpreter libFFI void ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: returnType [ aFunctionBlock := [ self fail: 'It should enqueue it, not execute it' ]. @@ -50,21 +49,21 @@ VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: ar interpreter primitiveWorkerCallout ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutEnqueuesOnlyOneTask [ self doWorkerCallWithArguments: {} ofTypes: {}. self assert: interpreter libFFI testWorker tasks size equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIfPrimitiveFails [ | previous | @@ -87,7 +86,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIf self assert: interpreter allocatedElements size equals: previous. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocateReturnHolder [ self doWorkerCallWithArguments: {} ofTypes: {}. @@ -95,7 +94,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocate self assert: interpreter libFFI testWorker tasks first returnHolderAddress isNil ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgumentHoldersAndReturnHolderInCHeap [ | previous | @@ -117,7 +116,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgum self assert: interpreter allocatedElements size equals: previous + 7. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithReturnAllocateJustOne [ | previous | @@ -128,7 +127,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithRetu self assert: interpreter allocatedElements size equals: previous + 1. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutReturnDoesNotAllocate [ | previous | @@ -139,7 +138,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutR self assert: interpreter allocatedElements size equals: previous. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersHasNilAsParametersPointer [ self doWorkerCallWithArguments: {} ofTypes: {}. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st index d413ef8af6..92a15a06fb 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerReturnMarshallingTest', - #superclass : 'VMFFIReturnMarshallingTest', + #name : #VMFFIWorkerReturnMarshallingTest, + #superclass : #VMFFIReturnMarshallingTest, #instVars : [ 'tfExternalFunction', 'returnHolder', @@ -12,11 +12,10 @@ Class { 'worker', 'workerOop' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ tfExternalFunction := self @@ -55,14 +54,14 @@ VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType ret aBlock value. ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st index dc8609f7ca..52f52916aa 100644 --- a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMForwardLiteralInMachineMethodTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMForwardLiteralInMachineMethodTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMForwardLiteralInMachineMethodTest >> initStack [ self createBaseFrame. @@ -24,13 +22,13 @@ VMForwardLiteralInMachineMethodTest >> initStack [ ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMForwardLiteralInMachineMethodTest >> methodWithGlobal [ ^ Smalltalk ] -{ #category : 'tests' } +{ #category : #tests } VMForwardLiteralInMachineMethodTest >> testForwardLiteralInMethod [ | machineCodeMethod literal methodOop array literalValue selector associationClass valueClass literalKey | diff --git a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st index 7716e906f5..a0768e8b2c 100644 --- a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st @@ -42,8 +42,8 @@ Configuring of the frame. When it links them, it gives the last frame the previous caller Frame, for debug purpose. " Class { - #name : 'VMFrameBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMFrameBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'method', 'context', @@ -61,12 +61,10 @@ Class { 'methodBuilder', 'isSuspended' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> adaptAddressToMemory: anInteger [ anInteger = memory nilObject ifTrue: [ ^ #nilObject ]. anInteger = memory trueObject ifTrue: [ ^ #trueObject ]. @@ -75,70 +73,70 @@ VMFrameBuilder >> adaptAddressToMemory: anInteger [ "^ memory integerObjectOf: anInteger" ] -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> adaptAddressToMemoryIfInteger: anAssociation [ anAssociation value isInteger ifTrue: [ anAssociation value: (self adaptAddressToMemory: anAssociation value) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> argumentSize [ ^ argumentSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> argumentSize: anObject [ argumentSize := anObject ] -{ #category : 'configuring' } +{ #category : #configuring } VMFrameBuilder >> beSuspended [ isSuspended := true ] -{ #category : 'configuring' } +{ #category : #configuring } VMFrameBuilder >> beSuspendedAt: anInstructionPointer [ instructionPointer := anInstructionPointer. self beSuspended ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> callerFrame [ ^ callerFrame ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> callerFrame: aFrame [ callerFrame := aFrame ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> context [ ^ context ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> context: anObject [ context := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> flags [ ^ flags ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> flags: anObject [ flags := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> framePointer [ ^ myFramePointer ] -{ #category : 'initialization' } +{ #category : #initialization } VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory andMethodBuilder: aMethodBuilder [ memory := aMemory. interpreter := anInterpreter. "allow to not care if it's for a cog or stack interpreter" @@ -155,7 +153,7 @@ VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory an argumentSize := 0. ] -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> inspectFrameIn: aBuilder [ @@ -186,12 +184,12 @@ VMFrameBuilder >> inspectFrameIn: aBuilder [ yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> instructionPointer [ ^ instructionPointer ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> isMarried [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -200,7 +198,7 @@ VMFrameBuilder >> isMarried [ ifFalse: [ interpreter isStillMarriedContext: contextOop ] ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> isSingle [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -211,43 +209,43 @@ VMFrameBuilder >> isSingle [ interpreter isSingleContext: contextOop ] ] -{ #category : 'testing' } +{ #category : #testing } VMFrameBuilder >> isSuspended [ ^ isSuspended ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> marryToContext [ interpreter ensureFrameIsMarried: myFramePointer SP: myStackPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> method [ ^ method ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> method: anOop [ method := anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> previousFrameArgsSize [ ^ previousFrameArgsSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> previousFrameArgsSize: anObject [ previousFrameArgsSize := anObject ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushCurrentFramesStack [ "push to the stack all objects in the frame stack" stack do: [ :oop | interpreter push: oop ]. ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushFlags [ "Flags: this stack frame is single. I.e., it has no context object. Otherwise GC fails with an assertion looking for it in the heap" @@ -258,14 +256,14 @@ VMFrameBuilder >> pushFlags [ interpreter push: flags ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushFrame [ interpreter push: receiver. temps do: [ :oop | interpreter push: oop ]. ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushYourself [ self setVariablesFromCompiledMethod. @@ -288,17 +286,17 @@ VMFrameBuilder >> pushYourself [ ^ myFramePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> receiver [ ^ receiver ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> receiver: anObject [ receiver := anObject ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setArgsFromMethod [ | argNumber | argNumber := interpreter argumentCountOf: method. @@ -309,7 +307,7 @@ VMFrameBuilder >> setArgsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of arguments from the method oop.' ]] ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ "If possible, setting IP to before the first bytecode, so it is ready for fetchNextBytecode" @@ -319,7 +317,7 @@ VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ interpreter instructionPointer: instructionPointer ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setTempsFromMethod [ | tempNumber | tempNumber := interpreter tempCountOf: method. @@ -330,7 +328,7 @@ VMFrameBuilder >> setTempsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of temporaries from the method oop.' ]] ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setVariablesFromCompiledMethod [ (memory isCompiledMethod: method) ifFalse: [ ^ self ]. @@ -339,43 +337,43 @@ VMFrameBuilder >> setVariablesFromCompiledMethod [ self setArgsFromMethod ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stack [ ^ stack ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stack: anObject [ stack := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stackPointer [ ^ myStackPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> tempAt: anIndex put: anOop [ self collection: temps at: anIndex put: anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> temps [ ^ temps ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> temps: anObject [ temps := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> vmMethodBuilder [ ^ vmMethodBuilder ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> vmMethodBuilder: anObject [ vmMethodBuilder := anObject diff --git a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st index 49fbba1248..c7610209f4 100644 --- a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMImageHeaderWritingTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #name : #VMImageHeaderWritingTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'running' } +{ #category : #running } VMImageHeaderWritingTest >> setUp [ super setUp. @@ -20,7 +18,7 @@ VMImageHeaderWritingTest >> setUp [ self saveImage. ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ | header permanentObject | @@ -37,7 +35,7 @@ VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ + (memory bytesInObject: permanentObject) + 16 "PermSpace has an empty object as first object.". ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ | header | @@ -47,7 +45,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ self assert: header oldBaseAddr equals: memory getMemoryMap oldSpaceStart ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ | header | @@ -57,7 +55,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ self assert: header freeOldSpaceInImage equals: memory bytesLeftInOldSpace ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ | header | @@ -67,7 +65,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ self assert: header hdrCogCodeSize equals: interpreter unknownShortOrCodeSizeInKs ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ | header | @@ -77,7 +75,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ self assert: header dataSize equals: memory imageSizeToWrite ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ | header | @@ -87,7 +85,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ self assert: header hdrEdenBytes equals: interpreter getDesiredEdenBytes ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages [ | header | @@ -97,7 +95,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages self assert: header hdrNumStackPages equals: interpreter getDesiredNumStackPages ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable [ | header | @@ -107,7 +105,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable self assert: header hdrMaxExtSemTabSize equals: (interpreter getMaxExtSemTabSizeSet ifTrue: [interpreter ioGetMaxExtSemTableSize] ifFalse: [0]) ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ | header | @@ -117,7 +115,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ self assert: header extraVMMemory equals: interpreter getExtraVMMemory ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ | header | @@ -127,7 +125,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ self assert: header firstSegSize equals: memory firstSegmentBytes ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ | header | @@ -137,7 +135,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ self assert: header headerFlags equals: interpreter getImageHeaderFlags ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ | header expectedHeaderSize | @@ -149,7 +147,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ self assert: header imageHeaderSize equals: expectedHeaderSize. ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ | header | @@ -159,7 +157,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ self assert: header imageFormat equals: interpreter imageFormatVersion ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ | header | @@ -169,7 +167,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ self assert: header imageVersion equals: interpreter getImageVersion ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ | header | @@ -179,7 +177,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ self assert: header hdrLastHash equals: memory lastHash ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop [ | header | @@ -189,7 +187,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop self assert: header initialSpecialObjectsOop equals: memory specialObjectsOop ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONHeader [ | header readHeader | @@ -203,7 +201,7 @@ VMImageHeaderWritingTest >> testWritingSTONHeader [ self assert: readHeader equals: (self stonPretty: header). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONPermSpace [ | writtenMetadata expectedPermSpaceMetadata | @@ -224,7 +222,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpace [ self assert: writtenMetadata equals: (self stonPretty: expectedPermSpaceMetadata). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ | writtenMetadata | @@ -238,7 +236,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ self assert: writtenMetadata equals: (self stonPretty: ComposedMetadataStruct new). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONSegment [ | header writtenHeader segmentMetadata | diff --git a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st index 382706b68a..3a913332a3 100644 --- a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMImageReadingTest', - #superclass : 'VMAbstractImageFormatTest', + #name : #VMImageReadingTest, + #superclass : #VMAbstractImageFormatTest, #instVars : [ 'originalNilObjectIdentityHash', 'permanentObject', 'originalPermanentObjectIdentityHash' ], - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'query' } +{ #category : #query } VMImageReadingTest >> dataFrom: fileName [ ^ self imageFileName asFileReference / fileName ] -{ #category : 'accessing' } +{ #category : #accessing } VMImageReadingTest >> initializationOptions [ ^ super initializationOptions , { #CloneOnGC. false. #CloneOnScavenge. false } ] -{ #category : 'utilities' } +{ #category : #utilities } VMImageReadingTest >> loadImage [ environmentBuilder := VMSimulatedEnvironmentBuilder new. @@ -42,7 +40,7 @@ VMImageReadingTest >> loadImage [ ] -{ #category : 'query' } +{ #category : #query } VMImageReadingTest >> metadataFrom: fileName [ | writtenHeader | @@ -50,7 +48,7 @@ VMImageReadingTest >> metadataFrom: fileName [ ^ STON fromString: writtenHeader ] -{ #category : 'utilities' } +{ #category : #utilities } VMImageReadingTest >> saveImage [ memory garbageCollectForSnapshot. @@ -63,7 +61,7 @@ VMImageReadingTest >> saveImage [ ] -{ #category : 'initialization' } +{ #category : #initialization } VMImageReadingTest >> setUp [ super setUp. @@ -76,7 +74,7 @@ VMImageReadingTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ | obj magicNumber initSegmentSize initPermSpaceSize finalSegmentSize finalPermSpaceSize | @@ -117,7 +115,7 @@ VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ self assert: (self metadataFrom: 'permSpace.ston') dataSize equals: finalPermSpaceSize ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testReadingSTONHeader [ | headerStruct headerFile | @@ -135,7 +133,7 @@ VMImageReadingTest >> testReadingSTONHeader [ self assert: (self stonPretty: headerStruct) equals: headerFile contents. ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self saveImage. @@ -144,7 +142,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self assert: originalNilObjectIdentityHash equals: (memory hashBitsOf: memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ "Only valid in the new format" @@ -160,7 +158,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ | firstNewSegmentSize secondNewSegmentSize obj newObj originalObjHash | @@ -192,7 +190,7 @@ VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ self assert: originalObjHash equals: (memory hashBitsOf: newObj). ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavingPermanentSpaceObjectsInSpurFormatFails [ imageWriterClass = SpurImageWriter ifFalse: [ ^ self skip ]. diff --git a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st index 9ead2ebb76..6837a56522 100644 --- a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st +++ b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMInterpreterTests', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMInterpreterTests, + #superclass : #VMSpurMemoryManagerTest, #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -25,7 +23,7 @@ VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : 'running' } +{ #category : #running } VMInterpreterTests >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -43,7 +41,7 @@ VMInterpreterTests >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMInterpreterTests >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" diff --git a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st index c1f9413e77..cdfda82889 100644 --- a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJITPrimitiveCallingTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJITPrimitiveCallingTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJITPrimitiveCallingTest >> initStack [ self createBaseFrame. @@ -21,7 +19,7 @@ VMJITPrimitiveCallingTest >> initStack [ ] -{ #category : 'running' } +{ #category : #running } VMJITPrimitiveCallingTest >> setUp [ super setUp. @@ -36,7 +34,7 @@ VMJITPrimitiveCallingTest >> setUp [ self createActiveProcess ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -56,7 +54,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNum ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -76,7 +74,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForT self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -96,7 +94,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidR self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidReceiverRunsFallbackCode [ | callingMethod | @@ -116,7 +114,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidRece ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntegerWillExecuteThePrimitiveAndReturnASmallInteger [ | callingMethod | @@ -136,7 +134,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntege ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntegerReceiverReturnsSmallInteger [ | callingMethod | @@ -156,7 +154,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntege ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -176,7 +174,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersE ] -{ #category : 'tests - without tracing' } +{ #category : #'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValidResult [ | callingMethod | @@ -196,7 +194,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValid self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - without tracing' } +{ #category : #'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -218,7 +216,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidN ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -238,7 +236,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePri self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -258,7 +256,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResult self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - newMethod' } +{ #category : #'tests - newMethod' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ | callingMethod | @@ -280,7 +278,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ ] -{ #category : 'tests - primitiveFunctionPointer' } +{ #category : #'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -302,7 +300,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerW ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -336,7 +334,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwa ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -359,7 +357,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutFo ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -393,7 +391,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithF ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -416,7 +414,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWitho ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -450,7 +448,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -473,7 +471,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -490,7 +488,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : 'tests - newMethod' } +{ #category : #'tests - newMethod' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ | callingMethod | @@ -512,7 +510,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ ] -{ #category : 'tests - primitiveFunctionPointer' } +{ #category : #'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -534,7 +532,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCa ] -{ #category : 'tests - error code' } +{ #category : #'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -573,7 +571,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : 'tests - error code' } +{ #category : #'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -612,7 +610,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: machineSimulator framePointerRegisterValue) equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -648,7 +646,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwarders ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -673,7 +671,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForward ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -709,7 +707,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwar ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -734,7 +732,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutFor ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -770,7 +768,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithFo ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -795,7 +793,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithou ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -812,7 +810,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : 'tests - fail fast' } +{ #category : #'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode [ | callingMethod | @@ -835,7 +833,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode ] -{ #category : 'tests - profile sampling' } +{ #category : #'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSample [ | callingMethod | @@ -861,7 +859,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSa self assert: interpreter nextProfileTick equals: 0 ] -{ #category : 'tests - profile sampling' } +{ #category : #'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoesNotTakeSample [ | callingMethod | @@ -885,7 +883,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoes self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42) ] -{ #category : 'tests - fail fast' } +{ #category : #'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithoutFunctionExecutesFallbackCode [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st index 38e3b8dd38..a12c1df861 100644 --- a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMJITVMPrimitiveTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJITVMPrimitiveTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> setUp [ super setUp. @@ -16,7 +14,7 @@ VMJITVMPrimitiveTest >> setUp [ self createBaseFrame ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod [ | methodToXray target | @@ -35,7 +33,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0111) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ | methodToXray target | @@ -54,7 +52,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0001) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ | methodToXray target | @@ -72,7 +70,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ | methodToXray target | @@ -91,7 +89,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0010) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasNotCompiled [ | methodToXray target | diff --git a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st index 5e0e973c35..0c20ab755d 100644 --- a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st +++ b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMJistMethodTestObject', - #superclass : 'Object', + #name : #VMJistMethodTestObject, + #superclass : #Object, #instVars : [ 'var1', 'var2', @@ -132,12 +132,10 @@ Class { 'var128', 'var129' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'initialization' } +{ #category : #initialization } VMJistMethodTestObject >> initialize [ super initialize. var1 := Array new. diff --git a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st index 7f09895aff..8e27c1cdd4 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJitMethodTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJitMethodTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ | tmp1 tmp2 | @@ -21,14 +19,14 @@ VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ ^ arg3 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> comparingSmallIntegers: aBitmap [ aBitmap size = 32768 ifTrue: [ ^ 17 ]. ^ 23 ] -{ #category : 'helpers' } +{ #category : #helpers } VMJitMethodTest >> initStack [ self createBaseFrame. @@ -43,13 +41,13 @@ VMJitMethodTest >> initStack [ ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> setUp [ super setUp. @@ -57,7 +55,7 @@ VMJitMethodTest >> setUp [ self installFloat64RegisterClass ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> setUpTrampolines [ super setUpTrampolines. @@ -69,7 +67,7 @@ VMJitMethodTest >> setUpTrampolines [ cogit ceReturnToInterpreterTrampoline: (self compileTrampoline: [ cogit Stop ] named:#ceReturnToInterpreterTrampoline). ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ | callingMethod parameter aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -104,7 +102,7 @@ VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ equals: 17 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ | callingMethod cm x y z | @@ -178,7 +176,7 @@ VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ | callingMethod cm x y z firstTerm size | @@ -250,7 +248,7 @@ VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ self assert: (memory fetchFloat64: 1 ofObject: z) equals: 22.0 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ | callingMethod | @@ -259,7 +257,7 @@ VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ self deny: callingMethod address equals: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testOnStackReplacementForLongRunningVectorAddMethod [ | callingMethod cm x y z firstTerm size frame | diff --git a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st index b80dc4405f..02dd237dfe 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st @@ -1,28 +1,26 @@ Class { - #name : 'VMJitMethodWithImmutabilityTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJitMethodWithImmutabilityTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMJitMethodWithImmutabilityTest >> initialCodeSize [ ^ 32 * 1024 ] -{ #category : 'initialization' } +{ #category : #initialization } VMJitMethodWithImmutabilityTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : 'initialization' } +{ #category : #initialization } VMJitMethodWithImmutabilityTest >> setUpTrampolines [ super setUpTrampolines. @@ -32,7 +30,7 @@ VMJitMethodWithImmutabilityTest >> setUpTrampolines [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodWithImmutabilityTest >> testCompileMethodWithALotOfAssignmentsToInstanceVariables [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st index 97a1aa0b1e..810ddfe30c 100644 --- a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st +++ b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMJitSimdBytecode', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJitSimdBytecode, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'running' } +{ #category : #running } VMJitSimdBytecode >> jitOptions [ ^ super jitOptions @@ -20,7 +18,7 @@ VMJitSimdBytecode >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -62,7 +60,7 @@ VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -97,7 +95,7 @@ VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -132,7 +130,7 @@ VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -163,7 +161,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -193,7 +191,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ self assert: (entry registerr) equals: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegisterContent [ | endInstruction primitiveAddress array | @@ -224,7 +222,7 @@ VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegister self assert: (memory fetchFloat64: 1 ofObject: array) equals: 4.0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testSubVectorStoreResultIntoVectorRegister [ | endInstruction primitiveAddress array register | diff --git a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st index beaecb6e12..88d625ab18 100644 --- a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMJittedBoxFloatPrimitivesTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedBoxFloatPrimitivesTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> setUp [ super setUp. @@ -24,7 +22,7 @@ VMJittedBoxFloatPrimitivesTest >> setUp [ named: 'ceCheckFeatures') ] ] -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> testAsFloat [ cogit receiverTags: memory smallIntegerTag. @@ -38,7 +36,7 @@ VMJittedBoxFloatPrimitivesTest >> testAsFloat [ equals: 27.0 ] -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> testAsFloatWhenThereIsNotSpaceFailsPrimitive [ | stop | diff --git a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st index 9ecec6897e..96c2a4c216 100644 --- a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedByteArrayAccessPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedByteArrayAccessPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'receiver', 'targetReceiver' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMJittedByteArrayAccessPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: bitSize [ ({ 8. 16. 32. 64 } includes: bitSize) ifFalse: [ self fail ]. @@ -44,7 +42,7 @@ VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: b ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ | endPart | @@ -56,7 +54,7 @@ VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is the same receiver" @@ -70,7 +68,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ targetReceiver := receiver ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: bitSize [ | complementedValue | @@ -92,7 +90,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: memory storeLong64: 0 ofObject: targetReceiver withValue: complementedValue ]. ] -{ #category : 'tests - load booleans' } +{ #category : #'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ | expectedValue | @@ -113,7 +111,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ ] -{ #category : 'tests - load booleans' } +{ #category : #'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ | expectedValue | @@ -134,7 +132,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ | expectedValue | @@ -155,7 +153,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ | expectedValue | @@ -176,7 +174,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ | expectedValue | @@ -197,7 +195,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ | expectedValue | @@ -218,7 +216,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ | expectedValue | @@ -239,7 +237,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ | expectedValue | @@ -260,7 +258,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue [ | expectedValue | @@ -281,7 +279,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue [ | expectedValue | @@ -302,7 +300,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue [ | expectedValue | @@ -323,7 +321,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue [ | expectedValue | @@ -344,7 +342,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue [ | expectedValue | @@ -365,7 +363,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue [ | expectedValue | @@ -386,7 +384,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue [ | expectedValue | @@ -407,7 +405,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue [ | expectedValue | @@ -428,7 +426,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ | expectedValue | @@ -449,7 +447,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ | expectedValue | @@ -470,7 +468,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ | expectedValue | @@ -491,7 +489,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ | expectedValue | @@ -512,7 +510,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ | expectedValue | @@ -533,7 +531,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ ] -{ #category : 'tests - store booleans' } +{ #category : #'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ self genPrimitive: #StoreBoolean8. @@ -549,7 +547,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ ] -{ #category : 'tests - store booleans' } +{ #category : #'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ self genPrimitive: #StoreBoolean8. @@ -565,7 +563,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ | expectedValue | @@ -585,7 +583,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ | expectedValue | @@ -605,7 +603,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ | expectedValue | @@ -625,7 +623,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ | expectedValue | @@ -644,7 +642,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNotOverwriteAfter [ | expectedValue | @@ -663,7 +661,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNo self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloatValue [ | expectedValue | @@ -682,7 +680,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloa ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ | expectedValue | @@ -701,7 +699,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeValue [ | expectedValue | @@ -721,7 +719,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValue [ | expectedValue | @@ -741,7 +739,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -763,7 +761,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeValue [ | expectedValue | @@ -783,7 +781,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValue [ | expectedValue | @@ -803,7 +801,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValueWithoutOverwriting [ | expectedValue | @@ -823,7 +821,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeValue [ | expectedValue | @@ -843,7 +841,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveValue [ | expectedValue | @@ -863,7 +861,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValue [ | expectedValue | @@ -883,7 +881,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValu ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValue [ | expectedValue | @@ -903,7 +901,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -925,7 +923,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ | expectedValue | @@ -945,7 +943,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ | expectedValue | @@ -965,7 +963,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ | expectedValue | @@ -985,7 +983,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ | expectedValue | @@ -1006,7 +1004,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ | expectedValue | @@ -1026,7 +1024,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> trailingName [ ^ 'Bytes' diff --git a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st index 70c9624404..47ffe36324 100644 --- a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMJittedExternalAddressAccessPrimitiveTest', - #superclass : 'VMJittedByteArrayAccessPrimitiveTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJittedExternalAddressAccessPrimitiveTest, + #superclass : #VMJittedByteArrayAccessPrimitiveTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'utils' } +{ #category : #utils } VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is a byteArray and the receiver to the primitive is an external address pointing to it" @@ -16,7 +14,7 @@ VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedExternalAddressAccessPrimitiveTest >> trailingName [ ^ 'ExternalAddress' diff --git a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st index e7ce707f38..4c246543ac 100644 --- a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedGeneralPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedGeneralPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ | lastOop | @@ -17,7 +15,7 @@ VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ ^ lastOop ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ "32 bits images does not have SmallFloats" @@ -42,7 +40,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self compile: [ | jump | @@ -62,7 +60,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self compile: [ | jump | @@ -82,7 +80,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self assert: machineSimulator receiverRegisterValue equals: 0 ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self compile: [ | jump | @@ -98,7 +96,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self compile: [ | jump | @@ -114,7 +112,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBoxedFloat [ self compile: [ | jump | @@ -130,7 +128,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBo self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSmallInteger [ self compile: [ | jump | @@ -146,7 +144,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSm self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterBoxedFloat [ self compile: [ | jump | @@ -162,7 +160,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterSmallInteger [ self compile: [ | jump | @@ -178,7 +176,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerBoxedFloat [ self compile: [ | jump | @@ -194,7 +192,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerSmallInteger [ self compile: [ | jump | @@ -210,7 +208,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self compile: [ | jump | @@ -226,7 +224,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self compile: [ | jump | @@ -242,7 +240,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self compile: [ | jump | @@ -258,7 +256,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self compile: [ | jump | @@ -274,7 +272,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat [ self compile: [ | jump | @@ -290,7 +288,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallInteger [ self compile: [ | jump | @@ -306,7 +304,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallIntege self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self compile: [ @@ -319,7 +317,7 @@ VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17). ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self compile: [ | jump | @@ -332,7 +330,7 @@ VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self assert: machineSimulator receiverRegisterValue equals: 17. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self compile: [ | jump | @@ -345,7 +343,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self assert: machineSimulator receiverRegisterValue equals: (memory classIndexOf: memory falseObject) ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self compile: [ @@ -358,7 +356,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self assert: machineSimulator arg0RegisterValue equals: classFloat ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self compile: [ @@ -372,7 +370,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding [ self compile: [ @@ -386,7 +384,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self compile: [ @@ -400,7 +398,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 4 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding [ self compile: [ @@ -414,7 +412,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: (7 * 4 roundUpTo: self wordSize) "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ | desiredSlots | @@ -432,7 +430,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: (desiredSlots * 8 / self wordSize) ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self compile: [ @@ -446,7 +444,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self compile: [ @@ -460,7 +458,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self compile: [ | jump | @@ -475,7 +473,7 @@ VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self assert: machineSimulator doublePrecisionFloatingPointRegister0Value equals: Float fmax. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -488,7 +486,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -505,7 +503,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -522,7 +520,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -539,7 +537,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegativ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -550,7 +548,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -567,7 +565,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 94). ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -585,7 +583,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -265). ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -598,7 +596,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagI self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -611,7 +609,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsS self assert: result equals: 0. "Incomplete Primitive, if the float cannot be allocated, it executes the C code" ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -631,7 +629,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ self assert: self machineSimulator receiverRegisterValue equals: (memory floatObjectOf: 42.0) ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -654,7 +652,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmal equals: 8589934592 asFloat ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerReceiver [ | result | @@ -667,7 +665,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -680,7 +678,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -696,7 +694,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -714,7 +712,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerReceiver [ | result | @@ -727,7 +725,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerRece self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -740,7 +738,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallInteg self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -756,7 +754,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerA self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -774,7 +772,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerReceiver [ | result | @@ -787,7 +785,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerR self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -800,7 +798,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIn self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBiggerThanSmallIntegerBits [ | primitiveAddress endInstruction | @@ -818,7 +816,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBigge self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -834,7 +832,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ | primitiveAddress endInstruction | @@ -852,7 +850,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ | primitiveAddress endInstruction | @@ -874,7 +872,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ equals: (memory integerObjectOf: memory maxSmallInteger >> 1 << 1) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWithShiftRight [ | primitiveAddress endInstruction | @@ -896,7 +894,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWit equals: (memory integerObjectOf: 17) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBiggerThanNumSmallIntegerBits [ | primitiveAddress endInstruction | @@ -918,7 +916,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBi equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ | primitiveAddress endInstruction | @@ -936,7 +934,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 128) ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerReceiver [ | result | @@ -949,7 +947,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -962,7 +960,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -978,7 +976,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -996,7 +994,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ | endInstruction primitiveAddress | @@ -1014,7 +1012,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -1031,7 +1029,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1044,7 +1042,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1061,7 +1059,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1078,7 +1076,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1089,7 +1087,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1106,7 +1104,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1124,7 +1122,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1141,7 +1139,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1154,7 +1152,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIs self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -1171,7 +1169,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1188,7 +1186,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallIn self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1205,7 +1203,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1216,7 +1214,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSm self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1233,7 +1231,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1251,7 +1249,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1268,7 +1266,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1281,7 +1279,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsN self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1298,7 +1296,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInt self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1309,7 +1307,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSma self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1326,7 +1324,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1344,7 +1342,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNum self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1357,7 +1355,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfRecei self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1374,7 +1372,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1385,7 +1383,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceive self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1402,7 +1400,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1420,7 +1418,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNe self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1433,7 +1431,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1450,7 +1448,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1461,7 +1459,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1478,7 +1476,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1496,7 +1494,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveHashMultiply' } +{ #category : #'tests - primitiveHashMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHashMultiply [ | result primitiveAddress | @@ -1513,7 +1511,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHash self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50 hashMultiply). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1526,7 +1524,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1543,7 +1541,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1554,7 +1552,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1571,7 +1569,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1589,7 +1587,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1602,7 +1600,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1619,7 +1617,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1630,7 +1628,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1647,7 +1645,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1665,7 +1663,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1678,7 +1676,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1695,7 +1693,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflows [ | endInstruction primitiveAddress | @@ -1712,7 +1710,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ | endInstruction primitiveAddress | @@ -1731,7 +1729,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ | endInstruction primitiveAddress | @@ -1750,7 +1748,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -1767,7 +1765,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1778,7 +1776,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallInteger [ | endInstruction primitiveAddress | @@ -1795,7 +1793,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallIntege self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -84). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1812,7 +1810,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 84). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1830,7 +1828,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17424). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand [ | endInstruction primitiveAddress | @@ -1848,7 +1846,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop instanceVariableCount | @@ -1874,7 +1872,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ equals: memory nilObject ] ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop arraySize | @@ -1904,7 +1902,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectlyWhenNotAligned [ | endInstruction primitiveAddress class newOop arraySize | @@ -1935,7 +1933,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1948,7 +1946,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1965,7 +1963,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1976,7 +1974,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1993,7 +1991,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2011,7 +2009,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -2029,7 +2027,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -2046,7 +2044,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2059,7 +2057,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2076,7 +2074,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -2093,7 +2091,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2104,7 +2102,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2121,7 +2119,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2139,7 +2137,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -2156,7 +2154,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ @@ -2175,7 +2173,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ @@ -2194,7 +2192,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ @@ -2213,7 +2211,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ @@ -2232,7 +2230,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -1). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ @@ -2250,7 +2248,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2263,7 +2261,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2280,7 +2278,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -2297,7 +2295,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -2314,7 +2312,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2325,7 +2323,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2342,7 +2340,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -10). ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2360,7 +2358,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallIntegers [ | result | @@ -2372,7 +2370,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallI self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentDoesNotReturn [ "If the argument is not an small integer, flow jumps and return does not (yet) happen" @@ -2398,7 +2396,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentD self assert: machineSimulator arg0RegisterValue equals: self memory falseObject. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self compile: [ @@ -2420,7 +2418,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsTrue [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st index c78d8ff140..5d37bd7ef3 100644 --- a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMJittedLookupTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMJittedLookupTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'methodOop', 'selectorOop', 'receiver', 'receiverClass' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -27,7 +25,7 @@ VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -40,7 +38,7 @@ VMJittedLookupTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -53,7 +51,7 @@ VMJittedLookupTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setUpClassAndMethod [ @@ -65,7 +63,7 @@ VMJittedLookupTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" @@ -92,7 +90,7 @@ VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ | superclass superclassMethodDictionary foundMethod | @@ -125,7 +123,7 @@ VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ self assert: foundMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> testLookUpMNUWithAnyNonMethodObjectShouldNotJItCompile [ | superclass superclassMethodDictionary foundMethod | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st index 76898f93d9..7f9a69d72f 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedPrimitiveAtPutTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveAtPutTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtPutTest >> setUp [ super setUp. @@ -23,7 +21,7 @@ VMJittedPrimitiveAtPutTest >> setUp [ bytecodes: 10. ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtPutTest >> setUpTrampolines [ super setUpTrampolines. @@ -32,7 +30,7 @@ VMJittedPrimitiveAtPutTest >> setUpTrampolines [ ] -{ #category : 'tests' } +{ #category : #tests } VMJittedPrimitiveAtPutTest >> testPrimitiveAtPut32bitIndexableWithLargeNumberShouldStoreValue [ | integerArray offset expectedValue | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st index e36762ff81..18d5ef041c 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedPrimitiveAtTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveAtTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitiveAtTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMJittedPrimitiveAtTest >> setUp [ bytecodes: 10. ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -43,7 +41,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -59,7 +57,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -75,7 +73,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBounds self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ | integerArray offset | @@ -102,7 +100,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -118,7 +116,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -144,7 +142,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShouldFallThrough [ | integerArray offset | @@ -160,7 +158,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShou self assertFallsThrough ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -176,7 +174,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ | integerArray offset | @@ -201,7 +199,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -230,7 +228,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -246,7 +244,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32BitsShouldFallthrough [ | integerArray offset | @@ -263,7 +261,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32Bits self assertFallsThrough ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldReturnValue [ | integerArray offset | @@ -290,7 +288,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldRe equals: SmallInteger maxVal + 1 ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldReturnValue [ | integerArray offset | @@ -317,7 +315,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldRe equals: (memory integerObjectOf: 17) ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -332,7 +330,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -347,7 +345,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -362,7 +360,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -377,7 +375,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThro self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -392,7 +390,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -407,7 +405,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBounds self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ | integerArray offset | @@ -433,7 +431,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -448,7 +446,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -463,7 +461,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -489,7 +487,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldRetu equals: expectedValue ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ | offset array | @@ -502,7 +500,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ | offset array | @@ -516,7 +514,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShouldFallThrough [ | objectWithInstanceVariables | @@ -533,7 +531,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShould self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShouldFallThrough [ | objectWithNoInstanceVariables | @@ -548,7 +546,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShou self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ machineSimulator receiverRegisterValue: (memory characterObjectOf: $a codePoint). @@ -557,7 +555,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -569,7 +567,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtSmallIntegerShouldFallThrough [ machineSimulator receiverRegisterValue: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st index 9771567a95..f1948eec9d 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedPrimitiveSizeTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveSizeTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitiveSizeTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveSizeTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMJittedPrimitiveSizeTest >> setUp [ bytecodes: 10. ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf16bitSlots [ | integerArray | @@ -43,7 +41,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf32bitSlots [ | integerArray | @@ -59,7 +57,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShouldReturnNumberOf32bitSlots [ | integerArray aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -85,7 +83,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShoul equals: 32768 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf64bitSlots [ | integerArray | @@ -101,7 +99,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8bitSlots [ | integerArray | @@ -117,7 +115,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8 equals: 7 ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots [ | array | @@ -131,7 +129,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 7) ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ | objectWithInstanceVariables | @@ -146,7 +144,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThrough [ self prepareStackForSendReceiver: (memory characterObjectOf: $a codePoint). @@ -154,7 +152,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThroug self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -165,7 +163,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateIntegerShouldFallThrough [ self prepareStackForSendReceiver: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st index 99c580ac58..c306428b27 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st @@ -1,23 +1,21 @@ Class { - #name : 'VMJittedPrimitivesTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMJittedPrimitivesTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'classFloat' ], #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'private' } +{ #category : #private } VMJittedPrimitivesTest class >> isAbstract [ ^ self == VMJittedPrimitivesTest ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -30,7 +28,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: argumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -43,7 +41,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument ] -{ #category : 'utils' } +{ #category : #utils } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: firstArgumentOop and: secondArgumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -56,13 +54,13 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument self runUntilReturn ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st index 17c2d6be67..94945ee4fb 100644 --- a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedSmallFloatPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedSmallFloatPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ "SmallFloats only exist in 64bits systems" @@ -17,7 +15,7 @@ VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -31,7 +29,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFl self assert: machineSimulator receiverRegisterValue equals: (self memory floatObjectOf: 3.0) ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -47,7 +45,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmal equals: 0.5 ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -63,7 +61,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse equals: memory falseObject ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -79,7 +77,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -95,7 +93,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -111,7 +109,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -127,7 +125,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenEqual [ cogit receiverTags: memory smallFloatTag. @@ -143,7 +141,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -159,7 +157,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -175,7 +173,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -191,7 +189,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -207,7 +205,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -223,7 +221,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -239,7 +237,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -255,7 +253,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -271,7 +269,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -287,7 +285,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASm equals: 6.0 ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -303,7 +301,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -319,7 +317,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : 'tests - primitiveSquareRoot' } +{ #category : #'tests - primitiveSquareRoot' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -334,7 +332,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASm equals: 2.0 sqrt ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSubtractTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. diff --git a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st index a1b3df39a5..63226acbf5 100644 --- a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMLiterRulesTest', - #superclass : 'TestCase', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMLiterRulesTest, + #superclass : #TestCase, + #category : #VMMakerTests } -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ | ast | @@ -21,7 +20,7 @@ VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ ast pragmas first). ] -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ | ast | @@ -32,7 +31,7 @@ VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ ast pragmas first) ] -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangTypeDeclarationForVariable [ | ast | diff --git a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st index 48bc2548f9..7094ce4b0e 100644 --- a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMLookUpTest', - #superclass : 'VMInterpreterTests', + #name : #VMLookUpTest, + #superclass : #VMInterpreterTests, #instVars : [ 'methodOop', 'selectorOop', @@ -14,12 +14,10 @@ Class { 'VMBasicConstants', 'VMBytecodeConstants' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest class >> testParameters [ ^ super testParameters * (ParametrizedTestMatrix new @@ -28,7 +26,7 @@ VMLookUpTest class >> testParameters [ yourself) ] -{ #category : 'assertions' } +{ #category : #assertions } VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ | length | @@ -39,19 +37,19 @@ VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ self deny: (memory isForwarded: selector) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMLookUpTest >> linearSearchLimit [ ^ linearSearchLimit ] -{ #category : 'accessing' } +{ #category : #accessing } VMLookUpTest >> linearSearchLimit: anObject [ linearSearchLimit := anObject ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -64,7 +62,7 @@ VMLookUpTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -77,7 +75,7 @@ VMLookUpTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : 'running' } +{ #category : #running } VMLookUpTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -133,7 +131,7 @@ VMLookUpTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setUpClassAndMethod [ @@ -145,7 +143,7 @@ VMLookUpTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ "We set a smallInteger class into the classTable" @@ -155,7 +153,7 @@ VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ equals: receiverClass ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsForwardedMethod [ | aMethodDictionary | @@ -171,7 +169,7 @@ VMLookUpTest >> testLookUpFindsForwardedMethod [ self assert: interpreter newMethod equals: methodOop. ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodInClass [ | aMethodDictionary | @@ -186,7 +184,7 @@ VMLookUpTest >> testLookUpFindsMethodInClass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodInSuperclass [ | superclass superclassMethodDictionary | @@ -211,7 +209,7 @@ VMLookUpTest >> testLookUpFindsMethodInSuperclass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ | aMethodDictionary | @@ -228,7 +226,7 @@ VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ self assertNonForwardedSelectorsIn: aMethodDictionary ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ | aMethodDictionary | @@ -243,7 +241,7 @@ VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -285,7 +283,7 @@ VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -321,7 +319,7 @@ VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ | superclass superclassMethodDictionary | @@ -343,7 +341,7 @@ VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ | nonExistingSelector superclass superclassMethodDictionary dnuMethodOop dnuSelectorOop | @@ -381,7 +379,7 @@ VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ | nonExistingSelector aMethodDictionary | @@ -402,7 +400,7 @@ VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ self should: [interpreter lookupMethodInClass: receiverClass] raise: Error. ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -436,7 +434,7 @@ VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ "There is no superclass, so no cannotInterpret: to call" @@ -458,7 +456,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ self should: [ interpreter lookupMethodInClass: receiverClass ] raise: Error ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUMethod [ "Class has a nil methodDictionary, so `cannotInterpret:` is send. But superclass does not understand it, so `doesNotUnderstand:` is called instead." @@ -504,7 +502,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUM self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -544,7 +542,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ self assert: interpreter newMethod equals: cannotInterpretMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ | aMethodDictionary receiverOop frame | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." @@ -569,7 +567,7 @@ VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformExecutes [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -587,7 +585,7 @@ VMLookUpTest >> testPrimitivePerformExecutes [ self assert: interpreter stackTop equals: receiverOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformFindsMethodOop [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -608,7 +606,7 @@ VMLookUpTest >> testPrimitivePerformFindsMethodOop [ "(1) the Instruction Pointer is set to be just before the bytecode to execute, so fetchNextBytecode will fetch the first bytecode ( #justActivateNewMethod: )" ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformSetsIPBeforeFirstBytecode [ | aMethodDictionary receiverOop | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." diff --git a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st index acd7a0e1c3..245cbd43ed 100644 --- a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st @@ -1,47 +1,46 @@ Class { - #name : 'VMMASTTranslationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMMASTTranslationTest, + #superclass : #TestCase, + #category : #VMMakerTests } -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> + arg [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> emptyBlockHasSingleNilStatement [ [ ] value ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineMethodWithLoop [ self methodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineSecondLevelMethodWithLoop [ self inlineMethodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineTwiceMethodWithLoop [ self methodWithLoop. self methodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineTwiceSecondLevelMethodWithLoop [ self inlineMethodWithLoop. self inlineMethodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ @@ -51,17 +50,17 @@ VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithArgument: anArgument [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithExpressionInLoopCondition [ 1 to: self something - 10 do: [ :i | self foo: i ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNil [ self something @@ -69,7 +68,7 @@ VMMASTTranslationTest >> methodWithIfNil [ ifNotNil: [ 2 ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNil [ self something @@ -78,7 +77,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNil [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ self something @@ -86,7 +85,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNil [ self something @@ -94,7 +93,7 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNil [ ifNil: [ 2 ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ self something @@ -102,14 +101,14 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ ifNil: [ ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilWithArgument [ self something ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ @@ -118,17 +117,17 @@ VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ self inlinedMethodWithLocalWithSameName. ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithLoop [ 1 to: 10 do: [ :i | self foo: i ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithNoArguments [ ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testArgumentIsNoTemp [ | translation method | @@ -138,7 +137,7 @@ VMMASTTranslationTest >> testArgumentIsNoTemp [ self deny: (translation locals includes: method methodNode arguments first name) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -175,7 +174,7 @@ VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -212,7 +211,7 @@ VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -244,7 +243,7 @@ VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ | translation method codeGenerator block | @@ -260,7 +259,7 @@ VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ self assert: block statements first value equals: nil ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ | translation | @@ -269,7 +268,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ self assert: translation statements first selector equals: #ifTrue:ifFalse: ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ | translation | @@ -289,7 +288,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ | translation | @@ -309,7 +308,7 @@ VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -324,7 +323,7 @@ VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ self assert: (translation locals includesAll: inlinedMethod locals) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -340,7 +339,7 @@ VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVar self assert: translation locals asSet size equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -355,7 +354,7 @@ VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVari self assert: translation locals asSet size equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -371,7 +370,7 @@ VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopInd self assert: translation locals asSet size equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ | method codeGenerator methodTranslation inlinedMethod inlinedMethodTranslation | @@ -391,7 +390,7 @@ VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ self assert: (methodTranslation declarations at: #cond2) equals: 'pthread_cond_t cond2' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testKeywordMethodHasArgument [ | translation method | @@ -401,7 +400,7 @@ VMMASTTranslationTest >> testKeywordMethodHasArgument [ self assert: (translation args includes: method methodNode arguments first name) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ | translation method loop | @@ -412,7 +411,7 @@ VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ self assert: loop arguments size equals: 4 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable [ | translation method loop | @@ -423,7 +422,7 @@ VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable self assert: loop arguments size equals: 6 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ | translation method block | @@ -434,7 +433,7 @@ VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ self deny: (translation locals includes: block arguments first) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid [ | translation codeGenerator | @@ -451,7 +450,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid self assert: translation returnType equals: #void ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ | translation codeGenerator | @@ -468,7 +467,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ self assert: translation returnType equals: #void ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ | translation | @@ -477,7 +476,7 @@ VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ self assert: translation selector equals: #+. ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ | translation method | @@ -487,7 +486,7 @@ VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ self assert: translation selector equals: method selector. ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateUnaryMethodHasSameName [ | translation method | diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st index 74591986af..bc7e61b968 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMMachineCodeFrameBuilderForTest', - #superclass : 'Object', + #name : #VMMachineCodeFrameBuilderForTest, + #superclass : #Object, #instVars : [ 'test', 'returnAddress', @@ -10,21 +10,20 @@ Class { 'spouseContext', 'method' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> arguments [ ^ arguments ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> arguments: anObject [ arguments := anObject ] -{ #category : 'building' } +{ #category : #building } VMMachineCodeFrameBuilderForTest >> buildFrame [ | methodAddress | @@ -55,13 +54,13 @@ VMMachineCodeFrameBuilderForTest >> buildFrame [ test cogit needsFrame: true. ] -{ #category : 'testing' } +{ #category : #testing } VMMachineCodeFrameBuilderForTest >> hasSpouseContext [ ^ spouseContext notNil ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ self test: aTest. @@ -71,63 +70,63 @@ VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ temporaries := #(). ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> method [ ^ method ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> method: anObject [ method := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> receiver [ ^ receiver ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> receiver: anObject [ receiver := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> returnAddress [ ^ returnAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> returnAddress: anObject [ returnAddress := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> spouseContext [ ^ spouseContext ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> spouseContext: aContextOop [ spouseContext := aContextOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> temporaries [ ^ temporaries ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> temporaries: anObject [ temporaries := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> test [ ^ test ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> test: anObject [ test := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st index b46584b7c3..a4ead00b02 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMMachineCodeMethod', - #superclass : 'Object', + #name : #VMMachineCodeMethod, + #superclass : #Object, #instVars : [ 'virtualMachine', 'cogMethodSurrogate' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogate: aCogMethodSurrogate [ ^ self new @@ -22,17 +20,17 @@ VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogat yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> cogMethodSurrogate [ ^ cogMethodSurrogate ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> cogMethodSurrogate: anObject [ cogMethodSurrogate := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> disassemble [ | methodEntry instructions | methodEntry := cogMethodSurrogate asInteger + virtualMachine cogit entryOffset. @@ -44,12 +42,12 @@ VMMachineCodeMethod >> disassemble [ ' join: (instructions collect: [:i | i assemblyCodeString]) ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st index b0cf51c095..bedd8c02a5 100644 --- a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMMachineSimulatorTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMMachineSimulatorTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogAbstractRegisters' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - instruction exception' } +{ #category : #'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ | label lastInstruction subInstruction breakInstruction | @@ -38,7 +36,7 @@ VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ ] -{ #category : 'tests - instruction exception' } +{ #category : #'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ | label lastInstruction subInstruction breakInstruction | @@ -67,7 +65,7 @@ VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -95,7 +93,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ | label lastInstruction invalidAddressHandled addInstruction jumpInstruction expectedAddress | @@ -139,7 +137,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ equals: expectedAddress ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ | label lastInstruction invalidAddressHandled | @@ -183,7 +181,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ ^ self ] ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespected [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -219,7 +217,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self temporaryRegisterValue equals: 1 ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespectedCorrectInstructionPointer [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -255,7 +253,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self machineSimulator instructionPointerRegisterValue equals: jumpInstruction address ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -282,7 +280,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -308,7 +306,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -335,7 +333,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -361,7 +359,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled exptectedAddress | @@ -397,7 +395,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAd self assert: invalidAddressHandled ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ | label lastInstruction subInstruction | @@ -423,7 +421,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstructionPointer [ | label lastInstruction subInstruction jumpInstruction | @@ -448,7 +446,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstru ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ | label lastInstruction | @@ -470,7 +468,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ self fail. ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPointer [ | label lastInstruction | @@ -494,7 +492,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPoi self fail. ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionUntilAddressIsRespected [ | label lastInstruction | diff --git a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st index 15c0afc846..be3b8ddce2 100644 --- a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st +++ b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMMockCodeGenerator', - #superclass : 'Object', + #name : #VMMockCodeGenerator, + #superclass : #Object, #instVars : [ 'interpreter', 'addedPrimitives' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ ^ self new @@ -18,13 +16,13 @@ VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ yourself ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> accessorDepthCalculator [ ^ self ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> accessorDepthForSelector: aString [ ^ addedPrimitives at: aString @@ -32,31 +30,31 @@ VMMockCodeGenerator >> accessorDepthForSelector: aString [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector [ self addPrimitive: aSelector accessorDepth: -1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector accessorDepth: aDepth [ addedPrimitives at: aSelector put: aDepth ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> exportedPrimitiveNames [ ^ (addedPrimitives keys collect: [ :e | e -> e ]) asDictionary ] -{ #category : 'initialization' } +{ #category : #initialization } VMMockCodeGenerator >> initialize [ addedPrimitives := Dictionary new ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> initializeWithPrimitiveTable [ interpreter primitiveTable @@ -64,7 +62,7 @@ VMMockCodeGenerator >> initializeWithPrimitiveTable [ thenDo: [ :aSelector | self addPrimitive: aSelector ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> interpreter: aCogVMSimulatorLSB [ interpreter := aCogVMSimulatorLSB. diff --git a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st index acfab19b5c..42382cc3ae 100644 --- a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMObjectAccessorIdentificationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests-Simulation', - #package : 'VMMakerTests', - #tag : 'Simulation' + #name : #VMObjectAccessorIdentificationTest, + #superclass : #TestCase, + #category : #'VMMakerTests-Simulation' } -{ #category : 'tests' } +{ #category : #tests } VMObjectAccessorIdentificationTest >> testObjectAccessorMessagesAreCorrectlyDetected [ | knownSelectors nonAccessorSelectors | diff --git a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st index 54dd7eedd7..5419d39e53 100644 --- a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st @@ -1,19 +1,17 @@ Class { - #name : 'VMObjectLayoutTests', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-ObjectLayoutTests', - #package : 'VMMakerTests', - #tag : 'ObjectLayoutTests' + #name : #VMObjectLayoutTests, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-ObjectLayoutTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMObjectLayoutTests >> formatFromInstSpec: instSpecInt instSize: instSizeInt [ "A class format is composed by" "<5 bits inst spec><16 bits inst size>" ^ instSpecInt << 16 + instSizeInt ] -{ #category : 'helpers' } +{ #category : #helpers } VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSize: aSizeInt [ | class | class := self @@ -23,7 +21,7 @@ VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSi ^class ] -{ #category : 'helper' } +{ #category : #helper } VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ | objSize | "always have at least one slot for forwarders" @@ -39,7 +37,7 @@ VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testCharacterIsImmediate [ | char | char := memory characterObjectOf: $a asInteger. @@ -47,7 +45,7 @@ VMObjectLayoutTests >> testCharacterIsImmediate [ self assert: (memory fetchClassTagOf: char) equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ | class objOop | 0 to: 254 do: [ :slots | @@ -63,19 +61,19 @@ VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ equals: objSize ] ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesInRange [ self assert: (memory isIntegerValue: memory minSmallInteger) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesNotInRange [ "An integer smaller than the smallest integer is not in a valid range" self deny: (memory isIntegerValue: memory minSmallInteger - 1) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectAlignment [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -86,7 +84,7 @@ VMObjectLayoutTests >> testObjectAlignment [ self assert: objOop2 \\ 8 equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ | class objOop header | 0 to: 254 do: [ :slots | @@ -97,7 +95,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ | class objOop header classIndex | 0 to: 10 do: [ :slots | @@ -110,7 +108,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ | class objOop header classInstSpec | "instSpec: @@ -125,7 +123,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout16Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 12-15 = 16-bit indexable @@ -147,7 +145,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout32Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 10-11 = 32-bit indexable @@ -167,7 +165,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout8Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 16-23 = 8-bit indexable @@ -194,7 +192,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayout [ | class objOop header classInstSpec instSpec | instSpec := 2. "instSpec for indexable objects with no inst vars (Array et al)" @@ -208,7 +206,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayo ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectMinimumSize [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -218,7 +216,7 @@ VMObjectLayoutTests >> testObjectMinimumSize [ self assert: objOop2 - objOop1 equals: 16 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ | class slots obj1oop obj2oop | "objects always are allocated with at least one slots for forwarding" @@ -229,7 +227,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ self assert: obj2oop - obj1oop equals: self objectHeaderSize + memory allocationUnit ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForwarding [ | class slots oop | slots := 0. @@ -238,7 +236,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForw self assert: (memory bytesInObject: oop) equals: self objectHeaderSize + memory allocationUnit. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ | class objOop slots | slots := 255. @@ -253,7 +251,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ | class objOop bigOopHeader mask numSlots | mask := 16rFFFFFFFFFFFFFF. @@ -267,7 +265,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ self assert: numSlots equals: slots ] ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ "Test of the border case when int = 2r000111111... . The highest possible value using usqInt encoding is (2**61) -1 since (2**61) can be confused with a pointer (on a 64 bits machine) Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guarantees the portability @@ -276,25 +274,25 @@ VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ self deny: (memory isIntegerValue: memory maxCInteger >> memory numSmallIntegerTagBits) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase2 [ "Test of the border case when int = 2r111000000 ... . Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guaranties the portability of the test on 32 and 64 bit computer. " self deny: (memory isIntegerValue: (memory maxCInteger >> memory numSmallIntegerTagBits) bitInvert) "<=> isIntegerValue: (0001111) bitInvert" ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesInRange [ self assert: (memory isIntegerValue: memory maxSmallInteger) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesNotInRange [ self deny: (memory isIntegerValue: memory maxSmallInteger + 1) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testSmallIntegerIsImmediate [ | int | int := memory integerObjectOf: 42. @@ -302,7 +300,7 @@ VMObjectLayoutTests >> testSmallIntegerIsImmediate [ self assert: (memory fetchClassTagOf: int) equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testVariableObjectWithInstVarsHasTheRightSize [ | class objOop fixedFieldsSize indexableSize | indexableSize := 12. diff --git a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st index c780fcb9c2..b3400f900f 100644 --- a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMObjectStackTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMObjectStackTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ @@ -14,7 +12,7 @@ VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ self assert: memory mournQueue equals: (memory objStackAt: 4098"MournQueueRootIndex") ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testNewMournQueueIsEmpty [ | objStack | @@ -24,7 +22,7 @@ VMObjectStackTest >> testNewMournQueueIsEmpty [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testNewObjectStackIsEmpty [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -35,7 +33,7 @@ VMObjectStackTest >> testNewObjectStackIsEmpty [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ | objStack | @@ -48,7 +46,7 @@ VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ ]. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -62,7 +60,7 @@ VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ ]. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopMournQueueReducesSize [ | objStack | @@ -72,7 +70,7 @@ VMObjectStackTest >> testPopMournQueueReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ | objStack | @@ -81,7 +79,7 @@ VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -91,7 +89,7 @@ VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectStackReducesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -102,14 +100,14 @@ VMObjectStackTest >> testPopObjectStackReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjects: n [ "Create an object stack at the position of the mark stack in the class table (4096)" self testPushObjects: n inStackAtIndex: 4096 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ memory ensureRoomOnObjStackAt: objectStackIndex. @@ -121,19 +119,19 @@ VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ self assert: (memory sizeOfObjStack: (memory objStackAt: objectStackIndex)) equals: n ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjectsAboveObjectStackLimit [ self testPushObjects: memory objectStackPageLimit + 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjectsToObjectStackLimit [ self testPushObjects: memory objectStackPageLimit ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushToMournQueueIncreasesSize [ | objStack | @@ -142,7 +140,7 @@ VMObjectStackTest >> testPushToMournQueueIncreasesSize [ self assert: (memory sizeOfObjStack: objStack) equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushToObjectStackIncreasesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st index 996a095879..71dbc2dd40 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPermanentSpaceImageReadingTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #name : #VMPermanentSpaceImageReadingTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-PermSpace' } -{ #category : 'utilities' } +{ #category : #utilities } VMPermanentSpaceImageReadingTest >> loadImage [ | memoryClass isa | @@ -40,7 +38,7 @@ VMPermanentSpaceImageReadingTest >> loadImage [ ] -{ #category : 'initialization' } +{ #category : #initialization } VMPermanentSpaceImageReadingTest >> setUp [ super setUp. @@ -52,7 +50,7 @@ VMPermanentSpaceImageReadingTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpaceImageReadingTest >> testLoadingImageHasEmptyPermSpaceWhenImageDoesNotHave [ self saveImage. diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st index 288eaf2d29..49cf813a85 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPermanentSpaceMemoryTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #name : #VMPermanentSpaceMemoryTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-PermSpace' } -{ #category : 'running' } +{ #category : #running } VMPermanentSpaceMemoryTest >> setUp [ super setUp. @@ -14,7 +12,7 @@ VMPermanentSpaceMemoryTest >> setUp [ self createWeakArrayClass ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ | permanentObject allInstances | @@ -27,7 +25,7 @@ VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ self assert: (memory fetchPointer: 0 ofObject: allInstances) equals: permanentObject. ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ | permanentObject oldObject youngReplacement arrFrom arrTo ec | @@ -54,7 +52,7 @@ VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ self deny: ec equals: PrimNoErr ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenModified [ | oldObject1 permanentObject1 | @@ -75,7 +73,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenMoving [ | oldObject1 permanentObject1 | @@ -96,7 +94,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ | permanentObject newObject | @@ -114,7 +112,7 @@ VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ | permanentObject oldObject | @@ -132,7 +130,7 @@ VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ | oldObject youngObject permanentObject | @@ -161,7 +159,7 @@ VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememberedSet [ | permanentObject youngObject rootObject| @@ -177,7 +175,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememb self assert: (memory getFromPermToNewSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRememberedSet [ | permanentObject oldObject rootObject| @@ -194,7 +192,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRemembe self assert: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded [ | permanentObject oldObject rootObject| @@ -217,7 +215,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ | permanentObject oldObject | @@ -232,7 +230,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesArray [ | permanentObject youngObject rootObject anArray| @@ -256,7 +254,7 @@ VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesAr self assert: (memory getMemoryMap isPermanentObject: youngObject). ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ | permanentObject | @@ -266,7 +264,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ self assert: permanentObject equals: memory getMemoryMap permSpaceStart + 16 "There is a zero-slot objects always in the perm space" ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ | permanentObject | @@ -276,7 +274,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ self deny: (memory getMemoryMap isYoungObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ | permanentObject | @@ -286,7 +284,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ self deny: (memory getMemoryMap isOldObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ | permanentObject | @@ -296,7 +294,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ self assert: (memory getMemoryMap isPermanentObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ | permanentObject nextObject | @@ -308,7 +306,7 @@ VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ | oldObject1 permanentObject1 oldObject2 youngObject | @@ -345,7 +343,7 @@ VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRememberedSetAndThenRemoved [ | oldObject1 oldObject2 permObject2 | @@ -369,7 +367,7 @@ VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRemembered self assert: memory getFromPermToNewSpaceRememberedSet rememberedSetSize equals: 0. ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ @@ -387,7 +385,7 @@ VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 array | @@ -408,7 +406,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInReme ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTheRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array youngObject | @@ -440,7 +438,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTh ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array | @@ -463,7 +461,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFro self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -483,7 +481,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -501,7 +499,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememb ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForwarderInOldSpace [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -516,7 +514,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForw self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: oldObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarderInScanvenge [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -533,7 +531,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarde self deny: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderInGC [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -550,7 +548,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderIn self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompactingForSaving [ | oldObject1 permanentObject1 oldObject2 oldObject2Hash | @@ -574,7 +572,7 @@ VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompa self assert: (memory hashBitsOf: (memory fetchPointer: 0 ofObject: permanentObject1)) equals: oldObject2Hash ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ | permanentObject oldObject oldClass oldClassHash found | @@ -600,7 +598,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ self assert: found ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered [ @@ -613,7 +611,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemembered [ @@ -626,7 +624,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ @@ -638,7 +636,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ @@ -651,7 +649,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedWhenPointingToMachineCodeMethod [ @@ -673,7 +671,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedW ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRememberedSet [ @@ -695,7 +693,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRemem ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -721,7 +719,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | @@ -750,7 +748,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNille ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -773,7 +771,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFire ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st index 5ba4cc63d3..7393d6f584 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st @@ -1,17 +1,15 @@ Class { - #name : 'VMPermanentSpacePrimitiveTest', - #superclass : 'VMAbstractPrimitiveTest', + #name : #VMPermanentSpacePrimitiveTest, + #superclass : #VMAbstractPrimitiveTest, #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #category : #'VMMakerTests-PermSpace' } -{ #category : 'configuring' } +{ #category : #configuring } VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ super configureEnvironmentBuilder. @@ -19,7 +17,7 @@ VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ environmentBuilder permSpaceSize: 10*1024*1024. ] -{ #category : 'initialization' } +{ #category : #initialization } VMPermanentSpacePrimitiveTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMPermanentSpacePrimitiveTest >> setUp [ self createWeakArrayClass. ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ interpreter push: (memory integerObjectOf: 42). @@ -37,7 +35,7 @@ VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ interpreter push: (self newZeroSizedObject). @@ -47,7 +45,7 @@ VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ interpreter push: (self newOldSpaceObjectWithSlots: 0). @@ -57,7 +55,7 @@ VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ | oldObj permObject | @@ -71,7 +69,7 @@ VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ | oldObject | @@ -86,7 +84,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ | oldObject | @@ -101,7 +99,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ | newObject | @@ -116,7 +114,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ | oldObject | @@ -131,7 +129,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksWithByteArray [ | oldObject | diff --git a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st index f23f44e730..2b4eea4684 100644 --- a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMPinnedObjectTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMPinnedObjectTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> lastAliveObject [ ^ self keptObjectInVMVariable2 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> lastPinnedObject [ ^ self keptObjectInVMVariable1 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newAliveObject [ | newAliveObject | newAliveObject := self newOldSpaceObjectWithSlots: 1. @@ -25,12 +23,12 @@ VMPinnedObjectTest >> newAliveObject [ ^ newAliveObject ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newDeadObject [ ^ self newOldSpaceObjectWithSlots: 1 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newKeptPinnedObject [ | newPinned | newPinned := self newOldSpaceObjectWithSlots: 1. @@ -40,7 +38,7 @@ VMPinnedObjectTest >> newKeptPinnedObject [ ^ newPinned ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed aliveHash | "D = Dead @@ -70,7 +68,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOld self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPinnedObject [ | aliveObject destination | "D = Dead @@ -98,7 +96,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPi self assert: self lastAliveObject equals: destination. ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -128,7 +126,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStar self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBeforeFirstPinned [ | aliveObject destination | "D = Dead @@ -156,7 +154,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBefore self assert: self lastAliveObject equals: destination. ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -186,7 +184,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfO self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDead [ | destination aliveObject aliveObjectHash | "D = Dead @@ -212,7 +210,7 @@ VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDea self assert: (memory isFreeObject: (memory objectAfter: self lastPinnedObject)). ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ "if we follow the forwarder, the object is in the old space" | obj | @@ -223,7 +221,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ self assert: (memory isInOldSpace: (memory followForwarded: obj)) ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForwarderBehind [ | obj | obj := self newObjectWithSlots: 0. @@ -233,7 +231,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForward self assert: (memory isForwarded: obj) ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinnedObjectShouldNotBeMovedByGC [ | pinned | self newOldSpaceObjectWithSlots: 0. "deadObject, that differenciate the start of the old space to the pin" diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st index 87474aad24..1c7a580223 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st @@ -1,17 +1,15 @@ Class { - #name : 'VMPrimitiveCallAbstractTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMPrimitiveCallAbstractTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'baseMethodIP', 'baseFrame', 'baseMethod' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver arguments: arguments returnAddress: returnAddress [ machineSimulator receiverRegisterValue: receiver. @@ -34,19 +32,19 @@ VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver a ] -{ #category : 'helpers' } +{ #category : #helpers } VMPrimitiveCallAbstractTest >> findMethod: aSelector [ ^ self class lookupSelector: aSelector ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> jitOptions [ ^ super jitOptions @@ -54,13 +52,13 @@ VMPrimitiveCallAbstractTest >> jitOptions [ yourself ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodReturningNil [ ^ nil ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ "This method is used to test sends. @@ -68,7 +66,7 @@ VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ ^ self methodWithSend: $7 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ "This method is used to test sends. @@ -76,7 +74,7 @@ VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ ^ self methodWithSend: Object ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ "This method is used to test sends. @@ -84,7 +82,7 @@ VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ ^ self methodWithSend: nil ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ "This method is used to test the invocation of a primitive. @@ -94,7 +92,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ ^ 84 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ "This method is used to test the invocation of a primitive. @@ -104,7 +102,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ ^ 84 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ @@ -112,7 +110,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ "This method is used to test the invocation of a primitive. @@ -122,7 +120,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ "This method is used to test the invocation of a primitive. @@ -132,13 +130,13 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodToCompile1 [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend [ "This method is used to test sends. @@ -146,7 +144,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend [ ^ self send ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend: arg [ "This method is used to test sends. @@ -154,7 +152,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend: arg [ ^ arg send ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveCallAbstractTest >> setUp [ | primitiveAccessorDepthTable | @@ -179,7 +177,7 @@ VMPrimitiveCallAbstractTest >> setUp [ ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveCallAbstractTest >> setUpTrampolines [ super setUpTrampolines. diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st index 084419c9cc..384475fb9b 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPrimitiveCallingTest', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #name : #VMPrimitiveCallingTest, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -28,7 +26,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLongStore [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -50,7 +48,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLong self assert: interpreter fetchByte equals: 16rF4 ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -72,7 +70,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: interpreter framePointer) equals: (memory integerObjectOf: -1) ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTempWithInternalActivation [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st index a0493b49f3..6ecb274692 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMPrimitiveTest', - #superclass : 'VMInterpreterTests', + #name : #VMPrimitiveTest, + #superclass : #VMInterpreterTests, #instVars : [ 'imageName' ], @@ -9,12 +9,10 @@ Class { 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'asserting' } +{ #category : #asserting } VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ | numSlotOop numSlotOopToCompare | @@ -28,7 +26,7 @@ VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMPrimitiveTest >> fillNewSpace [ "Allocate enough space to generate a full new space" @@ -40,7 +38,7 @@ VMPrimitiveTest >> fillNewSpace [ classIndex: memory arrayClassIndexPun) isNotNil ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -51,7 +49,7 @@ VMPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -78,7 +76,7 @@ VMPrimitiveTest >> setUp [ imageName := VMPrimitiveTest name ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> setUpForwardedObjects [ | class1 class2 object1 object2 array1 array2 | @@ -102,14 +100,14 @@ VMPrimitiveTest >> setUpForwardedObjects [ ^ object1. ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveTest >> tearDown [ imageName ifNotNil: [ imageName asFileReference ensureDeleteAll ]. super tearDown ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -122,7 +120,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -135,7 +133,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ | string | @@ -151,7 +149,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ interpreter push: (memory integerObjectOf: 1). @@ -166,7 +164,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -183,7 +181,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflow [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -196,7 +194,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflow [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ | maxSmallInt | @@ -214,7 +212,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -235,7 +233,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferen self assert: (memory isForwarded: object2) equals: true ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -256,7 +254,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ self assert: (memory fetchClassOf: object2) equals: class1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -277,7 +275,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSi self assert: (memory fetchClassOf: (memory followForwarded: object2)) equals: class1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -299,7 +297,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ self assert: (memory fetchInteger: 0 ofObject: object2) equals: 42. ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -325,7 +323,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferen self assert: (memory fetchInteger: 0 ofObject: (memory followForwarded: object2)) equals: 42 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -348,7 +346,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ self assert: (memory rawHashBitsOf: object2) equals: hash1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDifferentSize [ | class1 class2 object1 object2 hash1 hash2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -372,7 +370,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDiff self assert: (memory rawHashBitsOf: (memory followForwarded: object2)) equals: hash1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ | class immediate array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -391,7 +389,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -412,7 +410,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ self assert: interpreter primFailCode equals: PrimErrNoModification ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -432,7 +430,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ self assert: interpreter primFailCode equals: PrimErrObjectIsPinned ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNotCopyHash [ | class object1 object2 hash2BeforeBecome array1 array2 object2FromForwarder | class := self @@ -455,7 +453,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNot self assert: (memory hashBitsOf: object2) equals: hash2BeforeBecome ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -478,7 +476,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHa self deny: (memory hashBitsOf: object2) equals: hash2 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOriginalObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -498,7 +496,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOrigi self assert: (memory followForwarded: object1) equals: object2 ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacter [ interpreter push: (memory integerObjectOf: 65). @@ -508,7 +506,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacter [ self assert: interpreter stackTop equals: (memory characterObjectOf: 65). ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ | invalidNumber | @@ -527,7 +525,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ interpreter push: memory trueObject. @@ -538,7 +536,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -562,7 +560,7 @@ VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: interpreter stackTop. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -573,7 +571,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -588,7 +586,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -602,7 +600,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ | class objectInstance biggerClass objectForwarded array1 array2 | "Forwarding an object happens when becoming it with a bigger object" @@ -632,7 +630,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -644,7 +642,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ | class objectInstance | "I don't know how to force a bad argument count." @@ -667,7 +665,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -683,7 +681,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -698,7 +696,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ | class object slotIndex objectToPutInSlot | @@ -721,7 +719,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ self assert: interpreter primFailCode equals: 2. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -745,7 +743,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ self assert: interpreter primFailCode equals: PrimErrNoModification. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -761,7 +759,7 @@ VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -784,7 +782,7 @@ VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger >> memory numSmallIntegerTagBits)). @@ -795,7 +793,7 @@ VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -806,7 +804,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -817,7 +815,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ | string | @@ -834,7 +832,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ | string | @@ -848,7 +846,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -859,7 +857,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ "This insures the fact that no data is lost during the processing of usqInt by the primitive" @@ -875,7 +873,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ "111... 010110 -> -42 000... 010110 -> 21""" @@ -888,7 +886,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: 21). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -899,7 +897,7 @@ VMPrimitiveTest >> testPrimitiveBitOr1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -914,7 +912,7 @@ VMPrimitiveTest >> testPrimitiveBitOr2 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr3 [ interpreter push: (memory integerObjectOf: 16r0). @@ -929,7 +927,7 @@ VMPrimitiveTest >> testPrimitiveBitOr3 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr4 [ "This is to insure that primitiveBitOr executes a logical Or and not an XOr" @@ -945,7 +943,7 @@ VMPrimitiveTest >> testPrimitiveBitOr4 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ interpreter push: memory trueObject. @@ -959,7 +957,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -970,7 +968,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -981,7 +979,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ "This insure the fact that no data is lost during the processing of usqInt by the primitive" @@ -997,7 +995,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ interpreter push: (memory integerObjectOf: -73). @@ -1008,7 +1006,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> memory numSmallIntegerTagBits) - 1)). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShift1 [ interpreter push: (memory integerObjectOf: 2). @@ -1019,7 +1017,7 @@ VMPrimitiveTest >> testPrimitiveBitShift1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1032,7 +1030,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -1045,7 +1043,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ interpreter push: memory trueObject. @@ -1058,7 +1056,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftLeft [ interpreter push: (memory integerObjectOf: 16). @@ -1069,7 +1067,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftLeft [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftRight [ interpreter push: (memory integerObjectOf: 16). @@ -1080,7 +1078,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftRight [ self assert: interpreter stackTop equals: (memory integerObjectOf: 8). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ memory wordSize = 8 ifFalse: [ ^ self ]. "The 32 bits version of the primitive doesn't handle the negativ number case" @@ -1092,7 +1090,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ equals: (memory integerObjectOf: 16r1C00000000000000) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ "Insures no data is lost when bitshift overflows the integer type." @@ -1104,7 +1102,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ self assert: (interpreter stackTop) > (memory maxSmallInteger). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1115,7 +1113,7 @@ VMPrimitiveTest >> testPrimitiveBitXor1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor2 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1126,7 +1124,7 @@ VMPrimitiveTest >> testPrimitiveBitXor2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor3 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1137,7 +1135,7 @@ VMPrimitiveTest >> testPrimitiveBitXor3 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor4 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1148,7 +1146,7 @@ VMPrimitiveTest >> testPrimitiveBitXor4 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ interpreter push: memory trueObject. @@ -1162,7 +1160,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1173,7 +1171,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1184,7 +1182,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ "This guarantees the fact that no data is lost during the processing of usqInt by the primitive" "111... 111 @@ -1204,7 +1202,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> (memory numSmallIntegerTagBits + 1)))). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ interpreter push: (memory integerObjectOf: -42). @@ -1215,7 +1213,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 40). ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqualsZero [ interpreter push: self setUpForwardedObjects. @@ -1229,7 +1227,7 @@ VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqu ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZero [ interpreter push: self setUpForwardedObjects. @@ -1244,7 +1242,7 @@ VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZ ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ interpreter push: memory trueObject. @@ -1256,7 +1254,7 @@ VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDiv [ interpreter push: (memory integerObjectOf: 15). @@ -1269,7 +1267,7 @@ VMPrimitiveTest >> testPrimitiveDiv [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ interpreter push: (memory trueObject). @@ -1282,7 +1280,7 @@ VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1293,7 +1291,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1304,7 +1302,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ "In the primitive implementation of quo, it doesnt push the rest of the operation on the stack" @@ -1316,7 +1314,7 @@ VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1327,7 +1325,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1338,7 +1336,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 4). @@ -1349,7 +1347,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -1360,7 +1358,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1375,7 +1373,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivide [ interpreter push: (memory integerObjectOf: 4). @@ -1386,7 +1384,7 @@ VMPrimitiveTest >> testPrimitiveDivide [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 2). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ interpreter push: (memory trueObject). @@ -1398,7 +1396,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ "The interpreter fails because 42%4 != 0" @@ -1412,7 +1410,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1423,7 +1421,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1434,7 +1432,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1445,7 +1443,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1456,7 +1454,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 6). @@ -1467,7 +1465,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -42). @@ -1478,7 +1476,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -21). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self installFloatClass. @@ -1491,7 +1489,7 @@ VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1502,7 +1500,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 15). @@ -1513,7 +1511,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 15). @@ -1524,7 +1522,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1539,7 +1537,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory falseObject). @@ -1550,7 +1548,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -1561,7 +1559,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - Float64Array' } +{ #category : #'tests - primitiveAdd - Float64Array' } VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ | x y z result firstTerm size | @@ -1585,7 +1583,7 @@ VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 22.0. ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ interpreter push: (memory integerObjectOf: 1). @@ -1594,7 +1592,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1607,7 +1605,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1621,7 +1619,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1635,7 +1633,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1646,7 +1644,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1657,7 +1655,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1668,7 +1666,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1679,7 +1677,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -1690,7 +1688,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1701,7 +1699,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1716,7 +1714,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -1727,7 +1725,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -1738,7 +1736,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1749,7 +1747,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1760,7 +1758,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -1771,7 +1769,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ interpreter push: (memory integerObjectOf: -1000). @@ -1782,7 +1780,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -1793,7 +1791,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1808,7 +1806,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectWithArgCountLessThanOne [ |object1| "Tests the case where objectArg = 1 and: isOopFowarded: stackTop" @@ -1825,7 +1823,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectW self deny: interpreter failed. ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ |object1| "Tests the case where objectArg > 1 and: isOopFowarded: stackTop" @@ -1844,7 +1842,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ |object1| @@ -1860,7 +1858,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ interpreter push: memory trueObject. @@ -1872,7 +1870,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButDifferentType [ | object1 object2 | @@ -1891,7 +1889,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButD ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ | object | @@ -1907,7 +1905,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ | object | @@ -1921,7 +1919,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameValue [ | object1 object2 | @@ -1937,7 +1935,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameV ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ interpreter push: (memory trueObject). @@ -1950,7 +1948,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ interpreter push: (memory characterObjectOf: 66). @@ -1963,7 +1961,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ interpreter push: (memory integerObjectOf: 0). @@ -1976,7 +1974,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -1989,7 +1987,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -2004,7 +2002,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2019,7 +2017,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat . @@ -2035,7 +2033,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2051,7 +2049,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2067,7 +2065,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2092,7 +2090,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedBool [ interpreter push: (memory trueObject). @@ -2103,7 +2101,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedBool [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -2114,7 +2112,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ interpreter push: (memory integerObjectOf: 16). @@ -2125,7 +2123,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2136,7 +2134,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2147,7 +2145,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2158,7 +2156,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2169,7 +2167,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2180,7 +2178,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2195,7 +2193,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2206,7 +2204,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory trueObject). @@ -2217,7 +2215,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2228,7 +2226,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2239,7 +2237,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2250,7 +2248,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2261,7 +2259,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2272,7 +2270,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2283,7 +2281,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2294,7 +2292,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2309,7 +2307,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ | class array | @@ -2329,7 +2327,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ | class array | @@ -2347,7 +2345,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 0.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ | class array | @@ -2367,7 +2365,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ | class array | @@ -2387,7 +2385,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ | class array | @@ -2407,7 +2405,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ | class array | @@ -2427,7 +2425,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ | class array | @@ -2447,7 +2445,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ | class array | @@ -2469,7 +2467,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveMod [ interpreter push: (memory integerObjectOf: 16). @@ -2482,7 +2480,7 @@ VMPrimitiveTest >> testPrimitiveMod [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ interpreter push: (memory trueObject). @@ -2497,7 +2495,7 @@ VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2508,7 +2506,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 42). @@ -2520,7 +2518,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModNegativeValue [ interpreter push: (memory integerObjectOf: 16). @@ -2533,7 +2531,7 @@ VMPrimitiveTest >> testPrimitiveModNegativeValue [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ interpreter push: (memory integerObjectOf: memory maxCInteger >> memory numSmallIntegerTagBits). @@ -2546,7 +2544,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -2557,7 +2555,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2568,7 +2566,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ interpreter push: (memory trueObject). @@ -2581,7 +2579,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ interpreter push: (memory integerObjectOf: 16). @@ -2594,7 +2592,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2609,7 +2607,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -2620,7 +2618,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ interpreter push: (memory integerObjectOf: 16). @@ -2632,7 +2630,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ self assert: (interpreter stackValue: 2) equals: (memory integerObjectOf: 16). ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2644,7 +2642,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ | class | class := self newClassInOldSpaceWithSlots: 4 instSpec: memory nonIndexablePointerFormat. @@ -2655,7 +2653,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: interpreter stackTop) equals: 4 ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ | class | @@ -2669,7 +2667,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ | class | @@ -2683,7 +2681,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2694,7 +2692,7 @@ VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ self deny: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2706,7 +2704,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -2722,7 +2720,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2734,7 +2732,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -2746,7 +2744,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2759,7 +2757,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2772,7 +2770,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2785,7 +2783,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ | newObj class | @@ -2802,7 +2800,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: newObj) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ | newObj class | @@ -2818,7 +2816,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: newObj) equals: 7 ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ | newObj class | @@ -2836,7 +2834,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ self assert: (memory getMemoryMap isOldObject: newObj) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ | class | @@ -2852,7 +2850,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ | class | @@ -2866,7 +2864,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ | class | @@ -2881,7 +2879,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ | class | @@ -2897,7 +2895,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ | class | @@ -2911,7 +2909,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ self assert: interpreter primFailCode equals: PrimErrBadArgument ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -2922,7 +2920,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ | class | "class object with no slots, so no format" @@ -2934,7 +2932,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ | class | "class with nil used as format" @@ -2947,7 +2945,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2958,7 +2956,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2969,7 +2967,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 16). @@ -2980,7 +2978,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2991,7 +2989,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3006,7 +3004,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -3017,7 +3015,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -3028,7 +3026,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -3039,7 +3037,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ interpreter push: (memory integerObjectOf: 16). @@ -3050,7 +3048,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ interpreter push: (memory instantiateClass: (self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat)). @@ -3062,7 +3060,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ |object object2| @@ -3081,7 +3079,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ self assert: (memory isPinned: object2). ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ |object| @@ -3101,7 +3099,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ |object| @@ -3121,7 +3119,7 @@ VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuo [ interpreter push: (memory integerObjectOf: 15). @@ -3131,7 +3129,7 @@ VMPrimitiveTest >> testPrimitiveQuo [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ interpreter push: (memory trueObject). @@ -3144,7 +3142,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -3155,7 +3153,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -3166,7 +3164,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ "Tests that the rest of the integer division is not pushed into the stack, as this is not expected in a primitive behavior" interpreter push: (memory integerObjectOf: 16). @@ -3178,7 +3176,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ self assert: (interpreter stackValue: 1) equals: (memory integerObjectOf: 16). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ interpreter push: (memory integerObjectOf: 42). @@ -3189,7 +3187,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -3200,7 +3198,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -3211,7 +3209,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ interpreter push: (memory integerObjectOf: -13). @@ -3222,7 +3220,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 6). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -3233,7 +3231,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3248,7 +3246,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ interpreter push: (memory integerObjectOf: 1). @@ -3258,7 +3256,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ self assert: interpreter failed ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ | class object | @@ -3273,7 +3271,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ self assert: (memory isImmutable: object) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ | method | @@ -3288,7 +3286,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ | array1 | @@ -3301,7 +3299,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ | method | @@ -3316,7 +3314,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ | array1 array2 arrayForwarder arrayForwardee | @@ -3341,7 +3339,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderResolutionAndCallPrimitiveAgain [ | array1 array2 arrayForwarder arrayForwardee | @@ -3368,7 +3366,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderReso ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ | class objectInstance | "Forwarding an object happens when becoming it with a bigger object" @@ -3384,7 +3382,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3399,7 +3397,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3414,7 +3412,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3430,7 +3428,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3446,7 +3444,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3462,7 +3460,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3484,7 +3482,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3501,7 +3499,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ equals: (memory smallFloatObjectOf: 10.0) ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3518,7 +3516,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPre self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3535,7 +3533,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3549,7 +3547,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3563,7 +3561,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3581,7 +3579,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3598,7 +3596,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ equals: (memory smallFloatObjectOf: 1.0) ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3615,7 +3613,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeError self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3632,7 +3630,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErro self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3650,7 +3648,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStac self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 0.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3664,7 +3662,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3678,7 +3676,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperan self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3691,7 +3689,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3709,7 +3707,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3724,7 +3722,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3739,7 +3737,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3753,7 +3751,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3767,7 +3765,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3784,7 +3782,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3803,7 +3801,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3818,7 +3816,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3833,7 +3831,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3850,7 +3848,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3867,7 +3865,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithT self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3884,7 +3882,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWith self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3898,7 +3896,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirs self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3912,7 +3910,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSeco self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3932,7 +3930,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3947,7 +3945,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3962,7 +3960,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3979,7 +3977,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3996,7 +3994,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4010,7 +4008,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4024,7 +4022,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4043,7 +4041,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4058,7 +4056,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4073,7 +4071,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4088,7 +4086,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4105,7 +4103,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4122,7 +4120,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4136,7 +4134,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4150,7 +4148,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4169,7 +4167,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4184,7 +4182,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4201,7 +4199,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4217,7 +4215,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOpera ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4233,7 +4231,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOper ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4252,7 +4250,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesSta ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4274,7 +4272,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4290,7 +4288,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4307,7 +4305,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ equals: (memory smallFloatObjectOf: 100.0) ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4326,7 +4324,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErr ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4345,7 +4343,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeEr ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4359,7 +4357,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4373,7 +4371,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4391,7 +4389,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4406,7 +4404,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4421,7 +4419,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4438,7 +4436,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErr self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4455,7 +4453,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4469,7 +4467,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4483,7 +4481,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4502,7 +4500,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4517,7 +4515,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4532,7 +4530,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4549,7 +4547,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4563,7 +4561,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4577,7 +4575,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4596,7 +4594,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ | method frame contextOop contextIdentityHash suspendedContext | @@ -4629,7 +4627,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ equals: contextIdentityHash ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ | method | @@ -4651,7 +4649,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotCreateImage [ interpreter imageReader validateImage: imageName ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ | method object objectHash | @@ -4678,7 +4676,7 @@ VMPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ equals: objectHash ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ | class array | @@ -4699,7 +4697,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ | class array | @@ -4720,7 +4718,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ | class array | @@ -4739,7 +4737,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ | class array | @@ -4758,7 +4756,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ | class array | @@ -4777,7 +4775,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ | class array | @@ -4796,7 +4794,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ | class array | @@ -4815,7 +4813,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4831,7 +4829,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4848,7 +4846,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4866,7 +4864,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonC self assert: string contentEquals: (self newString: 'po') ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -4881,7 +4879,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -4904,7 +4902,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -4922,7 +4920,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonChar self assert: string contentEquals: (self newString: 'po') ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -4942,7 +4940,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4962,7 +4960,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -4982,7 +4980,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5002,7 +5000,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ | byteSymbol asciiOrder | @@ -5021,7 +5019,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -5034,7 +5032,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -5047,7 +5045,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ | string | @@ -5062,7 +5060,7 @@ VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ interpreter push: (memory integerObjectOf: 2). @@ -5077,7 +5075,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -5094,7 +5092,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ interpreter push: (memory integerObjectOf: memory minSmallInteger). @@ -5105,7 +5103,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ | minSmallInt | @@ -5123,7 +5121,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ interpreter setImageVersion: 110. @@ -5138,7 +5136,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 110). ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ | slots | @@ -5164,7 +5162,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ memory okayOop: (memory fetchPointer: i ofObject: interpreter stackTop) ] ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterSetsImageVersion [ interpreter push: memory nilObject. diff --git a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st index 895ba3b5f2..8ec7e8c742 100644 --- a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMPushThisContextRoutineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMPushThisContextRoutineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> setUp [ | contextClass | @@ -29,7 +27,7 @@ VMPushThisContextRoutineTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | @@ -74,7 +72,7 @@ VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ equals: contextOop ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -107,7 +105,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: LargeContextSlots. ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -142,7 +140,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: SmallContextSlots ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments expectedStackPointer | @@ -179,7 +177,7 @@ VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ | isLargeContext isInBlock routine numberOfArguments | @@ -216,7 +214,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ self assert: (memory fetchPointer: Context allSlots size +2 ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: 3). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ | isLargeContext isInBlock routine numberOfArguments | @@ -250,7 +248,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ | isLargeContext isInBlock routine numberOfArguments | @@ -285,7 +283,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop expectedStackPointer | @@ -323,7 +321,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ | isLargeContext isInBlock routine numberOfArguments | @@ -358,7 +356,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ self assert: (memory fetchPointer: ReceiverIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ | isLargeContext isInBlock routine numberOfArguments | @@ -398,7 +396,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ self assert: (memory fetchPointer: Context allSlots size + numberOfArguments + 3 ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testSingleContextReturnsNewSpouseInNewSpace [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | diff --git a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st index b5bfa609cb..9edefda0ad 100644 --- a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSegmentsImageFormatTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #name : #VMSegmentsImageFormatTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegment [ | header newSegmentSize | @@ -25,7 +23,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegme equals: (memory segmentManager segments at: 0) segSize ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage [ | header newSegmentSize | @@ -48,7 +46,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage equals: header firstSegSize + newSegmentSize ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBigger [ | newSegmentSize | @@ -61,7 +59,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBi self assert: newSegmentSize >= memory growHeadroom ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSmaller [ | newSegmentSize | @@ -76,7 +74,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSm self assert: newSegmentSize >= memory growHeadroom ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testMinimalImageHasASingleSegment [ diff --git a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st index 9b55da5b97..8a162f9399 100644 --- a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMSelectorIndexDereferenceRoutineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSelectorIndexDereferenceRoutineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ "32 bit platforms use a direct selector reference and not an index" @@ -20,7 +18,7 @@ VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ self assert: cogit ceDereferenceSelectorIndex isNil ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -31,7 +29,7 @@ VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ self assert: cogit ceDereferenceSelectorIndex notNil ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSpecialSelectorTable [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -60,7 +58,7 @@ VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSp self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> testPositiveSelectorIndexIsLookedUpInMethodLiterals [ "64 bit platforms use a selector index and a routine to map it to the real selector" diff --git a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st index 34f53a536e..8e4b9726e7 100644 --- a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSessionIdTest', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #name : #VMSessionIdTest, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMSessionIdTest >> testGlobalSessionID [ "The globalSessionID is stored as a 64 bit number, but for compatibility with older plugins, is restricted to postive signed 32 bit values" | vm predicted diff | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st index c9037f3998..1a7faad9a6 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimpleStackBasedCogitAbstractTest', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMSimpleStackBasedCogitAbstractTest, + #superclass : #VMSpurMemoryManagerTest, #instVars : [ 'cogit', 'codeSize', @@ -31,12 +31,10 @@ Class { 'VMBytecodeConstants', 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ ^ { @@ -44,7 +42,7 @@ VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ } ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ ^ ParametrizedTestMatrix new @@ -53,7 +51,7 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ yourself ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ ^ ParametrizedTestMatrix new @@ -62,26 +60,26 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ yourself ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSizeParameters [ ^ self wordSize64Parameters + self wordSize32Parameters ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> ISA: anISA [ isa := anISA ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> abstractInstructions [ ^ (0 to: cogit getOpcodeIndex - 1) collect: [ :i | cogit abstractOpcodes at: i ] ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure [ | before after | @@ -93,7 +91,7 @@ VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure self assert: (self readMemoryAt: after) equals: anOop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlockClosure [ | before | @@ -105,17 +103,17 @@ VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlock equals: before ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> callerAddress [ ^ callerAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> cogit [ ^ cogit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ "Compiles some native code using the code inside the block closure as builder. This version assumes the block has a single 1-bytecode statement @@ -124,13 +122,13 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ ^ self compile: aBlockClosure bytecodes: 2 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes [ ^ self compile: aBlockClosure bytecodes: bytecodes headerSize: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes headerSize: headerSize [ "Compiles some native code using the code inside the block closure as builder. @@ -155,7 +153,7 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecod ^ allocatedAddress ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ "We will call to this address" @@ -167,7 +165,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ sendAddress := self compile: [ cogit genSpecialSelectorSend ]. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampolineName [ | startAddress | @@ -187,7 +185,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampol ^ startAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytecodes: bytecodes [ "Call a compilation block initializing the compiler before. @@ -205,7 +203,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytec ^ aBlockClosure value ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ "Create the root context with a valid method" @@ -241,7 +239,7 @@ VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ baseFrame := interpreter framePointer ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ self @@ -251,13 +249,13 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ temporaries: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments [ self createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for machine code. @@ -288,7 +286,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress rec builder buildFrame ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ self @@ -297,7 +295,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ arguments: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress receiver: receiver arguments: arguments [. "I create a frameless call @@ -324,7 +322,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress re ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for interpreter. @@ -365,7 +363,7 @@ VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: return cogit needsFrame: true. ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ | specialObjectsOop | @@ -382,19 +380,19 @@ VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ memory specialObjectsOop: specialObjectsOop. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassemble [ ^ self disassembleFrom: cogInitialAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex [ ^ self disassembleFrom: anIndex opcodes: opcodes ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ machineSimulator disassembler @@ -407,25 +405,25 @@ VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberO pc: 0 ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue [ ^ machineSimulator framePointerRegisterValue ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue: aValue [ machineSimulator framePointerRegisterValue: aValue ] -{ #category : 'configuration' } +{ #category : #configuration } VMSimpleStackBasedCogitAbstractTest >> generateCaptureCStackPointers [ ^ true ] -{ #category : 'helpers - cog methods' } +{ #category : #'helpers - cog methods' } VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector: anSelectorOop [ | targetCog allocatedAddress | @@ -444,18 +442,18 @@ VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> getLastAddress [ ^ machineSimulator getLastAddress: self abstractInstructions. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initialCodeSize [ ^ 4 * 1024 ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ "I will create the initial stack with a well-known caller address so we know if the code comes back @@ -467,7 +465,7 @@ VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ | page | @@ -480,31 +478,31 @@ VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ machineSimulator framePointerRegisterValue: page baseAddress. ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> instructionPointer [ ^ self readRegister: machineSimulator instructionPointerRegister ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> interpreterClass [ ^ CogVMSimulatorLSB ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> jitCompilerClass [ ^ SimpleStackBasedCogit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod [ ^ self jitMethod: aHostCompiledMethod selector: memory nilObject ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: aSelectorOop [ | methodOop | @@ -514,7 +512,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: ^ cogit cog: methodOop selector: aSelectorOop ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> jitOptions [ ^ Dictionary newFromPairs: { @@ -524,7 +522,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitOptions [ #ObjectMemory. self memoryClass name } ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ | builder | @@ -533,12 +531,12 @@ VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ ^ builder ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> machineSimulator [ ^ machineSimulator ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ^ self wordSize = 4 @@ -546,7 +544,7 @@ VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ifFalse: [ Spur64BitCoMemoryManager ] ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ | compiler | @@ -561,13 +559,13 @@ VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> openMachineDebugger [ self openMachineDebuggerAt: cogInitialAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ ^ VMMachineCodeDebugger new @@ -578,7 +576,7 @@ VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ openWithSpec. ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pop [ | stackAddressIntegerValue poppedByteArray | @@ -595,13 +593,13 @@ VMSimpleStackBasedCogitAbstractTest >> pop [ ^ poppedByteArray ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> popAddress [ ^ self pop integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareCall [ machineSimulator hasLinkRegister @@ -614,13 +612,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareCall [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver arguments: arguments [ machineSimulator baseRegisterValue: cogit varBaseAddress. @@ -637,13 +635,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver ar self prepareCall ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> primitiveTraceLogSize [ ^ 256 * 8 "word size" ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ | stackAddressIntegerValue | @@ -664,7 +662,7 @@ VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ | aByteArray | @@ -673,7 +671,7 @@ VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ self push: aByteArray ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ | bytes | @@ -681,7 +679,7 @@ VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ ^ bytes integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ registerValue := ByteArray new: self wordSize. @@ -689,7 +687,7 @@ VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ " @@ -712,26 +710,26 @@ VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ ^ self readMemoryAt: machineSimulator framePointerRegisterValue - ((3 + anIndex) * self wordSize) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> receiverRegister: anInteger [ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> returnValue [ ^ self readRegister: machineSimulator receiverRegister ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress [ ^ self runFrom: startAddress until: endAddress timeout: 100000. "microseconds" ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress timeout: microseconds [ machineSimulator startAt: startAddress @@ -740,7 +738,7 @@ VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress t count: 0. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ "The different platforms generates code in a different way, so the number of opcodes can not be valid. Eg: ARM generates more instructions per opcode. It has to calculate the instructions to run differently" @@ -751,7 +749,7 @@ VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ count: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ machineSimulator startAt: cogInitialAddress @@ -761,7 +759,7 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ machineSimulator startAt: anAddress @@ -771,17 +769,17 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> sentSelector [ ^ sentSelector ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> sentSelector: anObject [ sentSelector := anObject ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUp [ super setUp. @@ -824,7 +822,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUp [ self initializeInitialStackFrame. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit allocateOpcodes: 80 bytecodes: 0 ifFail: [ self error: 'Could not allocate opcodes' ]. @@ -841,7 +839,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit methodZone manageFrom: cogit methodZoneBase to: memory getMemoryMap codeZoneEnd. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ "Create a send trampoline so we can stop..." @@ -868,7 +866,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ ^ (self stackAt: index) @@ -877,7 +875,7 @@ VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ signed: false ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ | stackAddressIntegerValue | @@ -887,37 +885,37 @@ VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ ^ machineSimulator memoryAt: stackAddressIntegerValue readNext: self wordSize. ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue: aValue [ machineSimulator stackPointerRegisterValue: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> temporaryRegisterValue [ ^ self machineSimulator temporaryRegisterValue ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> top [ ^ self stackAt: 0 ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> topAddress [ ^ self top integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st index c43441d889..da38e1895e 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitBytecodeTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitBytecodeTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -27,7 +25,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVa self runGeneratedCode. ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrameful onBlock: generationBlock [ | oldFP oldSP | @@ -47,7 +45,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrame self assert: oldSP equals: self stackPointerRegisterValue. ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister: anAddress withFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -60,7 +58,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister self assert: machineSimulator receiverRegisterValue equals: anAddress ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -71,50 +69,50 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isF self runUntilReturn. ] -{ #category : 'tests - extended store bytecode - store inst var' } +{ #category : #'tests - extended store bytecode - store inst var' } VMSimpleStackBasedCogitBytecodeTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable1 [ self testExtendedPushPushesInstanceVariable: 1 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable2 [ self testExtendedPushPushesInstanceVariable: 2 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable3 [ self testExtendedPushPushesInstanceVariable: 3 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable32 [ self testExtendedPushPushesInstanceVariable: 32 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable64 [ self testExtendedPushPushesInstanceVariable: 64 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable: instanceVariableToWrite [ self testExtendedPushPushesVariableType: 0 "Instance variable type" index: instanceVariableToWrite ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type index: instanceVariableToWrite [ "Type = 0 is instance variable" @@ -138,7 +136,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - jumps' } +{ #category : #'tests - jumps' } VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ | firstBytecode | @@ -178,67 +176,67 @@ VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ equals: memory trueObject ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempPopsValue [ self testPopIntoTempPopsValueAt: 3 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 3 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempPopsValue [ self testPopIntoTempPopsValueAt: 4 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 4 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempPopsValue [ self testPopIntoTempPopsValueAt: 5 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 5 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempPopsValue [ self testPopIntoTempPopsValueAt: 6 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 6 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempPopsValue [ self testPopIntoTempPopsValueAt: 7 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 7 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -246,7 +244,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -254,7 +252,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -262,19 +260,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempPopsValue [ self testPopIntoTempPopsValueAt: 1 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 1 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -282,55 +280,55 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresEigthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFifthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFirstInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFourthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSecondInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSeventhInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSixthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresThirdInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite. @@ -339,7 +337,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStores self assert: (memory fetchPointer: instanceVariableToWrite - 1 ofObject: obj) equals: memory falseObject ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -347,19 +345,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempPopsValue [ self testPopIntoTempPopsValueAt: 2 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 2 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -367,7 +365,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecod self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -375,7 +373,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableUnderTest [ | temporaries | @@ -402,7 +400,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableU self assert: self popAddress equals: memory trueObject ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVariableUnderTest [ | temporaries | @@ -427,7 +425,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVar self assert: (self readTemporaryValueAt: tempVariableUnderTest) equals: memory falseObject ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -435,157 +433,157 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 10 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 10 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 11 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 11 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 12 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 12 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 13 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 13 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 14 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 14 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 15 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 15 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush3rdTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 3 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 4 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 4 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 5 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 5 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 6 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 6 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 7 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 7 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 8 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 8 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 9 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 9 ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse [ self compile: [ cogit genPushConstantFalseBytecode ]. @@ -594,7 +592,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - two bytecodes' } +{ #category : #'tests - two bytecodes' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self compile: [ @@ -606,7 +604,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self assert: machineSimulator receiverRegisterValue equals: memory nilObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self compile: [ cogit genPushConstantNilBytecode ]. @@ -615,7 +613,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self assert: self popAddress equals: memory nilObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self compile: [ cogit genPushConstantTrueBytecode ]. @@ -624,7 +622,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self assert: self popAddress equals: memory trueObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallIntegerZero [ self compile: [ cogit genPushConstantZeroBytecode ]. @@ -633,19 +631,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallI self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 1 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 1 ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusOne [ cogit byte0: 116. @@ -656,7 +654,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusO self assert: self popAddress equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ cogit byte0: 118. @@ -667,7 +665,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ self assert: self popAddress equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ cogit byte0: 119. @@ -678,7 +676,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ self assert: self popAddress equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ cogit byte0: 117. @@ -689,7 +687,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver [ machineSimulator receiverRegisterValue: 75. @@ -700,103 +698,103 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver self assert: self popAddress equals: 75 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEighthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 8 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEleventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 11 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 15 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 5 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFirstVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 1 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 14 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 4 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesNinthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 9 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSecondVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 2 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSeventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 7 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 16 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 6 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 10 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirdVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 3 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 13 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTwelfthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 12 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -815,19 +813,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushe self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 2 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 2 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tempVariableUnderTest [ | arguments | @@ -850,7 +848,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tempVariableUnderTest [ | temporaries | @@ -875,13 +873,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushThirdTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 3 ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -920,7 +918,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFr equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -958,7 +956,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallF equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFrameCallsLargeMethodTrampoline [ | numberOfArguments methodObject method | @@ -995,7 +993,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFram equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFrameCallsSmallMethodTrampoline [ | numberOfArguments methodObject method | @@ -1032,13 +1030,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFram equals: numberOfArguments ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnRegister [ self @@ -1047,19 +1045,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnReg onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRegister [ self @@ -1068,13 +1066,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRe onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInReturnRegister [ self @@ -1085,7 +1083,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInRet cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ @@ -1093,7 +1091,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ @@ -1101,7 +1099,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ @@ -1109,7 +1107,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInReturnRegister [ self @@ -1120,7 +1118,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInRe cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ @@ -1128,7 +1126,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ self @@ -1136,7 +1134,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInReturnRegister [ self @@ -1146,7 +1144,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInR cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ self @@ -1154,7 +1152,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ self @@ -1162,7 +1160,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectInReturnRegister [ self @@ -1172,7 +1170,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectIn cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ self @@ -1180,7 +1178,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1194,7 +1192,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsP equals: memory trueObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1209,7 +1207,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjec equals: memory falseObject ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1246,7 +1244,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector literalIndex | @@ -1274,7 +1272,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesReceiverFromStackTopIntoReceiverRegister [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1298,7 +1296,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesRecei equals: memory falseObject ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1325,7 +1323,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector | @@ -1352,7 +1350,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesReturnValueFromReceiverRegisterAfterReturn [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1381,7 +1379,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesRetu self assert: self popAddress equals: (memory integerObjectOf: 42) ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1396,7 +1394,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjec equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1411,7 +1409,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalOb equals: memory trueObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1431,7 +1429,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1456,7 +1454,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #+. @@ -1471,7 +1469,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1490,7 +1488,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelector equals: selectorAtIndex ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #+. @@ -1509,7 +1507,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1530,7 +1528,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1556,7 +1554,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #at:put:. @@ -1572,7 +1570,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ | signed | @@ -1598,7 +1596,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelector equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #at:put:. @@ -1618,7 +1616,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1637,7 +1635,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMoves equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64Bits [ | signed | @@ -1661,7 +1659,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegated equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #atEnd. @@ -1675,7 +1673,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceive self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelectorIntoClassRegisterIn32Bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1693,7 +1691,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelecto equals: selectorAtIndex ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #atEnd. diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st index c69374a214..e471e136aa 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st @@ -1,21 +1,19 @@ Class { - #name : 'VMSimpleStackBasedCogitCoggedMethods', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitCoggedMethods, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogMethodConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitCoggedMethods >> setUp [ super setUp. self setUpCogMethodEntry. ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndContinue [ | cogMethod otherBlock | @@ -30,7 +28,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: otherBlock ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndGoesToAbort [ | cogMethod otherBlock | @@ -45,7 +43,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: cogit ceMethodAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingNoCheckEntryDoesNotCheckClassTag [ | cogMethod otherBlock | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st index e2345429d5..021b93d5c5 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMSimpleStackBasedCogitMegamorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitMegamorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMMethodCacheConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ | specialSelectorsArray | @@ -27,7 +25,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ cogit generateOpenPICPrototype. ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICReturnsPIC [ | selector createdPic specialObjectsArray | @@ -38,13 +36,13 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICRet self assert: (cogit methodZone openPICWithSelector: selector) equals: createdPic. ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupNonExistingMegamorphicPICReturnsNil [ self assert: (cogit methodZone openPICWithSelector: memory trueObject) equals: nil ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ "We have to call the pic and see if it reaches the abort trampoline" @@ -76,7 +74,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ self assert: machineSimulator sendNumberOfArgumentsRegisterValue equals: createdPic address ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectPicAbortTrampoline [ | createdPic selector | @@ -89,7 +87,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectP equals: (cogit picAbortTrampolineFor: 1) ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numArgs [ | selector createdPic | @@ -98,43 +96,43 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numAr self assert: createdPic cmNumArgs equals: numArgs ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith1 [ self testNewMegamorphicPICNumArgs: 1 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith16 [ self testNewMegamorphicPICNumArgs: 16 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith2 [ self testNewMegamorphicPICNumArgs: 2 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith4 [ self testNewMegamorphicPICNumArgs: 4 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith8 [ self testNewMegamorphicPICNumArgs: 8 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWithoutArgs [ self testNewMegamorphicPICNumArgs: 0 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ | createdPic selector | @@ -143,7 +141,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ self assert: createdPic selector equals: selector ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ | createdPic selector | @@ -152,7 +150,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ self assert: createdPic blockSize equals: cogit openPICSize. ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ | selector createdPic | @@ -162,7 +160,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testRelinkCallSiteToMegamorphicPICCallsNewPIC [ | selector literalIndex method createdPic returnAfterCallAddress patchedCogMethod startAddress | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st index e1ff4724cd..64f66063c8 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitMonomorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitMonomorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ "Calculate the size of the Closed Pic" @@ -16,7 +14,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ self assert: cogit closedPICSize isNotNil ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineReplacesTheCallTargetWithTheCogMethodAddress [ "This is for the monomorphic case" @@ -66,7 +64,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineR self deny: executedTheTrampoline ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testObtainInlineCacheFromLinkedCall [ | sendingMethod targetCog selector executedTheTrampoline | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st index 2d4f3a96ab..1aba76164e 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimpleStackBasedCogitPolymorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitPolymorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'selector', 'numArgs', @@ -14,12 +14,10 @@ Class { #pools : [ 'CogMethodConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ ^ super testParameters * @@ -28,7 +26,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ yourself) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ | pic | "Only run this test if the test is configured for so much cases" @@ -39,7 +37,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ self assertPIC: pic hits: (cogMethods at: aCase) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ "Receiver is nil, class tag of the first entry is the receiver's class tag. - the receiver matches class tag for case 0 @@ -61,7 +59,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ "Receiver is nil, class tag of the first entry is 1 (a small integer). @@ -82,19 +80,19 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases [ ^ configuredPicCases ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases: aNumber [ configuredPicCases := aNumber ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ cogit @@ -104,7 +102,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ isMNUCase: false. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ | pic | @@ -119,7 +117,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ ^ pic ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ super setUp. @@ -160,7 +158,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ cogMethods at: index - 1 put: cogMethod ] "Maximum polymorphic cases" ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ | pic | @@ -169,7 +167,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ self assert: pic cPICNumCases equals: self configuredPicCases ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ | pic | pic := self makePolymorphicPIC. @@ -177,43 +175,43 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ self assert: (cogit backend callTargetFromReturnAddress: pic asInteger + cogit missOffset) equals: (cogit picAbortTrampolineFor: numArgs) ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase0 [ self assertHitAtCase: 0 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase1 [ self assertHitAtCase: 1 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase2 [ self assertHitAtCase: 2 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase3 [ self assertHitAtCase: 3 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase4 [ self assertHitAtCase: 4 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase5 [ "This is the last case. Cog PICs have 6 cases (0-based)" self assertHitAtCase: 5 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ | pic | pic := self makePolymorphicPIC. @@ -221,7 +219,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ self assert: pic cmType equals: CMPolymorphicIC. ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ | pic | @@ -231,7 +229,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ self assertPICMiss: pic ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ | pic | @@ -240,7 +238,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ self assert: pic cmNumArgs equals: numArgs ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEntryOffset [ | pic methodCheckEntryPoint methodNoCheckEntryPoint passedByCheckEntryPoint | @@ -271,7 +269,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEnt self deny: passedByCheckEntryPoint ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testSelectorInHeader [ | pic | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st index 00fe287064..7ab3e09968 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitRememberedSetTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitRememberedSetTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: value shouldCallTrampoline: shouldCallTrampoline [ | trampoline afterBytecode | @@ -30,14 +28,14 @@ VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: valu ] -{ #category : 'initialization' } +{ #category : #initialization } VMSimpleStackBasedCogitRememberedSetTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesNotCallTrampoline [ | newObject otherNewObject | @@ -50,7 +48,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesN shouldCallTrampoline: false ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesCallTrampoline [ | oldObject otherNewObject | @@ -64,7 +62,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesC shouldCallTrampoline: true ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesNotCallTrampoline [ | oldObject otherOldObject | @@ -78,7 +76,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesN shouldCallTrampoline: false ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInPermObjectDoesCallTrampoline [ | permObject otherPermObject | diff --git a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st index a3b6237cbb..b3b1b69113 100644 --- a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimulatedEnvironmentBuilder', - #superclass : 'Object', + #name : #VMSimulatedEnvironmentBuilder, + #superclass : #Object, #instVars : [ 'interpreter', 'interpreterClass', @@ -18,19 +18,17 @@ Class { 'permSpaceSize', 'allocateMemory' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> build [ self doBuildSimulator. self doBuild ] -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> doBuild [ "100 k at least to put the class table in the old space. @@ -87,7 +85,7 @@ VMSimulatedEnvironmentBuilder >> doBuild [ ] -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> doBuildSimulator [ objectMemory := objectMemoryClass simulatorClass new. @@ -102,17 +100,17 @@ VMSimulatedEnvironmentBuilder >> doBuildSimulator [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> initialCodeSize: anInteger [ initialCodeSize := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> initializationOptions: aCollection [ initializationOptions := aCollection ] -{ #category : 'initialization' } +{ #category : #initialization } VMSimulatedEnvironmentBuilder >> initialize [ super initialize. @@ -120,58 +118,58 @@ VMSimulatedEnvironmentBuilder >> initialize [ permSpaceSize := 0. ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> interpreter [ ^ interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> interpreterClass: aClass [ interpreterClass := aClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> memoryInitialAddress [ ^ initialAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> methodCacheSize [ ^ methodCacheSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> newSpaceSize [ ^ newSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> objectMemory [ ^ objectMemory ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> objectMemoryClass: aClass [ objectMemoryClass := aClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> oldSpaceSize [ ^ oldSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> permSpaceSize: anInteger [ permSpaceSize := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> primitiveTraceLogSize: anInteger [ primitiveTraceLogSize := anInteger ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ "Unicorn simulator requires mapped memory to be multiple of 4096" @@ -183,7 +181,7 @@ VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ ^ anInteger + (pageSize - remainder) ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ^ 4096. @@ -191,12 +189,12 @@ VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> stackSpaceSize [ ^ stackSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> wordSize: anInteger [ wordSize := anInteger ] diff --git a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st index 007b9984d9..f1c4a88d03 100644 --- a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimulationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests-Simulation', - #package : 'VMMakerTests', - #tag : 'Simulation' + #name : #VMSimulationTest, + #superclass : #TestCase, + #category : #'VMMakerTests-Simulation' } -{ #category : 'tests' } +{ #category : #tests } VMSimulationTest >> testSetUpJITSimulationReadsImage [ | options c | @@ -29,7 +27,7 @@ VMSimulationTest >> testSetUpJITSimulationReadsImage [ extraMemory: 100000. ] -{ #category : 'tests' } +{ #category : #tests } VMSimulationTest >> testSetUpNonJITSimulationReadsImage [ | options c | diff --git a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st index f09dcfb865..746c298210 100644 --- a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSistaSuperSendsTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSistaSuperSendsTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSistaSuperSendsTest >> jitOptions [ ^ super jitOptions @@ -14,7 +12,7 @@ VMSistaSuperSendsTest >> jitOptions [ yourself ] -{ #category : 'tests - sends/super' } +{ #category : #'tests - sends/super' } VMSistaSuperSendsTest >> testSuperSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector binding literalVariableIndex literalSelectorIndex startPC receiver expectedSelector | diff --git a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st index bcaf2eb03b..d5644e8ee9 100644 --- a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSistaTrampolineTest', - #superclass : 'VMTrampolineTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSistaTrampolineTest, + #superclass : #VMTrampolineTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSistaTrampolineTest >> jitOptions [ ^ super jitOptions @@ -14,7 +12,7 @@ VMSistaTrampolineTest >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMSistaTrampolineTest >> testSendTrampolineWithFourArguments [ | trampolineStart receiver | diff --git a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st index 45d181195e..f4a16ac4a2 100644 --- a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpecialSendArithmethicTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSpecialSendArithmethicTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpecialSendArithmethicTest class >> testParameters [ ^ super testParameters * { @@ -15,7 +13,7 @@ VMSpecialSendArithmethicTest class >> testParameters [ } ] -{ #category : 'running' } +{ #category : #running } VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop [ self assert: machineSimulator instructionPointerRegisterValue equals: sendTrampolineAddress. @@ -23,7 +21,7 @@ VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop self assert: machineSimulator arg0RegisterValue equals: argOop. ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTrampoline [ self @@ -33,7 +31,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTram shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoline [ self @@ -44,7 +42,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -54,7 +52,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCa shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCallsTrampoline [ self @@ -64,7 +62,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCalls shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsTrampoline [ self @@ -75,7 +73,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsT shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -85,7 +83,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSmallInteger [ self @@ -96,7 +94,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSm shouldPerformOperationReturning: expectedResult ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -106,7 +104,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgument shouldCallTrampolineWith: (memory integerObjectOf: value1) and: (memory integerObjectOf: value2) ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstReturnsSmallInteger [ self @@ -116,7 +114,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstRet shouldPerformOperationReturning: expectedResult. ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTrampoline [ self @@ -126,7 +124,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTra shouldCallTrampolineWith: (memory integerObjectOf: value2) and: memory trueObject ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -136,7 +134,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampo shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampoline [ self @@ -147,7 +145,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampol shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -158,7 +156,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentRet ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturnsSmallInteger [ self @@ -168,7 +166,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturn ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -179,7 +177,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturns ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampoline [ @@ -190,7 +188,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampo shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampoline [ self @@ -200,7 +198,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampolin ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline [ @@ -211,7 +209,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -222,7 +220,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentRetu shouldPerformOperationReturning: expectedResult ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturnsSmallInteger [ self @@ -233,7 +231,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturns ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -243,7 +241,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsS shouldPerformOperationReturning: expectedReflexiveResult ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampoline [ self @@ -254,7 +252,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampol shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline [ self @@ -264,7 +262,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ self @@ -274,7 +272,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ self @@ -283,7 +281,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ self @@ -293,7 +291,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampoline [ self @@ -303,7 +301,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampo shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampoline [ self @@ -312,7 +310,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampolin shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline [ self @@ -322,7 +320,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ self @@ -333,7 +331,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ self @@ -343,7 +341,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampoline [ self @@ -354,7 +352,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampol shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline [ self @@ -364,7 +362,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusTrueSelfCallsTrampoline [ self diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st new file mode 100644 index 0000000000..400872c055 --- /dev/null +++ b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st @@ -0,0 +1,361 @@ +Class { + #name : #VMSpurEphemeronsAlgorithmTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #instVars : [ + 'ephemeronObjectOopOne', + 'ephemeronObjectOopTwo', + 'nonEphemeronObjectOopOne', + 'nonEphemeronObjectOopTwo' + ], + #category : #'VMMakerTests-MemoryTests' +} + +{ #category : #helper } +VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ + + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopTwo +] + +{ #category : #helper } +VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ + "Force ephemerons to not be collected by putting them in special variables" + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo +] + +{ #category : #helper } +VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ + "In pharo Ephemerons have 3 slots" + + ^ self newOldSpaceObjectWithSlots: 3 + format: memory ephemeronFormat + classIndex: (memory ensureBehaviorHash: ourEphemeronClass) +] + +{ #category : #running } +VMSpurEphemeronsAlgorithmTest >> setUp [ + + super setUp. + memory initializeMournQueue. + self createEphemeronClass +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newZeroSizedObject. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. + nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newZeroSizedObject. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect ephemerons" + memory doScavenge: 1. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newZeroSizedObject. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect both non ephemeron objects" + memory flushNewSpace. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect ephemerons" + memory fullGC. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect ephemerons" + memory fullGC. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + +{ #category : #'tests - ephemerons with same key' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ + + ephemeronObjectOopOne := self newEphemeronObjectOldSpace. + ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. + nonEphemeronObjectOopOne := self newZeroSizedObject. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOopOne. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOopOne. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect ephemerons" + memory fullGC. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. + nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge:1 "Tenured by age". + memory fullGC. + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. + self assert: memory dequeueMourner equals: ephemeronObjectOopOne +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newObjectWithSlots: 1. + nonEphemeronObjectOopTwo := self newZeroSizedObject. + "Make object 1 reference object 2" + memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge: 1. "TenureByAge" + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopOne. + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo +] + +{ #category : #'tests - finalization - algorithm' } +VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoungInverse [ + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOopOne := self newZeroSizedObject. + nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. + "Make object 2 reference object 1" + memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. + + self addKeysToEphemerons. + self keepEphemeronsInVMVariables. + + "Collect both non ephemeron objects" + memory doScavenge: 1. "TenureByAge" + + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: memory dequeueMourner equals: ephemeronObjectOopOne. + self assert: memory dequeueMourner equals: ephemeronObjectOopTwo +] diff --git a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st index 6dc630f31b..1965e24efa 100644 --- a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMSpurInitializedOldSpaceTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurInitializedOldSpaceTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'testing' } +{ #category : #testing } VMSpurInitializedOldSpaceTest class >> isAbstract [ ^ self == VMSpurInitializedOldSpaceTest ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> assertFreeListEmpty: aFreeListOop [ self assert: aFreeListOop equals: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createEphemeronClass [ ourEphemeronClass := self createEphemeronClassForSlots: 3 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ | theNewClass formatWithSlots hash | @@ -40,7 +38,7 @@ VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ ^ theNewClass ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ | address | @@ -49,24 +47,24 @@ VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ ^ address ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> denyFreeListEmpty: aFreeListOop [ self deny: aFreeListOop equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurInitializedOldSpaceTest >> forgetObject3 [ memory coInterpreter profileMethod: memory nilObject ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeListForSize: allocationSize [ ^ memory freeLists at: allocationSize / memory allocationUnit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ "Initially the old space has a single big chunk of free memory and no small free chunks. @@ -79,7 +77,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ ^ memory freeLists at: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ "The free tree lists stores the oop of free tree nodes. @@ -90,7 +88,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ ^ memory startOfObject: self freeTreeRootOop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ^ memory @@ -98,7 +96,7 @@ VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ | class | @@ -109,14 +107,14 @@ VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" ^ self newOldEphemeronObjectWithSlots: 3 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ | class | @@ -127,7 +125,7 @@ VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -146,7 +144,7 @@ VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ ^ oop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ^ memory @@ -154,7 +152,7 @@ VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ^ memory @@ -162,7 +160,7 @@ VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ^ memory @@ -170,7 +168,7 @@ VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'running' } +{ #category : #running } VMSpurInitializedOldSpaceTest >> setUp [ super setUp. @@ -180,7 +178,7 @@ VMSpurInitializedOldSpaceTest >> setUp [ memory classByteArray: (self newClassInOldSpaceWithSlots: 0 instSpec: (memory byteFormatForNumBytes: 0)). ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> smallerNodeOf: aNode [ ^ memory diff --git a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st index a63471fcdc..8019a6749c 100644 --- a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSpurMemoryManagerTest', - #superclass : 'ParametrizedTestCase', + #name : #VMSpurMemoryManagerTest, + #superclass : #ParametrizedTestCase, #instVars : [ 'memory', 'interpreter', @@ -24,12 +24,10 @@ Class { 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> imageFormatParameters [ ^ { @@ -38,13 +36,13 @@ VMSpurMemoryManagerTest class >> imageFormatParameters [ } ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> testParameters [ ^ self wordSizeParameters * self imageFormatParameters ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -52,7 +50,7 @@ VMSpurMemoryManagerTest class >> wordSizeParameters [ yourself ] -{ #category : 'configuring' } +{ #category : #configuring } VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ environmentBuilder @@ -64,7 +62,7 @@ VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ primitiveTraceLogSize: self primitiveTraceLogSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createActiveProcess [ | processorOopAssociation processorOop processorListsArray priorities | @@ -86,7 +84,7 @@ VMSpurMemoryManagerTest >> createActiveProcess [ memory storePointer: ActiveProcessIndex ofObject: processorOop withValue: (self newArrayWithSlots: 4). ] -{ #category : 'initialization' } +{ #category : #initialization } VMSpurMemoryManagerTest >> createArrayClass [ | ourArrayClass | @@ -104,7 +102,7 @@ VMSpurMemoryManagerTest >> createArrayClass [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createEphemeronClass [ ourEphemeronClass := self newObjectWithSlots: 3. memory @@ -114,7 +112,7 @@ VMSpurMemoryManagerTest >> createEphemeronClass [ memory ensureBehaviorHash: ourEphemeronClass. ] -{ #category : 'utils' } +{ #category : #utils } VMSpurMemoryManagerTest >> createLargeIntegerClasses [ | classLargeInteger classLargeNegativeInteger | @@ -135,7 +133,7 @@ VMSpurMemoryManagerTest >> createLargeIntegerClasses [ withValue: classLargeNegativeInteger. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ | methodOop | @@ -145,7 +143,7 @@ VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ ^ methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> createWeakArrayClass [ ourWeakClass := self newObjectWithSlots: 3. memory @@ -156,43 +154,43 @@ VMSpurMemoryManagerTest >> createWeakArrayClass [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> emptyObjectSize [ "It is the header plus a word, padded to 8 bytes alignment" ^ self objectHeaderSize + "memory wordSize" 8 ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageReaderClass [ ^ imageReaderClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageReaderClass: anObject [ imageReaderClass := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageWriterClass [ ^ imageWriterClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> imageWriterClass: anObject [ imageWriterClass := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> initialCodeSize [ ^ 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializationOptions [ ^ { @@ -206,7 +204,7 @@ VMSpurMemoryManagerTest >> initializationOptions [ imageWriterClass name } ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ | ourArrayClass | @@ -228,7 +226,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ memory flushNewSpace. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ | freeListOop firstClassTablePage | @@ -292,7 +290,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ self deny: memory needGCFlag ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> initializeSpecialSelectors [ | specialSelectorsArrayOop | @@ -308,7 +306,7 @@ VMSpurMemoryManagerTest >> initializeSpecialSelectors [ memory splObj: SpecialSelectors put: specialSelectorsArrayOop ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMSpurMemoryManagerTest >> installFloat64RegisterClass [ | registerClass | @@ -327,7 +325,7 @@ VMSpurMemoryManagerTest >> installFloat64RegisterClass [ ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMSpurMemoryManagerTest >> installFloatClass [ | classFloat | @@ -343,52 +341,52 @@ VMSpurMemoryManagerTest >> installFloatClass [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" ] -{ #category : 'accessor' } +{ #category : #accessor } VMSpurMemoryManagerTest >> interpreter [ ^ interpreter ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> interpreterClass [ ^ StackInterpreterSimulatorLSB ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable1: anOop [ interpreter newMethod: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable2: anOop [ interpreter profileSemaphore: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable3: anOop [ interpreter profileMethod: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable1 [ ^ interpreter newMethod ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable2 [ ^ interpreter profileSemaphore ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable3 [ ^ interpreter profileMethod ] -{ #category : 'accessor' } +{ #category : #accessor } VMSpurMemoryManagerTest >> memory [ ^ memory ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> memoryClass [ ^ self wordSize = 4 @@ -396,13 +394,13 @@ VMSpurMemoryManagerTest >> memoryClass [ ifFalse: [ Spur64BitMemoryManager ] ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new16BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 2 format: memory firstShortFormat ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ | indexable | @@ -412,13 +410,13 @@ VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ ^ indexable ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new32BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 4 format: memory firstLongFormat ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ | indexable | @@ -428,31 +426,31 @@ VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ ^ indexable ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new64BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 8 format: memory sixtyFourBitIndexableFormat ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new8BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 1 format: memory firstByteFormat ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots [ ^ self newArrayWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: memory arrayFormat classIndex: anIndex ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSlot format: format [ | padding numberOfWordSizeSlots desiredByteSize | @@ -465,7 +463,7 @@ VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSl classIndex: self nextOrdinaryClassIndex ] -{ #category : 'asd' } +{ #category : #asd } VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ | oop | @@ -483,7 +481,7 @@ VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ ^ oop ] -{ #category : 'helpers - classes' } +{ #category : #'helpers - classes' } VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: format [ | newClass formatWithSlots | @@ -501,7 +499,7 @@ VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: ^ newClass ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -512,7 +510,7 @@ VMSpurMemoryManagerTest >> newEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arguments [ | method methodHeader | @@ -533,13 +531,13 @@ VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arg ^ method ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots [ ^ self newObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ | format | @@ -550,7 +548,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: format classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -562,7 +560,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: ^ oop ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -581,7 +579,7 @@ VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ ^ oop ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ ^ self @@ -589,13 +587,13 @@ VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots [ ^ self newOldSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -607,7 +605,7 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -619,13 +617,13 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat cla ^ oop ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentObjectWithSlots: slots [ ^ self newPermanentSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -639,7 +637,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: a classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -651,7 +649,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aForm ^ oop ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -697,7 +695,7 @@ VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newString: aString [ | vmString | @@ -716,7 +714,7 @@ VMSpurMemoryManagerTest >> newString: aString [ ^ vmString ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ ^ self @@ -725,7 +723,7 @@ VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ classIndex: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newZeroSizedObject [ ^ memory @@ -734,7 +732,7 @@ VMSpurMemoryManagerTest >> newZeroSizedObject [ classIndex: self zeroSizedObjectClassIndex. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ^ nextIndex @@ -742,18 +740,18 @@ VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ifNotNil: [ nextIndex := nextIndex + 1 ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> objectHeaderSize [ ^ memory baseHeaderSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> primitiveTraceLogSize [ ^ 0 ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ | aClass | aClass := self @@ -766,7 +764,7 @@ VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ withValue: aClass ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ | aClass | aClass := self @@ -779,7 +777,7 @@ VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ | class | @@ -803,7 +801,7 @@ VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUp [ super setUp. @@ -830,7 +828,7 @@ VMSpurMemoryManagerTest >> setUp [ memory lastHash: 1. ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUpScheduler [ "The ScheduleAssocation should be initialized to a valid Processor object" @@ -858,7 +856,7 @@ VMSpurMemoryManagerTest >> setUpScheduler [ memory memoryActiveProcess: activeProcessOop. ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUpUsingImage [ "/!\ Only runnable with a wordsize equals to your image's (needs disabling parametizing of wordsize) /!\" @@ -891,25 +889,25 @@ VMSpurMemoryManagerTest >> setUpUsingImage [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> sizeOfObjectWithSlots: slots [ ^ self objectHeaderSize + ((slots min: 1 "at least one for the forwarder pointer") * memory wordSize "bytes") ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> wordSize [ ^ wordSize ifNil: [ 8 ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> wordSize: aWordSize [ wordSize := aWordSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> zeroSizedObjectClassIndex [ ^ zeroSizedObjectClassIndex ifNil: [ self nextOrdinaryClassIndex ] diff --git a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st index 2617ab3f77..db41fee015 100644 --- a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurNewSpaceStructureTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurNewSpaceStructureTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> fillEden [ "Allocate enough objects to fill the eden." @@ -15,7 +13,7 @@ VMSpurNewSpaceStructureTest >> fillEden [ do: [ :index | self newZeroSizedObject ] ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject [ | freeStartBefore | @@ -26,7 +24,7 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAfterObject [ | freeStartBefore | @@ -37,38 +35,38 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAft self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenEndIsAtTheStartOfOldSpace [ self assert: memory scavenger eden limit equals: memory getMemoryMap newSpaceEnd ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenIsRestOfNewSpace [ self assert: memory scavenger eden size > (environmentBuilder newSpaceSize - memory scavenger pastSpace size - memory scavenger futureSpace size - interpreter interpreterAllocationReserveBytes) ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFreeStartIsEdenStart [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceEndIsAtTheStartOfEden [ self assert: memory scavenger futureSpace limit equals: memory scavenger eden start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger futureSpace size equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceStart [ "The future survivor start indicates during the execution of the scavenger, where the next free space in future space starts." @@ -76,13 +74,13 @@ VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceSt self assert: memory scavenger futureSurvivorStart equals: memory scavenger futureSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceEndIsAtTheStartOfFutureSpace [ self assert: memory scavenger pastSpace limit equals: memory scavenger futureSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart [ " - pastSpaceStart points to where the free space in the past space starts => it **does** move @@ -91,19 +89,19 @@ VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsAtTheStartOfNewSpace [ self assert: memory scavenger pastSpace start equals: memory getMemoryMap newSpaceStart ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger pastSpaceBytes equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ "Allocate enough objects to fill the eden." @@ -117,7 +115,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ self assert: error messageText equals: 'no room in eden for allocateNewSpaceSlots:format:classIndex:' ] ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ | futureSpaceStartBefore | @@ -127,7 +125,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ self assert: memory scavenger futureSurvivorStart equals: futureSpaceStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ | pastSpaceStartBefore | @@ -137,7 +135,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ self assert: memory pastSpaceStart equals: pastSpaceStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -148,7 +146,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ self assert: oop equals: freeStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -159,7 +157,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeade self assert: oop equals: freeStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testScavengeThresholdIsInsideTheEden [ self assert:(memory scavengeThreshold diff --git a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st index 04a758a911..9eb2876f3f 100644 --- a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurObjectAllocationTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurObjectAllocationTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ | oldFreeStart | @@ -16,7 +14,7 @@ VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ self assert: memory freeStart > oldFreeStart ] -{ #category : 'tests' } +{ #category : #tests } VMSpurObjectAllocationTest >> testAllocateObjectInOldSpaceMovesFreeStart [ | oldFreeStart | diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st index b86ff4e514..2e6576bb9a 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurOldSpaceBootstrapTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceBootstrapTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ | tableRoot | @@ -31,7 +29,7 @@ VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ equals: memory classTableRootSlots + memory hiddenRootSlots ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ | freeListOop | @@ -40,7 +38,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ self assert: (memory numSlotsOf: freeListOop) equals: memory numFreeLists ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ | freeListOop | @@ -49,7 +47,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ self assert: (memory formatOf: freeListOop) equals: memory wordIndexableFormat ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ | freeListOop | @@ -59,14 +57,14 @@ VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ self assert: (memory fetchPointer: i ofObject: freeListOop) equals: 0 ] ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid [ memory initializeFreeList. memory validFreeTree ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid2 [ memory initializeFreeList. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index 2aedf2f4cf..0830123f51 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -1,20 +1,18 @@ Class { - #name : 'VMSpurOldSpaceGarbageCollectorTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurOldSpaceGarbageCollectorTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'objectStackLimit' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'assertion' } +{ #category : #assertion } VMSpurOldSpaceGarbageCollectorTest >> assertHashOf: anOop equals: aHash [ self assert: (memory hashBitsOf: anOop) equals: aHash ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ | initialSpace lastObjectToBeRemembered sizeOfLastObject | "The planning compactor frees object by sliding, and therefore does not reclaim memory if there is only dead objects in the oldspace." @@ -35,34 +33,34 @@ VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ ^ initialSpace - sizeOfLastObject - memory totalFreeListBytes ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> initializationOptions [ ^ super initializationOptions , { #ObjStackPageSlots . objectStackLimit } ] -{ #category : 'testing' } +{ #category : #testing } VMSpurOldSpaceGarbageCollectorTest >> isValidFirstBridge [ ^ memory segmentManager isValidSegmentBridge: (memory segmentManager bridgeAt: 0) ] -{ #category : 'running' } +{ #category : #running } VMSpurOldSpaceGarbageCollectorTest >> runCaseManaged [ ^ self runCase ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> setUp [ objectStackLimit := 10. super setUp. ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpace [ | anObjectOop slotsNumber | @@ -73,7 +71,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: anObjectOop isNil ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpaceShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -84,7 +82,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: memory needGCFlag ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFreeChunk [ | chuckSize chunk next object free | @@ -119,7 +117,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFr self assert: (memory isFreeObject: free). ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ | anObjectOop slotsNumber | @@ -130,7 +128,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ self assert: anObjectOop isNotNil ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldBeZero [ | anObjectOop slotsNumber | @@ -141,7 +139,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldB self assert: memory totalFreeOldSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -152,7 +150,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldP self assert: memory needGCFlag ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollected [ | deltaFreeSpace | @@ -162,7 +160,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollec self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShouldBeCollected [ | deltaFreeSpace | @@ -175,7 +173,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShou self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPermObjectShouldBeKept [ | oldObjectSize deltaFreeSpace | @@ -188,7 +186,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPer self assert: deltaFreeSpace equals: oldObjectSize ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedCycleObjectShouldBeCollected [ | deltaFreeSpace | @@ -202,7 +200,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedC self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeKept [ | oldOop objectSize deltaFreeSpace | @@ -216,7 +214,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assert: deltaFreeSpace equals: objectSize ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeMoved [ | anObjectOop hash | @@ -235,7 +233,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assertHashOf: self keptObjectInVMVariable1 equals: hash ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantained [ | deltaFreeSpace arrayOfPerms objectsSize aPermObject anOldObject originalRememberedSetSize afteRememberedSetSize numberOfObjects originalNewRememberedSetSize afteNewRememberedSetSize | @@ -262,7 +260,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: deltaFreeSpace equals: objectsSize + (afteRememberedSetSize - originalRememberedSetSize) + (afteNewRememberedSetSize - originalNewRememberedSetSize) ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantainedWhenObjectsMoved [ | numberOfObjects originalHashes permArray anOldObject | @@ -285,7 +283,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: (originalHashes at: i) equals: (memory hashBitsOf: (memory fetchPointer: i - 1 ofObject: permArray))] ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ | ephemeron | @@ -307,7 +305,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ | ephemeron | @@ -337,7 +335,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ memory fullGC. @@ -348,7 +346,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ self deny: (memory isFreeObject: (memory freeListsObj)). ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ | obj1 obj2 obj3 arrFrom arrTo arrFrom2 arrTo2 | @@ -380,7 +378,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ self assert: (memory isRemembered: arrTo2). ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ | roots ephemeron1 ephemeron2 ephemeron3 key1 key2 key3 | @@ -443,7 +441,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -481,7 +479,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQue equals: numberJustOverLimit ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail [ | ephemeron1 key | @@ -499,39 +497,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] -{ #category : 'testCompactor' } -VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ - - | ephemeronObjectOopOne ephemeronObjectOopTwo nonEphemeronObjectOop | - "set up" - memory initializeMournQueue. - self createEphemeronClass. - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOop := self newOldSpaceObjectWithSlots: 0. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOop. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOop. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect non ephemeron object" - memory fullGC. - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ | freespace freespace2 slotsNumber anObjectOop | @@ -552,7 +518,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ self assert: freespace equals: memory totalFreeOldSpace. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ | roots keyObj ephemeronObj | @@ -571,7 +537,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ self assert: memory dequeueMourner equals: nil. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ | roots keyObj ephemeronObj keyObj2 ephemeronObj2 | @@ -598,7 +564,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ self assert: memory dequeueMourner equals: nil. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -636,7 +602,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ equals: numberJustOverLimit ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronAsKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -651,7 +617,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronA memory fullGC ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -665,7 +631,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemer memory fullGC ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -682,7 +648,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEph memory fullGC ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testPageLimitMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st index 11d8661998..33212d0b85 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMSpurOldSpaceStructureTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceStructureTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceShouldHaveOneSegment [ self assert: memory segmentManager numSegments equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSameSizeAsOldSpace [ self @@ -20,7 +18,7 @@ VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSam equals: memory oldSpaceSize ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSizeShouldBeAskedMemory [ self assert: memory oldSpaceSize equals: oldSpaceSize diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st index 131ffcdd73..b923eade30 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurOldSpaceTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ memory allocateOldSpaceChunkOfBytes: memory totalFreeListBytes. @@ -14,7 +12,7 @@ VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ self assert: memory totalFreeListBytes equals: 0 ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self createFreeChunkOfSize: 120. @@ -26,7 +24,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: 24) ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists [ self createFreeChunkOfSize: 120. @@ -38,7 +36,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists self assertFreeListEmpty: (self freeListForSize: 120) ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ | smallerAddress newAddress | @@ -51,7 +49,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ self assert: newAddress equals: smallerAddress ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self createFreeChunkOfSize: 120. @@ -63,7 +61,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self denyFreeListEmpty: (self freeListForSize: 160) ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ | someBytes freeBytesBefore | @@ -74,7 +72,7 @@ VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ self assert: memory totalFreeListBytes equals: freeBytesBefore - someBytes ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ | secondAddress newAddress | @@ -85,7 +83,7 @@ VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ self deny: newAddress equals: secondAddress ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self createFreeChunkOfSize: 160. @@ -97,7 +95,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self denyFreeListEmpty: (self freeListForSize: 200) ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ | secondAddress | @@ -108,7 +106,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ self assert: (self freeListForSize: 160) equals: 0 ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ | secondAddress newAddress | @@ -118,7 +116,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ self assert: newAddress equals: secondAddress ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ memory allocateOldSpaceChunkOfBytes: (memory bytesInObject: self freeTreeRootOop). @@ -126,7 +124,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ self assert: self freeTreeRootOop equals: 0 ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -137,7 +135,7 @@ VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ | size childAddress smallerChildOop largerChildOop aBitBiggerThanHalf | @@ -156,7 +154,7 @@ VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ self assert: (memory bytesInObject: largerChildOop) equals: aBitBiggerThanHalf ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ | freeRootOopBeforeAllocation | @@ -167,7 +165,7 @@ VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ self deny: freeRootOopBeforeAllocation equals: self freeTreeRootOop ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ "Allocation should be contiguous because we have a single big chunk of memory to take memory from" @@ -178,7 +176,7 @@ VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ | address | @@ -187,7 +185,7 @@ VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ self assert: address isNil ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRoot [ | leftOverSize | @@ -197,7 +195,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRo self assert: (memory bytesInObject: self freeTreeRootOop) equals: leftOverSize ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList [ | leftOverSize | @@ -207,7 +205,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -220,7 +218,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ | sizeToAllocate powerOfSizeToAllocate leftOverSize | @@ -233,7 +231,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ | sizeToAllocate powerOfSizeToAllocate nonMultipleAddress newAddress | @@ -255,7 +253,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ self deny: newAddress equals: nonMultipleAddress. ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ | sizeToAllocate powerOfSizeToAllocate | @@ -267,7 +265,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ self assertFreeListEmpty: (self freeListForSize: powerOfSizeToAllocate) ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ | sizeToAllocate freeMultipleAddress newAddress powerOfSizeToAllocate | @@ -279,7 +277,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ self assert: newAddress equals: freeMultipleAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ | secondAddress newAddress | @@ -290,7 +288,7 @@ VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ self assert: newAddress equals: secondAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ | secondAddress thirdAddress | @@ -301,7 +299,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ self assert: secondAddress < thirdAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ | freeChunkStartAddress allocatedSize | @@ -313,7 +311,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ equals: freeChunkStartAddress + allocatedSize ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted [ | freeChunkStartAddressBeforeAllocation allocatedAddress | @@ -324,7 +322,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted equals: freeChunkStartAddressBeforeAllocation ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ | firstAddress byteSize smallerNodeOop | @@ -337,7 +335,7 @@ VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ self assert: smallerNodeOop equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian [ | newAddress freeLargeSpaceAddressBeforeAllocation freeAddress | @@ -351,7 +349,7 @@ VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian self assert: newAddress equals: freeLargeSpaceAddressBeforeAllocation ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ | smallerChild freeTreeRoot parentNode | @@ -364,7 +362,7 @@ VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ self assert: parentNode equals: freeTreeRoot ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ | freeTreeRoot size child1 child2 nextChildOop child3 siblingOop previousOop | @@ -391,7 +389,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ self assert: previousOop equals: nextChildOop. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ | freeTreeRoot size child1 child2 nextChildOop child3 largerOop largerThanSmaller siblingOop | @@ -423,7 +421,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ self assert: largerOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ | freeTreeRoot size child1 child2 nextChild child3 parentOop | @@ -450,7 +448,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ self assert: parentOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ | freeTreeRoot size child1 child2 nextChildOop child3 smallerOop smallerThanSmaller siblingOop | @@ -482,7 +480,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ self assert: smallerOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ | freeRoot address | @@ -494,7 +492,7 @@ VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ self assert: freeRoot equals: (memory freeLists at: 0) ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead [ | smallerChild freeTreeRoot size child1 child2 nextChild child3 | @@ -516,7 +514,7 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead self assert: nextChild equals: child2. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ | smallerChild freeTreeRoot size child1 child2 nextChild | @@ -534,13 +532,13 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ self assert: nextChild equals: child2. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testFalseObjectIsNotAnArray [ self deny: (memory isArray: memory falseObject). ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ | firstAddress secondAddress freeListHead chunkSize | chunkSize := 32. @@ -554,7 +552,7 @@ VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ self assert: freeListHead equals: secondAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ | secondAddress | @@ -564,7 +562,7 @@ VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ self assert: memory allFreeObjects size equals: 2 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize | allocationSize := 32. @@ -580,7 +578,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ self assert: nextFreeChunk equals: firstAddress ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize previousFreeChunk | allocationSize := 32. @@ -597,7 +595,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ self assert: previousFreeChunk equals: freeListHead ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChunks [ | secondAddress newAddress | @@ -609,7 +607,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChu self assert: memory allFreeObjects size equals: 3 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ | secondAddress allocationSize firstAddress | allocationSize := 32. @@ -622,7 +620,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ self assert: memory allFreeListHeads size equals: 1 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ | firstAddress freeListHead | @@ -638,7 +636,7 @@ VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ ] ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ 2 to: memory numFreeLists - 1 do: [ :numberOfSlots | @@ -648,7 +646,7 @@ VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ ] ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ | bigChunk nextNode | @@ -658,7 +656,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ | bigChunk nextNode | @@ -668,7 +666,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ | bigChunk nextNode | @@ -678,7 +676,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ | bigChunk nextNode | @@ -688,7 +686,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ | bigChunk nextNode | @@ -698,13 +696,13 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootIsFreeObject [ self assert: (memory isFreeObject: self freeTreeRootOop) ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ self @@ -712,7 +710,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ equals: memory totalFreeListBytes ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ | firstAddress byteSize smallerNodeOop | @@ -725,7 +723,7 @@ VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ self assert: (memory startOfObject: smallerNodeOop) equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop | @@ -746,7 +744,7 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ self assert: (memory startOfObject: largerChildOop) equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop parentNodeOop | @@ -768,13 +766,13 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ self assert: parentNodeOop equals: newRoot ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testNewMemoryShouldHaveSingleFreeObject [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ | oop | @@ -783,19 +781,19 @@ VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ self assert: (memory getMemoryMap isOldObject: oop) ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectIsNotAnArray [ self deny: (memory isArray: memory nilObject). ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectObjectFormatIsZero [ self assert: (memory formatOf: memory nilObject) equals: 0. ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFreeList [ | secondAddress freeChunksBefore | @@ -808,7 +806,7 @@ VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFr self assert: memory allFreeObjects size equals: freeChunksBefore. ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ | secondAddress | @@ -819,7 +817,7 @@ VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -831,7 +829,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ self assert: (self nextNodeOf: freeListHead) equals: 0 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -843,7 +841,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ self assert: (self previousNodeOf: freeListHead) equals: 0 ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ | smallerChild freeTreeRoot parentNode smallerSize rootSize | @@ -860,7 +858,7 @@ VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ self assert: parentNode equals: freeTreeRoot ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testTrueObjectIsNotAnArray [ self deny: (memory isArray: memory trueObject). diff --git a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st index dd5b734300..674b31f591 100644 --- a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurRememberedSetTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurRememberedSetTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests - from old to new' } +{ #category : #'tests - from old to new' } VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ | oldObjectAddress rememberedObjectAddress | @@ -24,7 +22,7 @@ VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ ] -{ #category : 'tests - from old to perm' } +{ #category : #'tests - from old to perm' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNewRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -42,7 +40,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNew ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress referencedOldObjectAddress | @@ -65,7 +63,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberP ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOldRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -84,7 +82,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOld ] -{ #category : 'tests - from perm to new' } +{ #category : #'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRememberedToo [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -101,7 +99,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRemembered ] -{ #category : 'tests - from perm to new' } +{ #category : #'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRememberedSet [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -119,7 +117,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRem ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ | oldObjectAddress | @@ -128,7 +126,7 @@ VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ | oldObjectRootAddress originalLimit youngObjectAddress | @@ -158,7 +156,7 @@ VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ self assert: memory getFromOldSpaceRememberedSet rememberedSetLimit equals: originalLimit * 2 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone [ | oldObjectAddress storedOldObjectAddress | @@ -172,7 +170,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: storedOldObjectAddress). ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress | @@ -188,7 +186,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObjec self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyone [ | oldObjectAddress youngObjectAddress | @@ -202,7 +200,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyon self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests - from old to perm' } +{ #category : #'tests - from old to perm' } VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone [ | permObjectAddress oldObjectAddress | @@ -216,7 +214,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests - from perm to perm' } +{ #category : #'tests - from perm to perm' } VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyone [ | permObjectAddress referencedPermObjectAddress | @@ -230,7 +228,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyon self deny: (memory isRemembered: referencedPermObjectAddress). ] -{ #category : 'tests - from new to perm' } +{ #category : #'tests - from new to perm' } VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyone [ | permObjectAddress youngObjectAddress | @@ -244,7 +242,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyo self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress youngObjectAddress | @@ -269,7 +267,7 @@ VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberP ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObject [ | oldObjectAddress youngObjectAddress | @@ -283,7 +281,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObjec self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObject [ | permObjectAddress youngObjectAddress | @@ -297,7 +295,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObj self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAnyone [ | youngObjectAddress storedYoungObjectAddress | @@ -311,7 +309,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAny self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testYoungObjectIsNotRemembered [ | newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st index 634ab1b369..665359f03f 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurScavengeEphemeronTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengeEphemeronTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'initialization' } +{ #category : #initialization } VMSpurScavengeEphemeronTest >> setUp [ super setUp. @@ -14,7 +12,7 @@ VMSpurScavengeEphemeronTest >> setUp [ self createEphemeronClass ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmptyMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -34,7 +32,7 @@ VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmpty self assert: memory dequeueMourner equals: nil ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ | numberOfEphemerons ephemeronKey | @@ -70,7 +68,7 @@ VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ withValue: memory nilObject ] ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeronClass [ | ephemeronObjectOop | @@ -81,7 +79,7 @@ VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeron equals: ourEphemeronClass ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -104,7 +102,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalO equals: memory nonIndexablePointerFormat ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -125,7 +123,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -152,7 +150,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -181,7 +179,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSu equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -202,7 +200,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAft equals: memory nonIndexablePointerFormat ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -221,7 +219,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -243,7 +241,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -267,7 +265,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorSho equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInEden [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -298,7 +296,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInPastSpace [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -340,7 +338,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlyOneEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -372,7 +370,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: nil ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlySecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -402,7 +400,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldBeQueuedAfterConsumingMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -440,7 +438,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldLeaveFirstOneAsEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -470,7 +468,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: (memory isEphemeron: ephemeronObjectOop) ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldScavengeKeyOfSecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -502,7 +500,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi equals: (memory remapObj: nonEphemeronObjectOop) ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeZeroSizedEphemeronShouldTreatItAsNormalObject [ | ephemeronObjectOop zeroSizedEphemeronClass hashBefore addressBefore | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st index 56c08746b3..ae428a6af8 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurScavengeWeakTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengeWeakTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'test-format' } +{ #category : #'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ | weakObjectOop | @@ -16,7 +14,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ self assert: (memory fetchClassOfNonImm: weakObjectOop) equals: ourWeakClass ] -{ #category : 'test-format' } +{ #category : #'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ | weakObjectOop classIndex | @@ -28,7 +26,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ self assert: classIndex equals: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash nilHash | @@ -52,7 +50,7 @@ VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldB equals: nilHash ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nilHash | @@ -72,7 +70,7 @@ VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNi equals: nilHash ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingSurvivorShouldLeaveWeakObjectAsIs [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st index 08ac1152d9..94f56ee281 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st @@ -1,19 +1,17 @@ Class { - #name : 'VMSpurScavengerTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengerTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'asserting' } +{ #category : #asserting } VMSpurScavengerTest >> assertPastSpaceIsEmpty [ self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurScavengerTest >> fullNewSpace [ | rootObjectAddress referencedObjectAddress freeStartAtBeginning | @@ -39,7 +37,7 @@ VMSpurScavengerTest >> fullNewSpace [ self error: 'New space is not full!' ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop receiver: aReceiverOop args: argsOops andStack: stackOops [ | page pointer | @@ -87,7 +85,7 @@ VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop withValue: (memory coInterpreter withSmallIntegerTags: page baseFP) ] ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScavenge [ | times | @@ -99,7 +97,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScaveng self deny: memory needGCFlag ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ | times anObjectOop | @@ -110,7 +108,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ self assert: (memory getMemoryMap isYoungObject: anObjectOop) ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ | times anObject | @@ -128,7 +126,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ self assert: (memory getMemoryMap isOldObject: anObject) ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge [ | times | @@ -146,7 +144,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge self assert: memory needGCFlag ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -167,7 +165,7 @@ VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ | rootObjectAddress | @@ -183,7 +181,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0 "Past space keep not full -> Not tenure next pass" ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ | rootObjectAddress | @@ -198,7 +196,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0.1 "Past space is full -> Tenure next pass" ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -221,7 +219,7 @@ VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -240,7 +238,7 @@ VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -259,7 +257,7 @@ VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -278,7 +276,7 @@ VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -297,7 +295,7 @@ VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -316,7 +314,7 @@ VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -338,7 +336,7 @@ VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ | rootObjectAddress newRootObjectAddress referencedObjectAddress referencedObjectHash | @@ -361,7 +359,7 @@ VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ equals: referencedObjectHash ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -381,7 +379,7 @@ VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress maybeMappedReferenceToYoungObject | @@ -401,7 +399,7 @@ VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterS self assert: maybeMappedReferenceToYoungObject equals: newRememberedObjectAddress ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferencedObjectIsInTheOldSpace [ | permObjectAddress youngObject otherOldObjectAddress | @@ -428,7 +426,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferenced ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceWhenMutatedToPointAPermObject [ | permObjectAddress youngObject otherPermObjectAddress | @@ -452,7 +450,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceW ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -472,7 +470,7 @@ VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ | rootObjectAddress rootObjectHash newRootObjectAddress referencedObjectAddress referencedObjectHash newReferencedObjectAddress | @@ -495,7 +493,7 @@ VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ self assert: (memory hashBitsOf: newReferencedObjectAddress) equals: referencedObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ | youngObjectAddress oneOldObjectAddress otherOldObjectAddress | @@ -520,7 +518,7 @@ VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces [ | oldPastSpaceStart oldFutureSpaceStart | @@ -533,7 +531,7 @@ VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces self assert: memory scavenger futureSpace start equals: oldPastSpaceStart. ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ "Nil should survive." "A new object not referenced should not survive." @@ -544,7 +542,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPastSpace [ "Only Nil should survive." @@ -556,7 +554,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPast self assertPastSpaceIsEmpty ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -581,7 +579,7 @@ VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBefo self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -606,7 +604,7 @@ VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInS self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -623,7 +621,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVar self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -640,7 +638,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObject self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ "Nil should survive. It is referenced by the roots because many of their slots are nilled." @@ -649,7 +647,7 @@ VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ memory doScavenge: 1 "TenureByAge". @@ -657,7 +655,7 @@ VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAndForth [ | oldPastSpaceStart oldFutureSpaceStart | @@ -670,7 +668,7 @@ VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAnd self assert: memory scavenger futureSpace start equals: oldFutureSpaceStart. ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder [ | rootObjectAddress objectThatShouldGoSecond objectThatShouldGoFirst | @@ -688,7 +686,7 @@ VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder self assert: (memory remapObj: objectThatShouldGoFirst) < (memory remapObj: objectThatShouldGoSecond) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects [ | firstRootObjectAddress nonRootObjectAddress secondRootObjectAddress | @@ -706,7 +704,7 @@ VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects self assert: (memory remapObj: secondRootObjectAddress) < (memory remapObj: nonRootObjectAddress) ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ | firstObjectAddress secondObjectAddress | @@ -738,7 +736,7 @@ VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ | rootObjectAddress newRootObjectAddress | @@ -762,7 +760,7 @@ VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ self assert: (memory isInOldSpace: newRootObjectAddress) ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ | objectA objectB | objectA := self newObjectWithSlots: 1. @@ -781,7 +779,7 @@ VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ | unreferencedRootObjectAddress referencedObjectAddress | unreferencedRootObjectAddress := self newObjectWithSlots: 1. @@ -796,7 +794,7 @@ VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -814,7 +812,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanve self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurviveScanvenge [ | permObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -832,7 +830,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurvive self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testYoungObjectsFromPermanentSpaceAreRemapped [ | newObjectOop newObjectHash permObject newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st index 6c7bc93c59..3b597fa124 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMSpurTreeAllocationStrategyForLargeTreeTest', - #superclass : 'VMSpurTreeAllocationStrategyForSmallTreeTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurTreeAllocationStrategyForLargeTreeTest, + #superclass : #VMSpurTreeAllocationStrategyForSmallTreeTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ " 1120 @@ -54,7 +52,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -62,7 +60,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWit self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -70,7 +68,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -78,7 +76,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWithChildrenShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -86,7 +84,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWit self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -94,7 +92,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTree self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -104,7 +102,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTree self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -112,7 +110,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTree self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -120,7 +118,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeN self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -130,7 +128,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeN self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -138,7 +136,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeN self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -146,7 +144,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSm self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -156,7 +154,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSm self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -164,7 +162,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSm self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -172,7 +170,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSma self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -181,7 +179,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSma self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSmallerLeafTreeNodeShouldShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -189,7 +187,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSma self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -197,7 +195,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLa self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -207,7 +205,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLa self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -215,7 +213,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLa self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. @@ -223,7 +221,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLar self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -233,7 +231,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLar self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test37AllocateBestFitLargerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st index 4340d04dd7..8fe74cb50a 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMSpurTreeAllocationStrategyForSmallTreeTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurTreeAllocationStrategyForSmallTreeTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationStrategyForSmallTreeTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUp [ super setUp. self setUpTree. ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ " 560 @@ -63,13 +61,13 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationStrategyForSmallTreeTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -77,7 +75,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithC self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 8. @@ -86,7 +84,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliput self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -94,7 +92,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -105,7 +103,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1152 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -113,7 +111,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRootAddress [ | desiredAddress allocatedAddress | @@ -123,7 +121,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2). @@ -131,7 +129,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNo self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseLargestSmallerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 8. @@ -140,7 +138,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -150,7 +148,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNo self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -161,7 +159,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1088 - allocatedSize) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3). @@ -169,7 +167,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNod self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseSmallerThanRootAddress [ | desiredAddress allocatedAddress | @@ -179,7 +177,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -189,7 +187,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNod self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldUseIntermediateNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -199,7 +197,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4). @@ -207,7 +205,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmal self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | allocatedSize := (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -217,7 +215,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1056 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -227,7 +225,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmal self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldUseRootNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 8. @@ -237,7 +235,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanL self assert: (memory bytesInObject: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 3) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5). @@ -245,7 +243,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmall self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -256,7 +254,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanL self denyFreeListEmpty: (self freeListForSize: 1120 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -265,7 +263,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmall self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldUseLargestLeafNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 8. @@ -274,7 +272,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6). @@ -282,7 +280,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLarg self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -294,7 +292,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1216 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -304,7 +302,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLarg self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldUseIntermediateLargerNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 8. @@ -313,7 +311,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7). @@ -321,7 +319,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLarge self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -333,7 +331,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1184 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -343,7 +341,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLarge self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateSmallerThanLiliputianDiffFromLargestLeaShouldFindNoMemory [ self assert: (memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 8) equals: nil diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st index 09933d96de..de185856c6 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMSpurTreeAllocationWithBigNodesTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurTreeAllocationWithBigNodesTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationWithBigNodesTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationWithBigNodesTest >> setUp [ " Allocate a tree that has a large child large enough so a remainder could still be larger than the root @@ -47,13 +45,13 @@ VMSpurTreeAllocationWithBigNodesTest >> setUp [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationWithBigNodesTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: 16. @@ -62,7 +60,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShould self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: 1008 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShouldBeInsertedInLarger [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) + 16. @@ -71,7 +69,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShou self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: 4080 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test03LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) * 2 + 16. diff --git a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st index bd476b58e7..03868c02d3 100644 --- a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st @@ -27,25 +27,23 @@ Types are not the exact types used. " Class { - #name : 'VMStackBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMStackBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'page', 'frames', 'args', 'methodBuilder' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'frames' } +{ #category : #frames } VMStackBuilder >> addFrame: aFrame [ frames add: aFrame ] -{ #category : 'frames' } +{ #category : #frames } VMStackBuilder >> addNewFrame [ | frame | "'add' a new frame in the sense of an OrderedCollection, which will be iterated with #do: @@ -55,17 +53,17 @@ VMStackBuilder >> addNewFrame [ ^ frame "the frame is then configured by the caller" ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> args [ ^ args ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> args: anObject [ args := anObject ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> buildStack [ self createStackPage. self preparePage. @@ -74,7 +72,7 @@ VMStackBuilder >> buildStack [ ^ frames last ] -{ #category : 'stack' } +{ #category : #stack } VMStackBuilder >> createStackPage [ | sp | frames ifEmpty:[ self error ]. @@ -85,17 +83,17 @@ VMStackBuilder >> createStackPage [ interpreter stackPointer: sp. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> frames [ ^ frames ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> frames: anObject [ frames := anObject ] -{ #category : 'initialization' } +{ #category : #initialization } VMStackBuilder >> initialize [ super initialize. frames := OrderedCollection new. "will be treated in reverse" @@ -105,35 +103,35 @@ VMStackBuilder >> initialize [ page := nil. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> lastFrame [ ^ frames last ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> methodBuilder [ ^ methodBuilder ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> methodBuilder: anObject [ methodBuilder := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> page [ ^ page ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> page: anObject [ page := anObject ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> preparePage [ "Page setup before the base frame" interpreter push: memory nilObject. "receiver" @@ -144,7 +142,7 @@ VMStackBuilder >> preparePage [ ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushAllButFirstFrames [ 2 to: frames size do: [ :anIndex | | aFrame | aFrame := frames at: anIndex. @@ -158,19 +156,19 @@ VMStackBuilder >> pushAllButFirstFrames [ ] ] -{ #category : 'initialization' } +{ #category : #initialization } VMStackBuilder >> pushArgs [ args do: [ :anArg | interpreter push: anArg ] ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushBaseFrame [ frames first previousFrameArgsSize: args size. self pushFrame: frames first. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushFrame: aFrame [ interpreter framePointer: interpreter stackPointer. @@ -180,18 +178,18 @@ VMStackBuilder >> pushFrame: aFrame [ page headSP: interpreter stackPointer. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushFrames [ self pushBaseFrame. self pushAllButFirstFrames. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMStackBuilder >> reset [ self initialize. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> setInterpreterVariables [ | lastFrame | interpreter setStackPageAndLimit: page. @@ -206,7 +204,7 @@ VMStackBuilder >> setInterpreterVariables [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> topFrame [ ^ frames last ] diff --git a/smalltalksrc/VMMakerTests/VMStackFrame.class.st b/smalltalksrc/VMMakerTests/VMStackFrame.class.st index 81b9be1e5e..ec06607f85 100644 --- a/smalltalksrc/VMMakerTests/VMStackFrame.class.st +++ b/smalltalksrc/VMMakerTests/VMStackFrame.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMStackFrame', - #superclass : 'Object', + #name : #VMStackFrame, + #superclass : #Object, #instVars : [ 'framePointer', 'interpreter' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^self new framePointer: anInteger; @@ -21,19 +19,19 @@ VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpre yourself ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMStackFrame class >> virtualMachine: aVirtualMachine fp: anInteger [ ^ self newFramePointer: anInteger withInterpreter: aVirtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> bytecodeMethod [ ^ VMBytecodeMethod newOnInterpreter: interpreter methodOop: self method ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> caller [ | callerContext | @@ -67,41 +65,41 @@ VMStackFrame >> caller [ ^ VMContext newOnContext: callerContext withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> callerContext [ ^ interpreter frameCallerContext: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> callerFP [ ^ interpreter frameCallerFP: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> context [ ^VMContext newOnContext: (interpreter frameContext: framePointer) withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> description [ | selector | selector := interpreter findSelectorOfMethod: self methodOop. ^ interpreter stringOf: selector ] -{ #category : 'accesing' } +{ #category : #accesing } VMStackFrame >> framePointer: anInteger [ framePointer := anInteger ] -{ #category : 'testing' } +{ #category : #testing } VMStackFrame >> hasContext [ ^interpreter frameHasContext: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> instructionPointer [ ^ interpreter framePointer = framePointer @@ -109,50 +107,50 @@ VMStackFrame >> instructionPointer [ ifFalse: [ interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : 'acccessing' } +{ #category : #acccessing } VMStackFrame >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : 'testing' } +{ #category : #testing } VMStackFrame >> isMachineCodeFrame [ ^ interpreter isMachineCodeFrame: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> machineCodeMethod [ | methodSurrogate | methodSurrogate := interpreter cogMethodZone methodFor: self method. ^ VMMachineCodeMethod newOnInterpreter: interpreter cogMethodSurrogate: methodSurrogate ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> method [ ^ interpreter iframeMethod: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> methodOop [ ^ interpreter frameMethodObject: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> receiver [ ^ interpreter framePointer = framePointer ifTrue: [ interpreter receiver ] ifFalse: [ self halt. interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> sender [ ^ VMStackFrame newFramePointer:(interpreter frameCallerFP: framePointer) withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> sourceCode [ ^ self isMachineCodeFrame @@ -160,7 +158,7 @@ VMStackFrame >> sourceCode [ ifFalse: [ self bytecodeMethod disassemble ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> stack [ | stack currentFrame | stack := OrderedCollection new. @@ -171,7 +169,7 @@ VMStackFrame >> stack [ ^ stack ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> stackPage [ ^interpreter stackPages stackPageFor: framePointer. ] diff --git a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st index 2e9960b95e..4a73d7c65e 100644 --- a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st @@ -1,34 +1,32 @@ Class { - #name : 'VMStackInterpreterTest', - #superclass : 'TestCase', + #name : #VMStackInterpreterTest, + #superclass : #TestCase, #instVars : [ 'stackInterpreterClass' ], - #category : 'VMMakerTests-StackInterpreter', - #package : 'VMMakerTests', - #tag : 'StackInterpreter' + #category : #'VMMakerTests-StackInterpreter' } -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> setUp [ super setUp. stackInterpreterClass := StackInterpreter. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackInterpreterTest >> stackInterpreterClass [ ^ stackInterpreterClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackInterpreterTest >> stackInterpreterClass: anObject [ stackInterpreterClass := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> testIsObjectAccessor [ self @@ -37,7 +35,7 @@ VMStackInterpreterTest >> testIsObjectAccessor [ assert: (self stackInterpreterClass isObjectAccessor: #fetchClassOf:) ] -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> testIsStackAccessor [ self diff --git a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st index c643d5e0b8..e36709438e 100644 --- a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMStackMappingTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMStackMappingTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMStackMappingTest >> buildStackFromFrames [ 3 timesRepeat: [ @@ -19,7 +17,7 @@ VMStackMappingTest >> buildStackFromFrames [ stackBuilder buildStack ] -{ #category : 'helpers' } +{ #category : #helpers } VMStackMappingTest >> newContext [ | method | @@ -32,13 +30,13 @@ VMStackMappingTest >> newContext [ ip: 10 ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testCreatingNewContextByHandShouldbeSingle [ self assert: (interpreter isSingleContext: self newContext) ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ | context fp | context := self newContext. @@ -48,7 +46,7 @@ VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ self assert: (interpreter isSingleContext: context) ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testDivorceFramesInPage [ | page | self buildStackFromFrames. @@ -69,7 +67,7 @@ VMStackMappingTest >> testDivorceFramesInPage [ ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testMarryNewContextIsMarried [ | context | context := self newContext. @@ -77,7 +75,7 @@ VMStackMappingTest >> testMarryNewContextIsMarried [ self assert: (interpreter isStillMarriedContext: context) ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ | aContext framePointerToMarry stackPointerToMarry oldPage | self buildStackFromFrames. @@ -91,7 +89,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ self assert: oldPage isFree ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext | self buildStackFromFrames. @@ -105,7 +103,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSen self assert: expectedDivorcedContext equals: aContext. ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry oldPage newPage | self buildStackFromFrames. @@ -119,7 +117,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ self deny: oldPage equals: newPage ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -131,7 +129,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext oldBaseFramePointer callerContext | self buildStackFromFrames. @@ -151,7 +149,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsS ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -165,7 +163,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ self assert: initialiNumberOfusedPages + 1 equals: newNumberOfUsedPages ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -177,7 +175,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ | aContext initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -189,7 +187,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ self assert: initialiNumberOfusedPages equals: newNumberOfUsedPages ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryTopFrame [ | aContext | self buildStackFromFrames. diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st index fd296015d6..076488f560 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMStackToRegisterMappingCogitTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMStackToRegisterMappingCogitTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'methodReceiver', 'receiverOperationBlock', @@ -15,23 +15,21 @@ Class { 'expectedResult', 'expectedReflexiveResult' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> argumentOperation: aFullBlockClosure [ argumentOperation := aFullBlockClosure ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> arguments: aCollection [ arguments := aCollection ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> buildStackFrame [ "Let's prepare the trampoline in case of non-optimized path" self createSpecialSelectorArray. @@ -51,7 +49,7 @@ VMStackToRegisterMappingCogitTest >> buildStackFrame [ ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> compileMethod [ codeAddress := self compile: [ @@ -63,54 +61,54 @@ VMStackToRegisterMappingCogitTest >> compileMethod [ cogit genReturnTopFromMethod ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult [ ^ expectedReflexiveResult ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult: anObject [ expectedReflexiveResult := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedResult [ ^ expectedResult ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedResult: anObject [ expectedResult := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingCogitTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> methodReceiver: anOop [ methodReceiver := anOop ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> receiverOperation: aFullBlockClosure [ receiverOperationBlock := aFullBlockClosure ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> sendBytecode [ ^ sendBytecode ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> sendBytecode: anObject [ sendBytecode := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingCogitTest >> setUp [ super setUp. @@ -118,7 +116,7 @@ VMStackToRegisterMappingCogitTest >> setUp [ arguments := #(). ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperation and: argumentOfOperation [ self buildStackFrame. @@ -128,7 +126,7 @@ VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperati self assertSpecialSendTo: receiverOfOperation value withArg: argumentOfOperation value ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self buildStackFrame. @@ -138,22 +136,22 @@ VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: aValue). ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value1 [ ^ value1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value1: anObject [ value1 := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value2 [ ^ value2 ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value2: anObject [ value2 := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st index f67ef4a755..1033cc50ad 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMStackToRegisterMappingTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMStackToRegisterMappingTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingTest >> setUp [ super setUp. @@ -31,7 +29,7 @@ VMStackToRegisterMappingTest >> setUp [ cogit needsFrame: true ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testFlushBelowTop [ | stop stackPointerBefore framePointer | @@ -59,7 +57,7 @@ VMStackToRegisterMappingTest >> testFlushBelowTop [ self assert: self popAddress equals: (memory integerObjectOf: 17) ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopConstant [ cogit ssPushConstant: 1. @@ -69,7 +67,7 @@ VMStackToRegisterMappingTest >> testPopConstant [ self assert: cogit ssTop equals: cogit simSelf. ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -96,7 +94,7 @@ VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopRegister [ cogit ssPushRegister: TempReg. @@ -106,7 +104,7 @@ VMStackToRegisterMappingTest >> testPopRegister [ self assert: cogit ssTop equals: cogit simSelf ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ | stop stackPointerBefore framePointer | @@ -132,7 +130,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ self assert: self machineSimulator smalltalkStackPointerRegisterValue equals: stackPointerBefore ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPopFromStack [ | stop stackPointerBefore framePointer | @@ -159,7 +157,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPop self assert: self popAddress equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -186,7 +184,7 @@ VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPushConstant [ cogit ssPushConstant: 1. @@ -197,7 +195,7 @@ VMStackToRegisterMappingTest >> testPushConstant [ self deny: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPushRegister [ cogit ssPushRegister: TempReg. @@ -208,7 +206,7 @@ VMStackToRegisterMappingTest >> testPushRegister [ self deny: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testSpillConstant [ cogit ssPushConstant: 1. @@ -225,7 +223,7 @@ VMStackToRegisterMappingTest >> testSpillConstant [ self assert: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testSpillRegister [ cogit ssPushRegister: TempReg. @@ -244,7 +242,7 @@ VMStackToRegisterMappingTest >> testSpillRegister [ self assert: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testTopOfEmptyIsSimSelf [ self assert: cogit ssSize equals: 1. diff --git a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st index e1964ec1c5..267fd1873e 100644 --- a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st @@ -1,15 +1,14 @@ Class { - #name : 'VMTestMockInterpreter', - #superclass : 'StackInterpreterSimulatorLSB', + #name : #VMTestMockInterpreter, + #superclass : #StackInterpreterSimulatorLSB, #instVars : [ 'interpreteBlock', 'allocatedElements' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'memory testing' } +{ #category : #'memory testing' } VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ | allocated | @@ -20,43 +19,43 @@ VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ ^ allocated ] -{ #category : 'memory testing' } +{ #category : #'memory testing' } VMTestMockInterpreter >> allocatedElements [ ^ allocatedElements ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> basicInitialize [ super basicInitialize. allocatedElements := Set new ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> enterSmalltalkExecutiveImplementation [ interpreteBlock value ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> free: aPointer [ allocatedElements remove: aPointer. ^ super free: aPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> interpreteBlock [ ^ interpreteBlock ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> interpreteBlock: anObject [ interpreteBlock := anObject ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> malloc: aSize [ ^ allocatedElements add: (super malloc: aSize) diff --git a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st index 22b52f0abb..dd1e43a5cc 100644 --- a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMTrampolineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMTrampolineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'registerMask', 'isAligned', @@ -10,12 +10,10 @@ Class { 'CogAbstractRegisters', 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMTrampolineTest class >> testParameters [ ^ super testParameters * { @@ -24,25 +22,25 @@ VMTrampolineTest class >> testParameters [ } ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> isAligned [ ^ isAligned ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> isAligned: aBoolean [ isAligned := aBoolean ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> setUp [ super setUp. @@ -62,7 +60,7 @@ VMTrampolineTest >> setUp [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ | inc baseMethod baseMethodIP ctx page | @@ -125,7 +123,7 @@ VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ equals: (memory integerObjectOf: 3) ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testDetectFrameNotPointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -140,7 +138,7 @@ VMTrampolineTest >> testDetectFrameNotPointerInUse [ self deny: cogit isCFramePointerInUse ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testDetectFramePointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -155,7 +153,7 @@ VMTrampolineTest >> testDetectFramePointerInUse [ self assert: cogit isCFramePointerInUse ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -173,7 +171,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self assert: self framePointerRegisterValue equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -191,7 +189,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self assert: machineSimulator smalltalkStackPointerRegisterValue equals: 17 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ | initialStackPointer | @@ -209,7 +207,7 @@ VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue equals: initialStackPointer ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDereferenceSelectorRoutine [ | dereferenceRoutine previousLinkRegister trampoline | @@ -240,7 +238,7 @@ VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDeref self assert: self interpreter stackTop equals: previousLinkRegister ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -254,7 +252,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self assert: machineSimulator framePointerRegisterValue equals: 888 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -268,7 +266,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self assert: machineSimulator stackPointerRegisterValue equals: 777 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ cogit backend hasLinkRegister ifFalse: [ ^ self skip ]. @@ -284,7 +282,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ self assert: self interpreter stackTop equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -301,7 +299,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePoint self assert: self interpreter framePointer equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -318,7 +316,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPoint self assert: self interpreter stackPointer equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ "Some architectures such as ARMv8 require that the SP is always aligned to some value even in between calls. @@ -331,7 +329,7 @@ VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue \\ cogit stackPointerAlignment equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testStoreRegistersPushesValuesToStack [ | initialStackPointer actualPushedBytes | diff --git a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st index 1951d51644..9827cf8874 100644 --- a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMX64InstructionTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMX64InstructionTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMX64InstructionTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -17,13 +15,13 @@ VMX64InstructionTest class >> wordSizeParameters [ yourself ] -{ #category : 'configuration' } +{ #category : #configuration } VMX64InstructionTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ | mem | @@ -47,7 +45,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ | mem | @@ -72,7 +70,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupSRVr [ @@ -88,7 +86,7 @@ VMX64InstructionTest >> testDupSRVr [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFaddSRvRvRv [ | result | @@ -107,7 +105,7 @@ VMX64InstructionTest >> testFaddSRvRvRv [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ | result | @@ -126,7 +124,7 @@ VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFsubSRvRvRv [ | result | @@ -145,7 +143,7 @@ VMX64InstructionTest >> testFsubSRvRvRv [ self assert: (result doubleAt: 9) equals: -1.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFsubSRvRvRvWithThreeDifferentRegisters [ | result | diff --git a/smalltalksrc/VMMakerTests/package.st b/smalltalksrc/VMMakerTests/package.st index 285bf148e9..328d153d5f 100644 --- a/smalltalksrc/VMMakerTests/package.st +++ b/smalltalksrc/VMMakerTests/package.st @@ -1 +1 @@ -Package { #name : 'VMMakerTests' } +Package { #name : #VMMakerTests } From a5e8c44a992e159f83fce6dc5a7e3ccccd449bb2 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Fri, 20 Sep 2024 17:16:15 +0200 Subject: [PATCH 08/11] Removed new testing class for ephemerons. Moved one test to the Gc old test class --- .../VMSpurEphemeronsAlgorithmTest.class.st | 361 ------------------ ...MSpurOldSpaceGarbageCollectorTest.class.st | 32 ++ 2 files changed, 32 insertions(+), 361 deletions(-) delete mode 100644 smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st diff --git a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st b/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st deleted file mode 100644 index 400872c055..0000000000 --- a/smalltalksrc/VMMakerTests/VMSpurEphemeronsAlgorithmTest.class.st +++ /dev/null @@ -1,361 +0,0 @@ -Class { - #name : #VMSpurEphemeronsAlgorithmTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #instVars : [ - 'ephemeronObjectOopOne', - 'ephemeronObjectOopTwo', - 'nonEphemeronObjectOopOne', - 'nonEphemeronObjectOopTwo' - ], - #category : #'VMMakerTests-MemoryTests' -} - -{ #category : #helper } -VMSpurEphemeronsAlgorithmTest >> addKeysToEphemerons [ - - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopTwo -] - -{ #category : #helper } -VMSpurEphemeronsAlgorithmTest >> keepEphemeronsInVMVariables [ - "Force ephemerons to not be collected by putting them in special variables" - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo -] - -{ #category : #helper } -VMSpurEphemeronsAlgorithmTest >> newEphemeronObjectOldSpace [ - "In pharo Ephemerons have 3 slots" - - ^ self newOldSpaceObjectWithSlots: 3 - format: memory ephemeronFormat - classIndex: (memory ensureBehaviorHash: ourEphemeronClass) -] - -{ #category : #running } -VMSpurEphemeronsAlgorithmTest >> setUp [ - - super setUp. - memory initializeMournQueue. - self createEphemeronClass -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOld [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsOldInverse [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoung [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newZeroSizedObject. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsOldObjectsYoungInverse [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newZeroSizedObject. - nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - "ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo." - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpace [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory doScavenge: 1. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceFlush [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect both non ephemeron objects" - memory flushNewSpace. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpace [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - ephemerons with same key' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsWithSameKeyOldSpaceNewSpace [ - - ephemeronObjectOopOne := self newEphemeronObjectOldSpace. - ephemeronObjectOopTwo := self newEphemeronObjectOldSpace. - nonEphemeronObjectOopOne := self newZeroSizedObject. - - "Both ephemerons share the same key" - memory storePointer: 0 - ofObject: ephemeronObjectOopOne - withValue: nonEphemeronObjectOopOne. - memory storePointer: 0 - ofObject: ephemeronObjectOopTwo - withValue: nonEphemeronObjectOopOne. - - self keepObjectInVMVariable1: ephemeronObjectOopOne. - self keepObjectInVMVariable2: ephemeronObjectOopTwo. - - "Collect ephemerons" - memory fullGC. - - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). - self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOld [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 0. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsOldInverse [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newOldSpaceObjectWithSlots: 0. - nonEphemeronObjectOopTwo := self newOldSpaceObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge:1 "Tenured by age". - memory fullGC. - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo. - self assert: memory dequeueMourner equals: ephemeronObjectOopOne -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoung [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newObjectWithSlots: 1. - nonEphemeronObjectOopTwo := self newZeroSizedObject. - "Make object 1 reference object 2" - memory storePointer: 0 ofObject: nonEphemeronObjectOopOne withValue: nonEphemeronObjectOopTwo. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge: 1. "TenureByAge" - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopOne. - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo -] - -{ #category : #'tests - finalization - algorithm' } -VMSpurEphemeronsAlgorithmTest >> testEphemeronsYoungObjectsYoungInverse [ - - ephemeronObjectOopOne := self newEphemeronObject. - ephemeronObjectOopTwo := self newEphemeronObject. - nonEphemeronObjectOopOne := self newZeroSizedObject. - nonEphemeronObjectOopTwo := self newObjectWithSlots: 1. - "Make object 2 reference object 1" - memory storePointer: 0 ofObject: nonEphemeronObjectOopTwo withValue: nonEphemeronObjectOopOne. - - self addKeysToEphemerons. - self keepEphemeronsInVMVariables. - - "Collect both non ephemeron objects" - memory doScavenge: 1. "TenureByAge" - - ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. - ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. - - self assert: memory dequeueMourner equals: ephemeronObjectOopOne. - self assert: memory dequeueMourner equals: ephemeronObjectOopTwo -] diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index 0830123f51..a70106debc 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -497,6 +497,38 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] +{ #category : #tests } +VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ + + | ephemeronObjectOopOne ephemeronObjectOopTwo nonEphemeronObjectOop | + "set up" + memory initializeMournQueue. + self createEphemeronClass. + + ephemeronObjectOopOne := self newEphemeronObject. + ephemeronObjectOopTwo := self newEphemeronObject. + nonEphemeronObjectOop := self newOldSpaceObjectWithSlots: 0. + + "Both ephemerons share the same key" + memory storePointer: 0 + ofObject: ephemeronObjectOopOne + withValue: nonEphemeronObjectOop. + memory storePointer: 0 + ofObject: ephemeronObjectOopTwo + withValue: nonEphemeronObjectOop. + + self keepObjectInVMVariable1: ephemeronObjectOopOne. + self keepObjectInVMVariable2: ephemeronObjectOopTwo. + + "Collect non ephemeron object" + memory fullGC. + ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. + ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. + + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner). + self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) +] + { #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ From 4f76a30cc62fd7838d5c81d281b776fd91ef4f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Jordan=20Monta=C3=B1o?= Date: Tue, 24 Sep 2024 15:14:24 +0200 Subject: [PATCH 09/11] Fixed tonel format that was broken during the merging --- .../VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index d100bca3b2..8f584c1825 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -629,7 +629,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ | ephemeronObjectOopOne ephemeronObjectOopTwo nonEphemeronObjectOop | @@ -661,7 +661,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ | freespace freespace2 slotsNumber anObjectOop | From f4a5ab727d419f4b343631181149819febd765bf Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Tue, 24 Sep 2024 16:05:04 +0200 Subject: [PATCH 10/11] Added comment to see if the vm builds --- smalltalksrc/VMMakerTests/Array.extension.st | 6 +- .../VMMakerTests/ByteSymbol.extension.st | 6 +- .../VMMakerTests/Character.extension.st | 6 +- smalltalksrc/VMMakerTests/Cogit.extension.st | 12 +- .../VMMakerTests/CompiledBlock.extension.st | 4 +- .../VMMakerTests/DummyProcessor.class.st | 56 +- .../VMMakerTests/ExitInterpreter.class.st | 9 +- .../VMMakerTests/LiteralVariable.extension.st | 4 +- .../ManifestVMMakerTests.class.st | 14 +- .../VMMakerTests/MethodBuilderTest.class.st | 30 +- .../MockVMStructWithReservedWords.class.st | 13 +- ...ckVMStructWithoutTypeDeclarations.class.st | 9 +- .../ParametrizedTestMatrix.extension.st | 4 +- .../VMMakerTests/ProcessorSimulator.class.st | 258 +++--- .../VMMakerTests/RegisterDescriptor.class.st | 33 +- .../VMMakerTests/SmallInteger.extension.st | 4 +- .../SpurMemoryManager.extension.st | 4 +- .../VMMakerTests/StackBuilderTest.class.st | 76 +- .../StackToRegisterMappingCogit.extension.st | 4 +- .../VMMakerTests/UndefinedObject.extension.st | 4 +- .../UnicornARMv5Simulator.class.st | 136 ++-- .../UnicornARMv8Simulator.class.st | 212 +++-- .../UnicornI386Simulator.class.st | 106 ++- .../UnicornInvalidMemoryAccess.class.st | 28 +- .../VMMakerTests/UnicornProcessor.class.st | 160 ++-- .../UnicornRISCVSimulator.class.st | 264 ++++--- .../UnicornRegisterDescriptor.class.st | 30 +- .../UnicornSimulationTrap.class.st | 26 +- .../VMMakerTests/UnicornSimulator.class.st | 28 +- .../VMMakerTests/UnicornTimeout.class.st | 12 +- .../VMMakerTests/UnicornX64Simulator.class.st | 162 ++-- .../VMARMStackAlignmentTest.class.st | 24 +- .../VMARMV8SIMDEncodingTest.class.st | 38 +- .../VMARMV8SpecificEncodingTest.class.st | 72 +- .../VMMakerTests/VMAbstractBuilder.class.st | 18 +- .../VMMakerTests/VMAbstractFFITest.class.st | 23 +- .../VMAbstractImageFormatTest.class.st | 22 +- .../VMAbstractPrimitiveTest.class.st | 19 +- .../VMMakerTests/VMBlockTest.class.st | 40 +- .../VMMakerTests/VMByteCodesTest.class.st | 136 ++-- .../VMMakerTests/VMBytecodeMethod.class.st | 32 +- .../VMCodeCompactionTest.class.st | 38 +- .../VMMakerTests/VMCogitHelpersTest.class.st | 28 +- .../VMCompiledCodeBuilder.class.st | 72 +- smalltalksrc/VMMakerTests/VMContext.class.st | 28 +- .../VMMakerTests/VMContextAccessTest.class.st | 22 +- .../VMDivisionInstructionTest.class.st | 28 +- .../VMFFIArgumentMarshallingTest.class.st | 95 ++- .../VMMakerTests/VMFFICallbacksTest.class.st | 17 +- .../VMMakerTests/VMFFIHelpersTest.class.st | 31 +- .../VMFFIReturnMarshallingTest.class.st | 47 +- ...SameThreadArgumentMarshallingTest.class.st | 13 +- .../VMFFISameThreadCalloutTest.class.st | 11 +- ...FISameThreadReturnMarshallingTest.class.st | 11 +- ...MFFIWorkerArgumentMarshallingTest.class.st | 19 +- .../VMFFIWorkerCalloutTest.class.st | 27 +- .../VMFFIWorkerReturnMarshallingTest.class.st | 13 +- ...ForwardLiteralInMachineMethodTest.class.st | 14 +- .../VMMakerTests/VMFrameBuilder.class.st | 92 ++- .../VMImageHeaderWritingTest.class.st | 50 +- .../VMMakerTests/VMImageReadingTest.class.st | 32 +- .../VMMakerTests/VMInterpreterTests.class.st | 14 +- .../VMJITPrimitiveCallingTest.class.st | 82 +- .../VMJITVMPrimitiveTest.class.st | 20 +- .../VMJistMethodTestObject.class.st | 10 +- .../VMMakerTests/VMJitMethodTest.class.st | 32 +- .../VMJitMethodWithImmutabilityTest.class.st | 16 +- .../VMMakerTests/VMJitSimdBytecode.class.st | 26 +- .../VMJittedBoxFloatPrimitivesTest.class.st | 14 +- ...ittedByteArrayAccessPrimitiveTest.class.st | 112 ++- ...xternalAddressAccessPrimitiveTest.class.st | 12 +- .../VMJittedGeneralPrimitiveTest.class.st | 312 ++++---- .../VMMakerTests/VMJittedLookupTest.class.st | 22 +- .../VMJittedPrimitiveAtPutTest.class.st | 14 +- .../VMJittedPrimitiveAtTest.class.st | 74 +- .../VMJittedPrimitiveSizeTest.class.st | 32 +- .../VMJittedPrimitivesTest.class.st | 20 +- .../VMJittedSmallFloatPrimitiveTest.class.st | 52 +- .../VMMakerTests/VMLiterRulesTest.class.st | 13 +- .../VMMakerTests/VMLookUpTest.class.st | 62 +- .../VMMASTTranslationTest.class.st | 87 +-- .../VMMachineCodeFrameBuilderForTest.class.st | 41 +- .../VMMakerTests/VMMachineCodeMethod.class.st | 20 +- .../VMMachineSimulatorTest.class.st | 42 +- .../VMMakerTests/VMMockCodeGenerator.class.st | 26 +- ...MObjectAccessorIdentificationTest.class.st | 10 +- .../VMMakerTests/VMObjectLayoutTests.class.st | 60 +- .../VMMakerTests/VMObjectStackTest.class.st | 38 +- .../VMPermanentSpaceImageReadingTest.class.st | 14 +- .../VMPermanentSpaceMemoryTest.class.st | 90 ++- .../VMPermanentSpacePrimitiveTest.class.st | 30 +- .../VMMakerTests/VMPinnedObjectTest.class.st | 36 +- .../VMPrimitiveCallAbstractTest.class.st | 44 +- .../VMPrimitiveCallingTest.class.st | 16 +- .../VMMakerTests/VMPrimitiveTest.class.st | 738 +++++++++--------- .../VMPushThisContextRoutineTest.class.st | 32 +- .../VMSegmentsImageFormatTest.class.st | 18 +- ...lectorIndexDereferenceRoutineTest.class.st | 16 +- .../VMMakerTests/VMSessionIdTest.class.st | 10 +- ...SimpleStackBasedCogitAbstractTest.class.st | 164 ++-- ...SimpleStackBasedCogitBytecodeTest.class.st | 312 ++++---- ...impleStackBasedCogitCoggedMethods.class.st | 16 +- ...StackBasedCogitMegamorphicPICTest.class.st | 40 +- ...StackBasedCogitMonomorphicPICTest.class.st | 14 +- ...StackBasedCogitPolymorphicPICTest.class.st | 52 +- ...eStackBasedCogitRememberedSetTest.class.st | 20 +- .../VMSimulatedEnvironmentBuilder.class.st | 50 +- .../VMMakerTests/VMSimulationTest.class.st | 12 +- .../VMSistaSuperSendsTest.class.st | 12 +- .../VMSistaTrampolineTest.class.st | 12 +- .../VMSnapshotPrimitiveTest.class.st | 20 +- .../VMSpecialSendArithmethicTest.class.st | 80 +- .../VMSpurInitializedOldSpaceTest.class.st | 48 +- .../VMSpurMemoryManagerTest.class.st | 150 ++-- .../VMSpurNewSpaceStructureTest.class.st | 46 +- .../VMSpurObjectAllocationTest.class.st | 12 +- .../VMSpurOldSpaceBootstrapTest.class.st | 20 +- ...MSpurOldSpaceGarbageCollectorTest.class.st | 88 +-- .../VMSpurOldSpaceStructureTest.class.st | 14 +- .../VMMakerTests/VMSpurOldSpaceTest.class.st | 140 ++-- .../VMSpurRememberedSetTest.class.st | 46 +- .../VMSpurScavengeEphemeronTest.class.st | 54 +- .../VMSpurScavengeWeakTest.class.st | 18 +- .../VMMakerTests/VMSpurScavengerTest.class.st | 96 ++- ...llocationStrategyForLargeTreeTest.class.st | 56 +- ...llocationStrategyForSmallTreeTest.class.st | 76 +- ...purTreeAllocationWithBigNodesTest.class.st | 20 +- .../VMMakerTests/VMStackBuilder.class.st | 54 +- .../VMMakerTests/VMStackFrame.class.st | 50 +- .../VMStackInterpreterTest.class.st | 18 +- .../VMMakerTests/VMStackMappingTest.class.st | 38 +- ...VMStackToRegisterMappingCogitTest.class.st | 48 +- .../VMStackToRegisterMappingTest.class.st | 34 +- .../VMMakerTests/VMStorePopTest.class.st | 14 +- .../VMTestMockInterpreter.class.st | 23 +- .../VMMakerTests/VMTrampolineTest.class.st | 46 +- .../VMX64InstructionTest.class.st | 26 +- smalltalksrc/VMMakerTests/package.st | 2 +- 138 files changed, 3474 insertions(+), 3706 deletions(-) diff --git a/smalltalksrc/VMMakerTests/Array.extension.st b/smalltalksrc/VMMakerTests/Array.extension.st index a4a387884a..ef74d1b24b 100644 --- a/smalltalksrc/VMMakerTests/Array.extension.st +++ b/smalltalksrc/VMMakerTests/Array.extension.st @@ -1,13 +1,13 @@ -Extension { #name : 'Array' } +Extension { #name : #Array } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Array >> forMemory: aMemory inMethod: anObject [ ^ aMemory newArrayWith: (self collect: [ :anElement | anElement forMemory: aMemory inMethod: nil ]) ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Array >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st index 3fde704597..e9a6595a9d 100644 --- a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st +++ b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'ByteSymbol' } +Extension { #name : #ByteSymbol } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ByteSymbol >> forMemory: aMemory inMethod: anObject [ | vmString instSpec numSlots | @@ -27,7 +27,7 @@ ByteSymbol >> forMemory: aMemory inMethod: anObject [ ^ vmString ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ByteSymbol >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Character.extension.st b/smalltalksrc/VMMakerTests/Character.extension.st index 79a30d41b3..26f22ec3fe 100644 --- a/smalltalksrc/VMMakerTests/Character.extension.st +++ b/smalltalksrc/VMMakerTests/Character.extension.st @@ -1,12 +1,12 @@ -Extension { #name : 'Character' } +Extension { #name : #Character } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Character >> forMemory: memory [ ^ memory characterObjectOf: self codePoint ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Character >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Cogit.extension.st b/smalltalksrc/VMMakerTests/Cogit.extension.st index c8d411581d..3b587c4699 100644 --- a/smalltalksrc/VMMakerTests/Cogit.extension.st +++ b/smalltalksrc/VMMakerTests/Cogit.extension.st @@ -1,28 +1,28 @@ -Extension { #name : 'Cogit' } +Extension { #name : #Cogit } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> byte0: anInteger [ byte0 := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> inBlock: anInteger [ inBlock := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> methodOrBlockNumArgs: anInteger [ methodOrBlockNumArgs := anInteger ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> needsFrame [ ^ true ] -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } Cogit >> needsFrame: aFalse [ needsFrame := aFalse ] diff --git a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st index 87094e4db8..436740ae7f 100644 --- a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st +++ b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'CompiledBlock' } +Extension { #name : #CompiledBlock } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } CompiledBlock >> forMemory: memory inMethod: aMethodBuilder [ | methodBuilder | diff --git a/smalltalksrc/VMMakerTests/DummyProcessor.class.st b/smalltalksrc/VMMakerTests/DummyProcessor.class.st index 3c4e14ea5a..7779177d07 100644 --- a/smalltalksrc/VMMakerTests/DummyProcessor.class.st +++ b/smalltalksrc/VMMakerTests/DummyProcessor.class.st @@ -1,6 +1,6 @@ Class { - #name : 'DummyProcessor', - #superclass : 'Object', + #name : #DummyProcessor, + #superclass : #Object, #instVars : [ 'stackPointer', 'framePointer', @@ -10,151 +10,149 @@ Class { 'linkRegisterValue', 'receiverRegisterValue' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> baseRegisterValue: anInteger [ baseRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> cResultRegister [ ^ nil ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> disassembler [ ^ LLVMDisassembler aarch64 ] -{ #category : 'operations' } +{ #category : #operations } DummyProcessor >> flushICacheFrom: anInteger to: anInteger2 [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> fp [ ^ framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> fp: anInteger [ framePointer := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> framePointerRegisterValue: anInteger [ framePointer := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> hasLinkRegister [ ^ true ] -{ #category : 'initialization' } +{ #category : #initialization } DummyProcessor >> initializeStackFor: aSimpleStackBasedCogit [ "We are dummy...." ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> instructionPointerRegisterValue [ ^ programCounter ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> integerRegisterState [ ^ #() ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> linkRegisterValue: anInteger [ linkRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> machineSimulator [ ^ self ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> memoryAt: anInteger write: aCollection size: anInteger3 [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> pc [ ^ programCounter ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> pc: anInteger [ programCounter := anInteger ] -{ #category : 'operations' } +{ #category : #operations } DummyProcessor >> pushWord: anInteger [ stackPointer := stackPointer - 8 ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> receiverRegisterValue: anInteger [ receiverRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> runUntil: anInteger [ programCounter := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> setFramePointer: aFPValue stackPointer: aSPValue [ stackPointer := aSPValue. framePointer := aFPValue ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> simulateLeafCallOf: anInteger nextpc: anInteger2 memory: anUndefinedObject [ ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> smalltalkStackPointerRegisterValue [ ^ smalltalkStackPointerRegisterValue ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> smalltalkStackPointerRegisterValue: anInteger [ smalltalkStackPointerRegisterValue := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } DummyProcessor >> sp [ ^ stackPointer diff --git a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st index 4aff38ec53..86c280b059 100644 --- a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st @@ -1,14 +1,13 @@ Class { - #name : 'ExitInterpreter', - #superclass : 'Error', + #name : #ExitInterpreter, + #superclass : #Error, #instVars : [ 'returnValue' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } ExitInterpreter >> returnValue: anInteger [ returnValue := anInteger diff --git a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st index 02d3f47f5a..6579fb7e3b 100644 --- a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st +++ b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'LiteralVariable' } +Extension { #name : #LiteralVariable } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } LiteralVariable >> forMemory: aMemory inMethod: anObject [ | aVariable | diff --git a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st index 267b338feb..84a27ad5d5 100644 --- a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st +++ b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st @@ -2,28 +2,26 @@ I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser " Class { - #name : 'ManifestVMMakerTests', - #superclass : 'PackageManifest', - #category : 'VMMakerTests-Manifest', - #package : 'VMMakerTests', - #tag : 'Manifest' + #name : #ManifestVMMakerTests, + #superclass : #PackageManifest, + #category : #'VMMakerTests-Manifest' } -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> ruleBadMessageRule2V1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#UnicornARMv8Simulator #smashCallerSavedRegistersWithValuesFrom:by:in: #false)) #'2023-05-12T09:19:16.384586+02:00') #(#(#RGMethodDefinition #(#UnicornARMv8Simulator #postCallArgumentsNumArgs:in: #false)) #'2023-05-12T09:20:41.357283+02:00') #(#(#RGMethodDefinition #(#ProcessorSimulator #smashRegistersWithValuesFrom:by: #false)) #'2023-05-12T09:25:17.137958+02:00') ) ] -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> rulePrecedenceRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2023-05-12T09:19:42.605517+02:00') ) ] -{ #category : 'code-critics' } +{ #category : #'code-critics' } ManifestVMMakerTests class >> ruleUncommonMessageSendRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2020-07-24T12:05:44.86595+02:00') ) ] diff --git a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st index 882ae1c75a..fada9181db 100644 --- a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'MethodBuilderTest', - #superclass : 'VMInterpreterTests', + #name : #MethodBuilderTest, + #superclass : #VMInterpreterTests, #instVars : [ 'literals', 'numberOfArguments', @@ -11,19 +11,17 @@ Class { 'methodHeader', 'method' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testAddingBytecodesDoesntOverrideHeader [ method := methodBuilder newMethod buildMethod. self assert: methodBuilder buildMethodHeader equals: (memory integerValueOf: (memory fetchPointer: 0 ofObject: method)). ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ method := methodBuilder newMethod; buildMethod. @@ -35,14 +33,14 @@ MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ self shouldnt:[ methodBuilder newMethod; buildMethod ] raise: AssertionFailure ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBuildEmptyMethodIsCompiledMethod [ "checking the format" method := methodBuilder newMethod; buildMethod. self assert: (memory isCompiledMethod: method) ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ | bytecodeAddress | literals := { }. @@ -56,7 +54,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | @@ -71,7 +69,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ | bytecodeAddress | @@ -86,13 +84,13 @@ MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testClassOfCompiledMethodIsCompiledMethod [ self assert: (memory fetchClassOf: methodBuilder newMethod buildMethod) equals: (memory splObj: 16). ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testGeneratingCompiledMethod [ method := methodBuilder newMethod @@ -101,7 +99,7 @@ MethodBuilderTest >> testGeneratingCompiledMethod [ self assert: (memory isCompiledMethod: method) ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ | numberOfByteCode | @@ -116,7 +114,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ | numberOfByteCode | @@ -131,7 +129,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : 'running' } +{ #category : #running } MethodBuilderTest >> testSecondBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st index 1ffa0754bb..92814927f5 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st @@ -1,28 +1,27 @@ Class { - #name : 'MockVMStructWithReservedWords', - #superclass : 'VMStructType', + #name : #MockVMStructWithReservedWords, + #superclass : #VMStructType, #instVars : [ 'foo', 'case' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'enumerating' } +{ #category : #enumerating } MockVMStructWithReservedWords class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ aBinaryBlock value: 'foo' value: 'char *'. aBinaryBlock value: 'case' value: 'char *' ] -{ #category : 'accessing' } +{ #category : #accessing } MockVMStructWithReservedWords >> case [ ^ case ] -{ #category : 'accessing' } +{ #category : #accessing } MockVMStructWithReservedWords >> case: anObject [ case := anObject diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st index 077e789b01..15627d4255 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st @@ -1,15 +1,14 @@ Class { - #name : 'MockVMStructWithoutTypeDeclarations', - #superclass : 'VMStructType', + #name : #MockVMStructWithoutTypeDeclarations, + #superclass : #VMStructType, #instVars : [ 'foo', 'bar' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'enumerating' } +{ #category : #enumerating } MockVMStructWithoutTypeDeclarations class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ "Missing the bar type declaration" diff --git a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st index b9250409cb..f5910338a6 100644 --- a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st +++ b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'ParametrizedTestMatrix' } +Extension { #name : #ParametrizedTestMatrix } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } ParametrizedTestMatrix >> + aParametrizedTestMatrix [ | newMatrix | diff --git a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st index a61f9c0b74..37e4e7c26c 100644 --- a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st +++ b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st @@ -1,48 +1,46 @@ Class { - #name : 'ProcessorSimulator', - #superclass : 'Object', + #name : #ProcessorSimulator, + #superclass : #Object, #instVars : [ 'simulator', 'registerAliases', 'registerSmalltalkAliases', 'memory' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> ARMv5 [ ^ UnicornARMv5Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> ARMv8 [ ^ UnicornARMv8Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> IA32 [ ^ UnicornI386Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> X64 [ ^ UnicornX64Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> aarch64 [ ^ UnicornARMv8Simulator new ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> riscv64 [ "TODO: Add riscv32 and possibly two subclasses for the RISCV simulator" @@ -50,203 +48,203 @@ ProcessorSimulator class >> riscv64 [ "^ SpikeRISCVSimulator new" ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } ProcessorSimulator class >> simulatorFor: isa [ ^ (self subclasses detect: [ :each | each supportsISA: isa ]) perform: isa asSymbol ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> aliasForRegister: aRegisterName [ ^ registerAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> aliasSmalltalkForRegister: aRegisterName [ ^ registerSmalltalkAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0Register [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue [ ^ self readRegister: self arg0Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue: aValue [ ^ self writeRegister: self arg0Register value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1Register [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue [ ^ self readRegister: self arg1Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue: aValue [ ^ self writeRegister: self arg1Register value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue [ ^ self readRegister: self baseRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue: aValue [ ^ self writeRegister: self baseRegister value: aValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegister [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegisterValue [ ^ self readRegister: self cResultRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> cResultRegisterValue: aValue [ self writeRegister: self cResultRegister value: aValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg0RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg0RegisterValue [ ^ self readRegister: self carg0Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg1RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg1RegisterValue [ ^ self readRegister: self carg1Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg2RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg2RegisterValue [ ^ self readRegister: self carg2Register ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg3RegisterValue ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3Register [ ^ self subclassResponsibility ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } ProcessorSimulator >> carg3RegisterValue [ ^ self readRegister: self carg3Register ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue [ ^ self readRegister: self classRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue: aValue [ ^ self writeRegister: self classRegister value: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> cogit [ ^ memory interpreter cogit ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleCurrentInstruction [ ^ (self disassembleFrom: self instructionPointerRegisterValue opcodes: 1) first ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ self disassembler @@ -257,7 +255,7 @@ ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ pc: self instructionPointerRegisterValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembleFrom: start to: stop [ ^ self disassembler @@ -268,114 +266,114 @@ ProcessorSimulator >> disassembleFrom: start to: stop [ pc: self instructionPointerRegisterValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> disassembler [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister0 value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister1 value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2 [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister2 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister2 value: aValue ] -{ #category : 'disassembling' } +{ #category : #disassembling } ProcessorSimulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ ^ self subclassResponsibility ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> finishMappingMemory [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> flushICacheFrom: startAddress to: endAddress [ simulator removeInstructionCacheFrom: startAddress to: endAddress ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> fp [ ^ self framePointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> fp: aValue [ ^ self framePointerRegisterValue: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue [ ^ self readRegister: self framePointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue: aValue [ self writeRegister: self framePointerRegister value: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> getLastAddress: abstractInstructions [ | last | @@ -383,13 +381,13 @@ ProcessorSimulator >> getLastAddress: abstractInstructions [ ^ last address + last machineCodeSize ] -{ #category : 'testing' } +{ #category : #testing } ProcessorSimulator >> hasLinkRegister [ ^ false ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initialize [ super initialize. @@ -399,91 +397,91 @@ ProcessorSimulator >> initialize [ self initializeRegisterSmalltalkAliases. ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initializeRegisterAliases [ "Hook for subclasses" ] -{ #category : 'initialization' } +{ #category : #initialization } ProcessorSimulator >> initializeRegisterSmalltalkAliases [ "Hook for subclasses" ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue [ ^ self readRegister: self instructionPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue: aValue [ ^ self writeRegister: self instructionPointerRegister value: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> integerRegisterState [ ^ { } ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastExecutedInstructionAddress [ ^ simulator lastExecutedInstructionAddress ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastExecutedInstructionSize [ ^ simulator lastExecutedInstructionSize ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> lastInstructionCount [ ^ simulator lastInstructionCount ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue [ ^ self readRegister: self linkRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue: aValue [ ^ self writeRegister: self linkRegister value: aValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> lr [ ^ self linkRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> lr: aValue [ ^ self linkRegisterValue: aValue ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> mapMemory: aMemory at: anAddress [ simulator @@ -492,7 +490,7 @@ ProcessorSimulator >> mapMemory: aMemory at: anAddress [ withPermissions: UnicornConstants permissionAll. ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ aSlangMemoryManager regionsDo: [ :startAddress :region | @@ -502,42 +500,42 @@ ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ self finishMappingMemory. ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> memory [ ^ memory ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> memory: aSpur64BitMMLECoSimulator [ memory := aSpur64BitMMLECoSimulator ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> memoryAt: address readNext: byteSize [ ^ simulator memoryAt: address readNext: byteSize ] -{ #category : 'memory' } +{ #category : #memory } ProcessorSimulator >> memoryAt: address write: bytes size: size [ simulator memoryAt: address write: bytes size: size ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> pc [ ^ self instructionPointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> pc: aValue [ ^ self instructionPointerRegisterValue: aValue ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> peek [ | stackAddressIntegerValue peekedByteArray | @@ -551,13 +549,13 @@ ProcessorSimulator >> peek [ ^ peekedByteArray ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> peekAddress [ ^ self peek integerAt: 1 size: self wordSize signed: false ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> popBytes [ | stackAddressIntegerValue aByteArray | @@ -574,7 +572,7 @@ ProcessorSimulator >> popBytes [ ^ aByteArray ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> popWord [ | aByteArray | @@ -582,7 +580,7 @@ ProcessorSimulator >> popWord [ ^ aByteArray integerAt: 1 size: self wordSize signed: false. ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> pushBytes: aByteArray [ | stackAddressIntegerValue | @@ -603,7 +601,7 @@ ProcessorSimulator >> pushBytes: aByteArray [ ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> pushWord: anInteger [ | aByteArray | @@ -612,7 +610,7 @@ ProcessorSimulator >> pushWord: anInteger [ self pushBytes: aByteArray ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readFloat64Register: aRegisterID [ | registerValue | @@ -622,7 +620,7 @@ ProcessorSimulator >> readFloat64Register: aRegisterID [ ^ registerValue doubleAt: 1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ | registerValue | @@ -631,7 +629,7 @@ ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ ^ registerValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> readRegister: aRegisterID [ | registerValue size | @@ -640,37 +638,37 @@ ProcessorSimulator >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: size signed: false ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue [ ^ self readRegister: self receiverRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue: anInteger [ self writeRegister: self receiverRegister value: anInteger ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> register: anIndex readInto: aByteArray [ simulator register: anIndex readInto: aByteArray ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerAliases [ ^ registerAliases ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerDescriptors [ ^ self registerList collect: [ :reg | @@ -682,98 +680,98 @@ ProcessorSimulator >> registerDescriptors [ yourself ] ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> registerList [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue [ ^ self readRegister: self sendNumberOfArgumentsRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue: aValue [ ^ self writeRegister: self sendNumberOfArgumentsRegister value: aValue ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegister [ "By default they are the same" ^ self stackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue [ ^ self readRegister: self smalltalkStackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue: aValue [ self writeRegister: self smalltalkStackPointerRegister value: aValue ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> smashRegisterAccessors [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> smashRegistersWithValuesFrom: base by: step [ self smashRegisterAccessors withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> sp [ ^ self stackPointerRegisterValue ] -{ #category : 'accessing-registers-shortcuts' } +{ #category : #'accessing-registers-shortcuts' } ProcessorSimulator >> sp: aValue [ ^ self stackPointerRegisterValue: aValue ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegister [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue [ ^ self readRegister: self stackPointerRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue: aValue [ self writeRegister: self stackPointerRegister value: aValue ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> stackValueAt: anInteger [ "Get a value from the stack at a 0-base position" @@ -782,7 +780,7 @@ ProcessorSimulator >> stackValueAt: anInteger [ ^ aByteArray integerAt: 1 size: self wordSize signed: false ] -{ #category : 'accessing-stack' } +{ #category : #'accessing-stack' } ProcessorSimulator >> stackValueBytesAt: position [ "Get the bytes from the stack at a 0-base position" @@ -800,7 +798,7 @@ ProcessorSimulator >> stackValueBytesAt: position [ ^ aByteArray ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> stackValues [ | initialValue | @@ -811,14 +809,14 @@ ProcessorSimulator >> stackValues [ ] ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> startAt: begin until: until timeout: timeout count: count [ self subclassResponsibility ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } ProcessorSimulator >> step [ self @@ -828,36 +826,36 @@ ProcessorSimulator >> step [ count: 1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegister [ ^ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue [ ^ self readRegister: self temporaryRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue: anInteger [ ^ self writeRegister: self temporaryRegister value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> wordAt: anInteger [ ^ memory longAt: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } ProcessorSimulator >> wordSize [ self subclassResponsibility ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ | value | @@ -867,7 +865,7 @@ ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } ProcessorSimulator >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st index f4b6a25c2b..7f3419228e 100644 --- a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st @@ -1,50 +1,49 @@ Class { - #name : 'RegisterDescriptor', - #superclass : 'Object', + #name : #RegisterDescriptor, + #superclass : #Object, #instVars : [ 'simulator', 'name', 'alias', 'smalltalkAlias' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> alias [ ^ alias ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> name [ ^ name ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -54,35 +53,35 @@ RegisterDescriptor >> printOn: aStream [ ] -{ #category : 'actions' } +{ #category : #actions } RegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> smalltalkAlias [ ^ smalltalkAlias ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> smalltalkAlias: aString [ smalltalkAlias := aString ] -{ #category : 'accessing' } +{ #category : #accessing } RegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/SmallInteger.extension.st b/smalltalksrc/VMMakerTests/SmallInteger.extension.st index d5f6ef6f2a..f6dcb4fca2 100644 --- a/smalltalksrc/VMMakerTests/SmallInteger.extension.st +++ b/smalltalksrc/VMMakerTests/SmallInteger.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'SmallInteger' } +Extension { #name : #SmallInteger } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } SmallInteger >> forMemory: aMemory inMethod: anObject [ (self > aMemory maxSmallInteger or: [ self < aMemory minSmallInteger ]) ifTrue: [ self halt ]. diff --git a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st index b5d4de558f..e75c5e91a4 100644 --- a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st +++ b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'SpurMemoryManager' } +Extension { #name : #SpurMemoryManager } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } SpurMemoryManager >> hiddenRootsObject: anInteger [ hiddenRootsObj := anInteger diff --git a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st index aec69a0f71..8fce0dcfbe 100644 --- a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st @@ -15,8 +15,8 @@ temp2 method " Class { - #name : 'StackBuilderTest', - #superclass : 'VMInterpreterTests', + #name : #StackBuilderTest, + #superclass : #VMInterpreterTests, #instVars : [ 'stackElement1', 'stackElement2', @@ -32,12 +32,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> addFullFrame [ | frame | @@ -71,78 +69,78 @@ StackBuilderTest >> addFullFrame [ ^ frame ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument1 [ ^ self offsetArgument2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument1FromBaseFP [ ^ self offsetArgument2FromBaseFP + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument2 [ "we skip the frame pointer" ^ self offsetMethod + 2 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetArgument2FromBaseFP [ ^ 2 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetCallerFP [ ^ self offsetMethod + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetContext [ ^ self offsetFlags + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetFlags [ ^ self offsetReceiver + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetInstructionPointer [ ^ 0 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetMethod [ ^ self offsetContext + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetReceiver [ ^ self offsetTemp1 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetStackElement1 [ ^ self offsetStackElement2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetStackElement2 [ ^ self offsetInstructionPointer + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetTemp1 [ ^ self offsetTemp2 + 1 ] -{ #category : 'offset' } +{ #category : #offset } StackBuilderTest >> offsetTemp2 [ ^ self offsetStackElement1 + 1 ] -{ #category : 'running' } +{ #category : #running } StackBuilderTest >> setUp [ super setUp. @@ -157,14 +155,14 @@ StackBuilderTest >> setUp [ ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testCallerFrameOfTopFrameShouldBeSecondFrameBuilderObject [ "For debug purpose, we added a link to the caller frame in the current frame." self assert: (stackBuilder topFrame callerFrame) equals: (stackBuilder frames nextToLast) ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -172,7 +170,7 @@ StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ equals: stackBuilder frames second instructionPointer. ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ | frame | @@ -187,7 +185,7 @@ StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ | frame | @@ -202,7 +200,7 @@ StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -210,7 +208,7 @@ StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ "We have 3 frames. The caller of the top frame should be the middle one" @@ -218,7 +216,7 @@ StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPushed [ method := methodBuilder newMethod buildMethod. @@ -230,7 +228,7 @@ StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPu equals: (methodBuilder bytecodeAt: 0 forMethod: method) ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ | frame argNum | @@ -249,7 +247,7 @@ StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ self assert: frame argumentSize equals: argNum ] -{ #category : 'test-setFromMethod' } +{ #category : #'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ | frame tempNum | @@ -270,37 +268,37 @@ StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ equals: (OrderedCollection new: tempNum withAll: memory nilObject) ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderArgument1InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument1FromBaseFP * memory bytesPerOop)) equals: argument1 ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderArgument2InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument2FromBaseFP * memory bytesPerOop)) equals: argument2 ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderContext [ self assert: (interpreter stackValue: self offsetContext) equals: context ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderMethod [ self assert: (interpreter stackValue: self offsetMethod) equals: method ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderReceiver [ self assert: (interpreter stackValue: self offsetReceiver) equals: receiver ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderStackElementIsReversed [ self assert: (interpreter stackValue: self offsetStackElement1) equals: stackElement1. @@ -308,7 +306,7 @@ StackBuilderTest >> testOrderStackElementIsReversed [ equals: stackElement2. ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ "When a process is suspended, the Instruction Pointer is pushed on the stack of the frame. It should be the last thing pushed, and therefore, be at the top. " @@ -316,7 +314,7 @@ StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ equals: instructionPointer. ] -{ #category : 'test-order' } +{ #category : #'test-order' } StackBuilderTest >> testOrderTempIsReversed [ self assert: (interpreter stackValue: self offsetTemp1) equals: temp1. @@ -324,7 +322,7 @@ StackBuilderTest >> testOrderTempIsReversed [ equals: temp2. ] -{ #category : 'test-VMstate' } +{ #category : #'test-VMstate' } StackBuilderTest >> testPageHeadFPIsLastFrameFP [ "The FramePointer of the interpreter should be the FramePointer of the current process last pushed frame." self assert: interpreter framePointer diff --git a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st index f2768e954f..1ad516b356 100644 --- a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st +++ b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'StackToRegisterMappingCogit' } +Extension { #name : #StackToRegisterMappingCogit } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } StackToRegisterMappingCogit >> methodOrBlockNumTemps: anInteger [ methodOrBlockNumTemps := anInteger diff --git a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st index 6d460c8943..bbe289597b 100644 --- a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st +++ b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st @@ -1,6 +1,6 @@ -Extension { #name : 'UndefinedObject' } +Extension { #name : #UndefinedObject } -{ #category : '*VMMakerTests' } +{ #category : #'*VMMakerTests' } UndefinedObject >> forMemory: aMemory inMethod: anObject [ ^ aMemory nilObject diff --git a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st index 386b5360a0..f2ff996e16 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st @@ -1,66 +1,64 @@ Class { - #name : 'UnicornARMv5Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornARMv5Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> arg0Register [ ^ UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> arg1Register [ ^ UcARMRegisters r4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> baseRegister [ ^ UcARMRegisters r10 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> cResultRegister [ ^ UcARMRegisters r0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg0Register [ ^ UcARMRegisters r0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg1Register [ ^ UcARMRegisters r1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg2Register [ ^ UcARMRegisters r2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv5Simulator >> carg3Register [ ^ UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> classRegister [ ^ UcARMRegisters r8 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ anInteger < 0 ifFalse: [ ^ anInteger ]. @@ -68,7 +66,7 @@ UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ ^ 16rFFFFFFFF - anInteger abs + 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ (aTwoComplementNumber bitAnd: 1 << 31) = 0 ifTrue: [ @@ -77,7 +75,7 @@ UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ ^ aTwoComplementNumber - 16rFFFFFFFF - 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> createUnicorn [ "Enable Floating Point... @@ -114,13 +112,13 @@ UnicornARMv5Simulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv5Simulator >> disassembler [ ^ LLVMARMDisassembler armv7 ] -{ #category : 'executing' } +{ #category : #executing } UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | actualCount result error startTime remainingTimeout currentTime | @@ -176,25 +174,25 @@ UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout c self instructionPointerRegisterValue = until ifTrue: [ ^ result ]] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARMRegisters d0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARMRegisters d1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARMRegisters d2 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -205,42 +203,42 @@ UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> framePointerRegister [ ^ UcARMRegisters fp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornARMv5Simulator >> hasLinkRegister [ ^ true ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> instructionPointerRegister [ ^ UcARMRegisters pc ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> integerRegisterState [ ^ #() ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> linkRegister [ ^ UcARMRegisters lr ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -255,177 +253,177 @@ UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r0 [ ^ self readRegister: UcARMRegisters r0 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r0: anInteger [ ^ self writeRegister: UcARMRegisters r0 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r1 [ ^ self readRegister: UcARMRegisters r1 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r10 [ ^ self readRegister: UcARMRegisters r10 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r10: anInteger [ ^ self writeRegister: UcARMRegisters r10 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r11: anInteger [ ^ self writeRegister: UcARMRegisters r11 value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> r12 [ ^ self readRegister: UcARMRegisters r12 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r12: anInteger [ self writeRegister: UcARMRegisters r12 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r1: anInteger [ ^ self writeRegister: UcARMRegisters r1 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r2 [ ^ self readRegister: UcARMRegisters r2 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r2: anInteger [ ^ self writeRegister: UcARMRegisters r2 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r3 [ ^ self readRegister: UcARMRegisters r3 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r3: anInteger [ ^ self writeRegister: UcARMRegisters r3 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r4 [ ^ self readRegister: UcARMRegisters r4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r4: anInteger [ ^ self writeRegister: UcARMRegisters r4 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r5 [ ^ self readRegister: UcARMRegisters r5 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r5: anInteger [ ^ self writeRegister: UcARMRegisters r5 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r6 [ ^ self readRegister: UcARMRegisters r6 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r6: anInteger [ ^ self writeRegister: UcARMRegisters r6 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r7 [ ^ self readRegister: UcARMRegisters r7 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r7: anInteger [ ^ self writeRegister: UcARMRegisters r7 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r8 [ ^ self readRegister: UcARMRegisters r8 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r8: anInteger [ ^ self writeRegister: UcARMRegisters r8 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r9 [ ^ self readRegister: UcARMRegisters r9 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> r9: anInteger [ ^ self writeRegister: UcARMRegisters r9 value: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> receiverRegister [ ^ UcARMRegisters r5 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> registerList [ ^ #(lr pc sp fp r0 r1 r2 r3 r4 r5 r6 r7 r8 r9) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> registerStateGetters [ ^#(r0 r1 r2 r3 r4) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> retpcIn: aMemory [ "The return address is on the stack, having been pushed by either simulateCallOf:nextpc:memory: or simulateJumpCallOf:memory:" ^memory longAt: self fp + 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> sendNumberOfArgumentsRegister [ ^ UcARMRegisters r6 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -440,40 +438,40 @@ UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ self pc: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self fp: self popWord. self pc: self popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornARMv5Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(r0: r1: r2: r3: r9: r12: lr:) withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> smashRegisterAccessors [ ^ #(r0: r1: r2: r3:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> stackPointerRegister [ ^ UcARMRegisters sp ] -{ #category : 'executing' } +{ #category : #executing } UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: count [ begin == until ifTrue: [ ^ self ]. @@ -481,13 +479,13 @@ UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: cou ] -{ #category : 'registers' } +{ #category : #registers } UnicornARMv5Simulator >> temporaryRegister [ ^ UcARMRegisters r2 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv5Simulator >> wordSize [ ^ 4 ] diff --git a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st index 50b83cf1f2..bdda0e9ccd 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st @@ -1,96 +1,94 @@ Class { - #name : 'UnicornARMv8Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornARMv8Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg0Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg1Register [ ^ UcARM64Registers x1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg2Register [ ^ UcARM64Registers x2 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> arg3Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> baseRegister [ ^ UcARM64Registers x24 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> cResultRegister [ ^ UcARM64Registers x0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg0Register [ ^ UcARM64Registers x0 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg1Register [ ^ UcARM64Registers x1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg2Register [ ^ UcARM64Registers x2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornARMv8Simulator >> carg3Register [ ^ UcARM64Registers x3 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> carry [ ^ (self nzcv bitAnd: (1<<29))~= 0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> classRegister [ ^ UcARM64Registers x22 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1 [ ^ self readRegister: UcARM64Registers cpacr_el1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1: anInteger [ self writeRegister: UcARM64Registers cpacr_el1 value: anInteger ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornARMv8Simulator >> createUnicorn [ simulator := Unicorn arm64. @@ -99,31 +97,31 @@ UnicornARMv8Simulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv8Simulator >> disassembler [ ^ LLVMARMDisassembler aarch64 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARM64Registers d0 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARM64Registers d1 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARM64Registers d2 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -134,24 +132,24 @@ UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> framePointerRegister [ ^ UcARM64Registers fp ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornARMv8Simulator >> hasLinkRegister [ ^ true ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornARMv8Simulator >> initializeRegisterAliases [ registerAliases @@ -164,37 +162,37 @@ UnicornARMv8Simulator >> initializeRegisterAliases [ at: #x30 put: #linkRegister ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> instructionPointerRegister [ ^ UcARM64Registers pc ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> linkRegister [ ^ UcARM64Registers x30 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> negative [ ^ (self nzcv bitAnd: (1<<31))~= 0 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> nzcv [ ^ self readRegister: UcARM64Registers nzcv ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> overflow [ ^ (self nzcv bitAnd: (1<<28)) ~= 0 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemory [ "" "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -208,37 +206,37 @@ UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemo ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> receiverRegister [ ^ UcARM64Registers x23 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv8Simulator >> registerList [ ^ #(lr pc sp fp x28 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x16 x19 x20 x22 x23 x24 x25 zero negative carry overflow v0 v1 v2) ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> registerStateGetters [ ^#( x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x12 sp lr pc) ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> retpcIn: aMemory [ ^ memory longAt: self fp + 8 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> sendNumberOfArgumentsRegister [ ^ UcARM64Registers x25 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -255,14 +253,14 @@ UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ self instructionPointerRegisterValue: address ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self framePointerRegisterValue: self popWord. @@ -272,13 +270,13 @@ UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> smalltalkStackPointerRegister [ "Internally to execute Smalltalk code we use X28 as the stack pointer register" ^ UcARM64Registers x28 ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(x0: x1: x2: x3: x4: x5: lr:) withIndexDo: @@ -286,373 +284,373 @@ UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step self perform: accessor with: index - 1 * step + base] ] -{ #category : 'simulation-support' } +{ #category : #'simulation-support' } UnicornARMv8Simulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x0: x1: x2: x3: x4: x5: x6: x7: x8: x9: x10: x11: x12: ) ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> stackPointerRegister [ ^ UcARM64Registers sp ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> temporaryRegister [ ^ UcARM64Registers x1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v0 [ ^ self readRawRegister: UcARM64Registers v0 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v1 [ ^ self readRawRegister: UcARM64Registers v1 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> v2 [ ^ self readRawRegister: UcARM64Registers v2 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcARM64Registers v0 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister1Value [ ^ simulator readRegisterId: UcARM64Registers v1 size: 16 ] -{ #category : 'accessing-registers-abstract' } +{ #category : #'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister2Value [ ^ simulator readRegisterId: UcARM64Registers v2 size: 16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> w25: anInteger [ self writeRegister: UcARM64Registers w25 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> w6: anInteger [ self writeRegister: UcARM64Registers w6 value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornARMv8Simulator >> wordSize [ ^ 8 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x0 [ ^ self readRegister: UcARM64Registers x0 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x0: anInteger [ self writeRegister: UcARM64Registers x0 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x1 [ ^ self readRegister: UcARM64Registers x1 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x10 [ ^ self readRegister: UcARM64Registers x10 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x10: anInteger [ ^ self writeRegister: UcARM64Registers x10 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x11 [ ^ self readRegister: UcARM64Registers x11 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x11: anInteger [ ^ self writeRegister: UcARM64Registers x11 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x12 [ ^ self readRegister: UcARM64Registers x12 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x12: anInteger [ ^ self writeRegister: UcARM64Registers x12 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x13: anInteger [ self writeRegister: UcARM64Registers x13 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x14: anInteger [ self writeRegister: UcARM64Registers x14 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x15: anInteger [ self writeRegister: UcARM64Registers x15 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x16 [ ^ self readRegister: UcARM64Registers x16 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x16: anInteger [ self writeRegister: UcARM64Registers x16 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x17: anInteger [ self writeRegister: UcARM64Registers x17 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x18: anInteger [ self writeRegister: UcARM64Registers x18 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x19 [ ^ self readRegister: UcARM64Registers x19 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x19: anInteger [ self writeRegister: UcARM64Registers x19 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x1: anInteger [ ^ self writeRegister: UcARM64Registers x1 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x2 [ ^ self readRegister: UcARM64Registers x2 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x20 [ ^ self readRegister: UcARM64Registers x20 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x22 [ ^ self readRegister: UcARM64Registers x22 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x23 [ ^ self readRegister: UcARM64Registers x23 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x23: anInteger [ self writeRegister: UcARM64Registers x23 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x24 [ ^ self readRegister: UcARM64Registers x24 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x24: anInteger [ self writeRegister: UcARM64Registers x24 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x25 [ ^ self readRegister: UcARM64Registers x25 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x25: anInteger [ self writeRegister: UcARM64Registers x25 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x28 [ ^ self readRegister: UcARM64Registers x28 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x28: anInteger [ self writeRegister: UcARM64Registers x28 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x29: anInteger [ ^ self writeRegister: UcARM64Registers x29 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x2: anInteger [ ^ self writeRegister: UcARM64Registers x2 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x3 [ ^ self readRegister: UcARM64Registers x3 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x30: anInteger [ self writeRegister: UcARM64Registers x30 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x3: anInteger [ ^ self writeRegister: UcARM64Registers x3 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x4 [ ^ self readRegister: UcARM64Registers x4 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x4: anInteger [ ^ self writeRegister: UcARM64Registers x4 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x5 [ ^ self readRegister: UcARM64Registers x5 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x5: anInteger [ ^ self writeRegister: UcARM64Registers x5 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x6 [ ^ self readRegister: UcARM64Registers x6 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x6: anInteger [ ^ self writeRegister: UcARM64Registers x6 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x7 [ ^ self readRegister: UcARM64Registers x7 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x7: anInteger [ ^ self writeRegister: UcARM64Registers x7 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x8 [ ^ self readRegister: UcARM64Registers x8 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x8: anInteger [ ^ self writeRegister: UcARM64Registers x8 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x9 [ ^ self readRegister: UcARM64Registers x9 ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> x9: anInteger [ ^ self writeRegister: UcARM64Registers x9 value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> xzr [ ^ self readRegister: UcARM64Registers xzr ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> xzr: anInteger [ ^ self writeRegister: UcARM64Registers xzr value: anInteger ] -{ #category : 'accessing-registers-physical' } +{ #category : #'accessing-registers-physical' } UnicornARMv8Simulator >> zero [ ^ (self nzcv bitAnd: (1<<30)) ~= 0 diff --git a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st index 539e97b80e..3130e440a5 100644 --- a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st @@ -1,193 +1,191 @@ Class { - #name : 'UnicornI386Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornI386Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> arg0Register [ ^ UcX86Registers esi ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> baseRegister [ ^ UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> cResultRegister [ ^ UcX86Registers eax ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg0 [ "Stack value 0 is return address" ^ self stackValueAt: 1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg1 [ "Stack value 0 is return address" ^ self stackValueAt: 2 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg2 [ "Stack value 0 is return address" ^ self stackValueAt: 3 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornI386Simulator >> carg3 [ "Stack value 0 is return address" ^ self stackValueAt: 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> classRegister [ ^ UcX86Registers ecx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> createUnicorn [ ^ Unicorn x86 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornI386Simulator >> disassembler [ ^ LLVMDisassembler i386 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> eax [ ^ self readRegister: UcX86Registers eax ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eax: anInteger [ self writeRegister: UcX86Registers eax value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ebp [ ^ self readRegister: UcX86Registers ebp ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ebp: anInteger [ self framePointerRegisterValue: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ebx [ ^ self readRegister: UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ebx: anInteger [ self writeRegister: UcX86Registers ebx value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> ecx [ ^ self readRegister: UcX86Registers ecx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> ecx: anInteger [ self writeRegister: UcX86Registers ecx value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> edi [ ^ self readRegister: UcX86Registers edi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> edi: anInteger [ self writeRegister: UcX86Registers edi value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> edx [ ^ self readRegister: UcX86Registers edx ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> edx: anInteger [ ^ self writeRegister: UcX86Registers edx value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eflags [ ^ self readRegister: UcX86Registers eflags ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> eip [ ^ self readRegister: UcX86Registers eip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> eip: anInteger [ self writeRegister: UcX86Registers eip value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> esi [ ^ self readRegister: UcX86Registers esi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> esi: anInteger [ self writeRegister: UcX86Registers esi value: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> esp [ ^ self readRegister: UcX86Registers esp ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> esp: anInteger [ self stackPointerRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -197,38 +195,38 @@ UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> framePointerRegister [ ^ UcX86Registers ebp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> hasLinkRegister [ ^ false ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> instructionPointerRegister [ ^ UcX86Registers eip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> integerRegisterState [ ^{ self eax. self ebx. self ecx. self edx. self esp. self ebp. self esi. self edi. self eip. self eflags } ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. On IA32 this typically means accessing stacked arguments @@ -239,31 +237,31 @@ UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ memory longAt: self ebp + i ] ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> receiverRegister [ ^ UcX86Registers edx ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> registerList [ ^ #(eip eax ebx ecx edx esp ebp esi edi) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> retpcIn: aMemory [ ^ memory longAt: self ebp + 4 ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers ebx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -275,21 +273,21 @@ UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ self eip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self eip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> simulateReturnIn: aMemory [ self ebp: self popWord. self eip: self popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(eax: ecx: edx:) withIndexDo: @@ -297,26 +295,26 @@ UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step i self perform: accessor with: index - 1 * step + base] ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> smashRegisterAccessors [ ^#(eax: ebx: ecx: edx: esi: edi:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> stackPointerRegister [ ^ UcX86Registers esp ] -{ #category : 'registers' } +{ #category : #registers } UnicornI386Simulator >> temporaryRegister [ "Assume SysV" ^ UcX86Registers eax ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornI386Simulator >> wordSize [ ^ 4 diff --git a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st index be91859d3a..8931a8e659 100644 --- a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st +++ b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st @@ -1,65 +1,63 @@ Class { - #name : 'UnicornInvalidMemoryAccess', - #superclass : 'Error', + #name : #UnicornInvalidMemoryAccess, + #superclass : #Error, #instVars : [ 'type', 'address', 'size', 'value' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> address [ ^ address ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> address: anObject [ address := anObject ] -{ #category : 'testing' } +{ #category : #testing } UnicornInvalidMemoryAccess >> isFetch [ ^ self type value anyMask: UcMemoryAccessType UC_MEM_FETCH value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> messageText [ ^ type item asString, ' at ', address hex ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> size [ ^ size ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> size: anObject [ size := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> type [ ^ type ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> type: anObject [ type := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> value [ ^ value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornInvalidMemoryAccess >> value: anObject [ value := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st index 43e7716bc9..474a23f736 100644 --- a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st @@ -1,106 +1,104 @@ Class { - #name : 'UnicornProcessor', - #superclass : 'Object', + #name : #UnicornProcessor, + #superclass : #Object, #instVars : [ 'machineSimulator' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> cResultRegister [ ^ machineSimulator cResultRegisterValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> cResultRegister: anInteger [ machineSimulator cResultRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> convertIntegerToInternal: anInteger [ ^ machineSimulator convertIntegerToInternal: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> convertInternalToInteger: anInteger [ ^ machineSimulator convertInternalToInteger: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> eax: anInteger [ machineSimulator eax: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ebp: anInteger [ machineSimulator ebp: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ebx: anInteger [ machineSimulator ebx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> ecx: anInteger [ machineSimulator ecx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> edi: anInteger [ machineSimulator edi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> edx: anInteger [ ^ machineSimulator edx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> esp: anInteger [ machineSimulator esp: anInteger ] -{ #category : 'caching' } +{ #category : #caching } UnicornProcessor >> flushICacheFrom: startAddress to: endAddress [ "Do nothing for now..." machineSimulator flushICacheFrom: startAddress to: endAddress ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> fp [ ^ machineSimulator framePointerRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> fp: aValue [ ^ machineSimulator framePointerRegisterValue: aValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> hasLinkRegister [ ^ machineSimulator hasLinkRegister ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> initializeStackFor: aCompiler [ "Initialize the machine code simulator" @@ -111,192 +109,192 @@ UnicornProcessor >> initializeStackFor: aCompiler [ aCompiler backend configureStackAlignment ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> integerRegisterState [ ^ machineSimulator integerRegisterState ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> linkRegisterValue [ ^ machineSimulator linkRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> lr: anInteger [ machineSimulator lr: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> machineSimulator [ ^ machineSimulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> machineSimulator: aMachineSimulator [ machineSimulator := aMachineSimulator ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> pc [ ^ machineSimulator instructionPointerRegisterValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> pc: anInteger [ ^ machineSimulator instructionPointerRegisterValue: anInteger ] -{ #category : 'stack-management' } +{ #category : #'stack-management' } UnicornProcessor >> popWord [ ^ machineSimulator popWord ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory [ ^ machineSimulator postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory ] -{ #category : 'stack-management' } +{ #category : #'stack-management' } UnicornProcessor >> pushWord: anInteger [ machineSimulator pushWord: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r0: anInteger [ ^ machineSimulator r0: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r10: anInteger [ machineSimulator r10: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r11: anInteger [ machineSimulator r11: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r1: anInteger [ ^ machineSimulator r1: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r2: anInteger [ machineSimulator r2: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r3: anInteger [ machineSimulator r3: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r4: anInteger [ machineSimulator r4: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r5: anInteger [ machineSimulator r5: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r6: anInteger [ machineSimulator r6: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r8 [ ^ machineSimulator r8 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> r8: anInteger [ machineSimulator r8: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r9: anInteger [ machineSimulator r9: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> r9b: anInteger [ machineSimulator r9b: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rax: anInteger [ machineSimulator rax: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rbp: anInteger [ machineSimulator rbp: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rcx: anInteger [ machineSimulator rcx: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> rdi: anInteger [ machineSimulator rdi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rdx: anInteger [ machineSimulator rdx: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> retpcIn: aSpurSimulatedMemory [ ^ machineSimulator retpcIn: aSpurSimulatedMemory ] -{ #category : 'accessing registers' } +{ #category : #'accessing registers' } UnicornProcessor >> rsi: anInteger [ ^ machineSimulator rsi: anInteger ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> rsp: anInteger [ machineSimulator rsp: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnlyBelow: minimumWritableAddress [ @@ -306,7 +304,7 @@ UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnly count: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> runUntil: anAddress [ ^ machineSimulator startAt: machineSimulator instructionPointerRegisterValue @@ -315,165 +313,165 @@ UnicornProcessor >> runUntil: anAddress [ count: 0 ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornProcessor >> setFramePointer: framePointer stackPointer: stackPointer [ machineSimulator framePointerRegisterValue: framePointer. machineSimulator stackPointerRegisterValue: stackPointer ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory [ machineSimulator simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ machineSimulator simulateLeafCallOf: address nextpc: nextpc memory: aMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> simulateReturnIn: aSpurSimulatedMemory [ ^ machineSimulator simulateReturnIn: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory [ machineSimulator smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> smashRegistersWithValuesFrom: base by: step [ machineSimulator smashRegistersWithValuesFrom: base by: step ] -{ #category : 'registers' } +{ #category : #registers } UnicornProcessor >> sp [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> sp: anInteger [ machineSimulator stackPointerRegisterValue: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> w25: anInteger [ machineSimulator w25: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> w6: anInteger [ machineSimulator w6: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x12: anInteger [ machineSimulator x12: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x16: anInteger [ machineSimulator x16: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x19: anInteger [ machineSimulator x19: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x1: anInteger [ machineSimulator x1: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x23: anInteger [ machineSimulator x23: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x24: anInteger [ machineSimulator x24: anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornProcessor >> x25: anInteger [ machineSimulator x25: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x28: anInteger [ machineSimulator x28: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x29: anInteger [ machineSimulator x29: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x30: anInteger [ machineSimulator x30: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x3: anInteger [ machineSimulator x3: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x4: anInteger [ machineSimulator x4: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x5: anInteger [ machineSimulator x5: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x6: anInteger [ machineSimulator x6: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> x7: anInteger [ machineSimulator x7: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> xzr [ ^ machineSimulator xzr ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornProcessor >> xzr: anInteger [ machineSimulator xzr: anInteger diff --git a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st index 2895ec60c8..c65b477cae 100644 --- a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st @@ -1,66 +1,64 @@ Class { - #name : 'UnicornRISCVSimulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornRISCVSimulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> arg0Register [ ^ UcRISCVRegisters x10 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> arg1Register [ ^ UcRISCVRegisters x11 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> baseRegister [ ^ UcRISCVRegisters x26 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> cResultRegister [ ^ UcRISCVRegisters x12 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg0Register [ ^ UcRISCVRegisters x12 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg1Register [ ^ UcRISCVRegisters x13 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg2Register [ ^ UcRISCVRegisters x14 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> carg3Register [ ^ UcRISCVRegisters x15 ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> classRegister [ ^ UcRISCVRegisters x23 ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornRISCVSimulator >> createUnicorn [ simulator := Unicorn riscv64. @@ -69,290 +67,290 @@ UnicornRISCVSimulator >> createUnicorn [ ^ simulator ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> disassembler [ ^ LLVMRV64Disassembler riscv64 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister0 [ ^ UcRISCVRegisters f0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister1 [ ^ UcRISCVRegisters f1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister2 [ ^ UcRISCVRegisters f2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f0 [ ^ self readRegister: UcRISCVRegisters f0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f1 [ ^ self readRegister: UcRISCVRegisters f1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f10 [ ^ self readRegister: UcRISCVRegisters f10 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f11 [ ^ self readRegister: UcRISCVRegisters f11 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f12 [ ^ self readRegister: UcRISCVRegisters f12 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f13 [ ^ self readRegister: UcRISCVRegisters f13 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f14 [ ^ self readRegister: UcRISCVRegisters f14 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f15 [ ^ self readRegister: UcRISCVRegisters f15 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f16 [ ^ self readRegister: UcRISCVRegisters f16 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f17 [ ^ self readRegister: UcRISCVRegisters f17 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f18 [ ^ self readRegister: UcRISCVRegisters f18 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f19 [ ^ self readRegister: UcRISCVRegisters f19 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f2 [ ^ self readRegister: UcRISCVRegisters f2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f20 [ ^ self readRegister: UcRISCVRegisters f20 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f21 [ ^ self readRegister: UcRISCVRegisters f21 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f22 [ ^ self readRegister: UcRISCVRegisters f22 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f23 [ ^ self readRegister: UcRISCVRegisters f23 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f24 [ ^ self readRegister: UcRISCVRegisters f24 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f25 [ ^ self readRegister: UcRISCVRegisters f25 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f26 [ ^ self readRegister: UcRISCVRegisters f26 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f27 [ ^ self readRegister: UcRISCVRegisters f27 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f28 [ ^ self readRegister: UcRISCVRegisters f28 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f29 [ ^ self readRegister: UcRISCVRegisters f29 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f3 [ ^ self readRegister: UcRISCVRegisters f3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f30 [ ^ self readRegister: UcRISCVRegisters f30 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f31 [ ^ self readRegister: UcRISCVRegisters f31 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f4 [ ^ self readRegister: UcRISCVRegisters f4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f5 [ ^ self readRegister: UcRISCVRegisters f5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f6 [ ^ self readRegister: UcRISCVRegisters f6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f7 [ ^ self readRegister: UcRISCVRegisters f7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f8 [ ^ self readRegister: UcRISCVRegisters f8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> f9 [ ^ self readRegister: UcRISCVRegisters f9 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagCarryRegister [ ^ UcRISCVRegisters x31 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagCarryRegisterValue [ ^ self readRegister: self flagCarryRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegister [ ^ UcRISCVRegisters x30 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegisterValue [ ^ self readRegister: self flagOverflowRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagSignRegister [ ^ UcRISCVRegisters x29 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagSignRegisterValue [ ^ self readRegister: self flagSignRegister ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagZeroRegister [ ^ UcRISCVRegisters x28 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> flagZeroRegisterValue [ ^ self readRegister: self flagZeroRegister ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> framePointerRegister [ "Frame Pointer" ^ UcRISCVRegisters x8 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : 'testing' } +{ #category : #testing } UnicornRISCVSimulator >> hasLinkRegister [ ^ true ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> initializeRegisterAliases [ registerAliases @@ -398,7 +396,7 @@ UnicornRISCVSimulator >> initializeRegisterAliases [ at: #f7 put: #ft7 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ registerSmalltalkAliases @@ -427,43 +425,43 @@ UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ at: #x31 put: #carry ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> instructionPointerRegister [ ^ UcRISCVRegisters pc ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornRISCVSimulator >> linkRegister [ ^ UcRISCVRegisters x1 ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatus [ ^ UcRISCVRegisters mstatus ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue [ ^ self readRegister: self mstatus ] -{ #category : 'c calling convention' } +{ #category : #'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue: aValue [ ^ self writeRegister: self mstatus value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> receiverRegister [ ^ UcRISCVRegisters x24 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRISCVSimulator >> registerList [ ^ #(lr pc sp fp @@ -472,375 +470,375 @@ UnicornRISCVSimulator >> registerList [ f0 f1 f2 f3 f4 f5 f6 f7) ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s0 [ ^ self readRegister: UcRISCVRegisters s0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s0: aValue [ ^ self writeRegister: UcRISCVRegisters s0 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s2 [ ^ self readRegister: UcRISCVRegisters s2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s2: aValue [ ^ self writeRegister: UcRISCVRegisters s2 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s7 [ ^ self readRegister: UcRISCVRegisters s7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s7: aValue [ ^ self writeRegister: UcRISCVRegisters s7 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s8 [ ^ self readRegister: UcRISCVRegisters s8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s8: aValue [ ^ self writeRegister: UcRISCVRegisters s8 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s9 [ ^ self readRegister: UcRISCVRegisters s9 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> s9: aValue [ ^ self writeRegister: UcRISCVRegisters s9 value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> sendNumberOfArgumentsRegister [ ^ UcRISCVRegisters x25 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornRISCVSimulator >> simulateLeafCallOf: destinationAddress nextpc: returnAddress memory: anUndefinedObject [ self linkRegisterValue: returnAddress. self instructionPointerRegisterValue: destinationAddress ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x1: x5: x6: x7: x10: x11: x12: x13: x14: x15: x16: x17: x28: x29: x30: x31:) ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> stackPointerRegister [ ^ UcRISCVRegisters x2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t0 [ ^ self readRegister: UcRISCVRegisters t0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t0: aValue [ ^ self writeRegister: UcRISCVRegisters t0 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t1 [ ^ self readRegister: UcRISCVRegisters t1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t1: aValue [ ^ self writeRegister: UcRISCVRegisters t1 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t2 [ ^ self readRegister: UcRISCVRegisters t2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t2: aValue [ ^ self writeRegister: UcRISCVRegisters t2 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t3 [ ^ self readRegister: UcRISCVRegisters t3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t3: aValue [ ^ self writeRegister: UcRISCVRegisters t3 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t4 [ ^ self readRegister: UcRISCVRegisters t4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t4: aValue [ ^ self writeRegister: UcRISCVRegisters t4 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t5 [ ^ self readRegister: UcRISCVRegisters t5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t5: aValue [ ^ self writeRegister: UcRISCVRegisters t5 value: aValue ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t6 [ ^ self readRegister: UcRISCVRegisters t6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> t6: aValue [ ^ self writeRegister: UcRISCVRegisters t6 value: aValue ] -{ #category : 'registers' } +{ #category : #registers } UnicornRISCVSimulator >> temporaryRegister [ ^ UcRISCVRegisters x22 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRISCVSimulator >> wordSize [ ^ 8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x0 [ ^ self readRegister: UcRISCVRegisters x0 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x1 [ ^ self readRegister: UcRISCVRegisters x1 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x10 [ ^ self readRegister: UcRISCVRegisters x10 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x11 [ ^ self readRegister: UcRISCVRegisters x11 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x12 [ ^ self readRegister: UcRISCVRegisters x12 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x13 [ ^ self readRegister: UcRISCVRegisters x13 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x14 [ ^ self readRegister: UcRISCVRegisters x14 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x15 [ ^ self readRegister: UcRISCVRegisters x15 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x16 [ ^ self readRegister: UcRISCVRegisters x16 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x17 [ ^ self readRegister: UcRISCVRegisters x17 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x18 [ ^ self readRegister: UcRISCVRegisters x18 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x19 [ ^ self readRegister: UcRISCVRegisters x19 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x2 [ ^ self readRegister: UcRISCVRegisters x2 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x20 [ ^ self readRegister: UcRISCVRegisters x20 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x21 [ ^ self readRegister: UcRISCVRegisters x21 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x22 [ ^ self readRegister: UcRISCVRegisters x22 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x23 [ ^ self readRegister: UcRISCVRegisters x23 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x24 [ ^ self readRegister: UcRISCVRegisters x24 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x25 [ ^ self readRegister: UcRISCVRegisters x25 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x26 [ ^ self readRegister: UcRISCVRegisters x26 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x27 [ ^ self readRegister: UcRISCVRegisters x27 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x28 [ ^ self readRegister: UcRISCVRegisters x28 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x29 [ ^ self readRegister: UcRISCVRegisters x29 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x3 [ ^ self readRegister: UcRISCVRegisters x3 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x30 [ ^ self readRegister: UcRISCVRegisters x30 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x31 [ ^ self readRegister: UcRISCVRegisters x31 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x4 [ ^ self readRegister: UcRISCVRegisters x4 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x5 [ ^ self readRegister: UcRISCVRegisters x5 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x6 [ ^ self readRegister: UcRISCVRegisters x6 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x7 [ ^ self readRegister: UcRISCVRegisters x7 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x8 [ ^ self readRegister: UcRISCVRegisters x8 ] -{ #category : 'machine registers' } +{ #category : #'machine registers' } UnicornRISCVSimulator >> x9 [ ^ self readRegister: UcRISCVRegisters x9 diff --git a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st index 401ef8c3e9..4302fb7c83 100644 --- a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st @@ -1,50 +1,48 @@ Class { - #name : 'UnicornRegisterDescriptor', - #superclass : 'Object', + #name : #UnicornRegisterDescriptor, + #superclass : #Object, #instVars : [ 'simulator', 'name', 'alias' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> alias [ ^ alias ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> name [ ^ name ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -54,23 +52,23 @@ UnicornRegisterDescriptor >> printOn: aStream [ ] -{ #category : 'actions' } +{ #category : #actions } UnicornRegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornRegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st index cd421437e1..0b5790d901 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st @@ -1,16 +1,14 @@ Class { - #name : 'UnicornSimulationTrap', - #superclass : 'Object', + #name : #UnicornSimulationTrap, + #superclass : #Object, #instVars : [ 'unicornInvalidAccess', 'simulator' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemoryAccess [ ^ self new @@ -19,13 +17,13 @@ UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemor yourself ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> address [ ^ unicornInvalidAccess address ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> nextpc [ | instruction | @@ -33,7 +31,7 @@ UnicornSimulationTrap >> nextpc [ ^ self simulator instructionPointerRegisterValue + instruction size ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> registerAccessor [ "Assume this is a read of a value into a register" @@ -46,18 +44,18 @@ UnicornSimulationTrap >> registerAccessor [ ^ (registerName , ':') asSymbol ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> simulator [ ^ simulator ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> simulator: anObject [ simulator := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> type [ unicornInvalidAccess type = UcMemoryAccessType UC_MEM_WRITE_UNMAPPED @@ -70,12 +68,12 @@ UnicornSimulationTrap >> type [ self halt ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> unicornInvalidAccess: anUnicornInvalidMemoryAccess [ unicornInvalidAccess := anUnicornInvalidMemoryAccess ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornSimulationTrap >> writtenValue [ "This is the value that was tried to be written but failed (if this is a failed write)" ^ unicornInvalidAccess value diff --git a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st index fc5d4a2eff..c8194d7391 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st @@ -1,28 +1,26 @@ Class { - #name : 'UnicornSimulator', - #superclass : 'ProcessorSimulator', + #name : #UnicornSimulator, + #superclass : #ProcessorSimulator, #instVars : [ 'stopReason', 'invalidAccessHandler' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } UnicornSimulator class >> supportsISA: isa [ ^ #( #ARMv5 #ARMv8 #IA32 #X64 #aarch64 #riscv64 ) includes: isa ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> createUnicorn [ self subclassResponsibility ] -{ #category : 'executing' } +{ #category : #executing } UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | result error startTime currentTime remainingTimeout remainingCount | @@ -73,13 +71,13 @@ UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: ifTrue: [ ^ result ]] ] -{ #category : 'stack-access' } +{ #category : #'stack-access' } UnicornSimulator >> finishMappingMemory [ "Do nothing in the case of Unicorn, is useful if the simulator used has to map memory by hand" ] -{ #category : 'handling invalid accesses' } +{ #category : #'handling invalid accesses' } UnicornSimulator >> handleInvalidAccess: invalidAccess [ | previousInstructionPointer hasToContinue | @@ -97,7 +95,7 @@ UnicornSimulator >> handleInvalidAccess: invalidAccess [ ^ hasToContinue ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> initialize [ super initialize. @@ -112,7 +110,7 @@ UnicornSimulator >> initialize [ true] ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> initializeUnicorn [ simulator @@ -128,12 +126,12 @@ UnicornSimulator >> initializeUnicorn [ false ] ] -{ #category : 'handling invalid accesses' } +{ #category : #'handling invalid accesses' } UnicornSimulator >> invalidAccessHandler: aFullBlockClosure [ invalidAccessHandler := aFullBlockClosure ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ simulator @@ -142,7 +140,7 @@ UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ address = anAddress ifTrue: [ aBlock value ] ] ] -{ #category : 'executing' } +{ #category : #executing } UnicornSimulator >> startAt: begin until: until timeout: timeout count: count [ ^ self doStartAt: begin until: until timeout: timeout count: count. diff --git a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st index e070ae5e0a..12be3bf4bf 100644 --- a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st +++ b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st @@ -1,20 +1,18 @@ Class { - #name : 'UnicornTimeout', - #superclass : 'Error', + #name : #UnicornTimeout, + #superclass : #Error, #instVars : [ 'target' ], - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #category : #'VMMakerTests-Unicorn' } -{ #category : 'accessing' } +{ #category : #accessing } UnicornTimeout >> target [ ^ target ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornTimeout >> target: anObject [ target := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st index 4dfd2f5b9d..d7176e7d9a 100644 --- a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st @@ -1,100 +1,98 @@ Class { - #name : 'UnicornX64Simulator', - #superclass : 'UnicornSimulator', - #category : 'VMMakerTests-Unicorn', - #package : 'VMMakerTests', - #tag : 'Unicorn' + #name : #UnicornX64Simulator, + #superclass : #UnicornSimulator, + #category : #'VMMakerTests-Unicorn' } -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> arg0Register [ ^ UcX86Registers rdi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> arg1Register [ ^ UcX86Registers rsi ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> baseRegister [ ^ UcX86Registers rbx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> cResultRegister [ ^ UcX86Registers rax ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg0Register [ "Assume SysV" ^ UcX86Registers rdi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg1Register [ "Assume SysV" ^ UcX86Registers rsi ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg2Register [ "Assume SysV" ^ UcX86Registers rdx ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> carg3Register [ "Assume SysV" ^ UcX86Registers rcx ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> classRegister [ ^ UcX86Registers rcx ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> createUnicorn [ ^ Unicorn x8664 ] -{ #category : 'disassembling' } +{ #category : #disassembling } UnicornX64Simulator >> disassembler [ ^ LLVMDisassembler amd64 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcX86Registers xmm1 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcX86Registers xmm2 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -104,25 +102,25 @@ UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> framePointerRegister [ ^ UcX86Registers rbp ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : 'testing' } +{ #category : #testing } UnicornX64Simulator >> hasLinkRegister [ ^ false ] -{ #category : 'initialization' } +{ #category : #initialization } UnicornX64Simulator >> initializeRegisterAliases [ registerAliases @@ -133,19 +131,19 @@ UnicornX64Simulator >> initializeRegisterAliases [ at: #rbp put: #framePointerRegister ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> instructionPointerRegister [ ^ UcX86Registers rip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> integerRegisterState [ ^ #() ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a Win64 or SysV ABI call. On X64 this simply means accessing register arguments. @@ -160,266 +158,266 @@ UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ self perform: getter] ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r10 [ ^ self readRegister: UcX86Registers r10 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r10: anInteger [ ^ self writeRegister: UcX86Registers r10 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r11 [ ^ self readRegister: UcX86Registers r11 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r11: anInteger [ ^ self writeRegister: UcX86Registers r11 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r12 [ ^ self readRegister: UcX86Registers r12 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r12: anInteger [ ^ self writeRegister: UcX86Registers r12 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r13: anInteger [ self writeRegister: UcX86Registers r13 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r14: anInteger [ self writeRegister: UcX86Registers r14 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r15: anInteger [ self writeRegister: UcX86Registers r15 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r1: anInteger [ ^ self writeRegister: UcX86Registers r1 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r2: anInteger [ ^ self writeRegister: UcX86Registers r2 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r3: anInteger [ ^ self writeRegister: UcX86Registers r3 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r4: anInteger [ ^ self writeRegister: UcX86Registers r4 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r5: anInteger [ ^ self writeRegister: UcX86Registers r5 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r6: anInteger [ ^ self writeRegister: UcX86Registers r6 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r7: anInteger [ ^ self writeRegister: UcX86Registers r7 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r8 [ ^ self readRegister: UcX86Registers r8 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r8: anInteger [ ^ self writeRegister: UcX86Registers r8 value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> r9 [ ^ self readRegister: UcX86Registers r9 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r9: anInteger [ ^ self writeRegister: UcX86Registers r9 value: anInteger ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> r9b: anInteger [ self writeRegister: UcX86Registers r9b value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rax [ ^ self readRegister: UcX86Registers rax ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rax: anInteger [ self writeRegister: UcX86Registers rax value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbp [ ^ self readRegister: UcX86Registers rbp ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbp: anInteger [ ^ self writeRegister: UcX86Registers rbp value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbx [ ^ self readRegister: UcX86Registers rbx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rbx: aValue [ ^ self writeRegister: UcX86Registers rbx value: aValue ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rcx [ ^ self readRegister: UcX86Registers rcx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rcx: anInteger [ ^ self writeRegister: UcX86Registers rcx value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdi [ ^ self readRegister: UcX86Registers rdi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rdi: anInteger [ self writeRegister: UcX86Registers rdi value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdx [ ^ self readRegister: UcX86Registers rdx ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rdx: anInteger [ ^ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> receiverRegister [ ^ UcX86Registers rdx ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> registerList [ ^ #(rip rax rbx rcx rdx rsp rbp r8 r9 r10 r11 r12 rsi rdi) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> retpcIn: aSpurSimulatedMemory [ ^ memory long64At: self rbp + 8 ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rip [ ^ self readRegister: UcX86Registers rip ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rip: anInteger [ self writeRegister: UcX86Registers rip value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsi [ ^ self readRegister: UcX86Registers rsi ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> rsi: anInteger [ self writeRegister: UcX86Registers rsi value: anInteger ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsp [ ^ self readRegister: UcX86Registers rsp ] -{ #category : 'phisical-registers' } +{ #category : #'phisical-registers' } UnicornX64Simulator >> rsp: anInteger [ ^ self writeRegister: UcX86Registers rsp value: anInteger ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers r9 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -439,21 +437,21 @@ UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ self rip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self rip: address ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> simulateReturnIn: aMemory [ self rbp: (self popWord). self rip: (self popWord) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ | volatileRegisters | CogX64Compiler isSysV @@ -471,50 +469,50 @@ UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in self perform: setter with: index - 1 * step + base] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } UnicornX64Simulator >> smashRegisterAccessors [ ^#(rax: rbx: rcx: rdx: rsi: rdi: r8: r9: r10: r11: r12: r13: r14: r15:) ] -{ #category : 'virtual-registers' } +{ #category : #'virtual-registers' } UnicornX64Simulator >> stackPointerRegister [ ^ UcX86Registers rsp ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> temporaryRegister [ "Both in System V and Windows" ^ UcX86Registers rax ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> wordSize [ ^ 8 ] -{ #category : 'accessing - registers' } +{ #category : #'accessing - registers' } UnicornX64Simulator >> xmm0 [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : 'accessing' } +{ #category : #accessing } UnicornX64Simulator >> xmm1 [ ^ simulator readRegisterId: UcX86Registers xmm1 size: 16 ] -{ #category : 'registers' } +{ #category : #registers } UnicornX64Simulator >> xmm2 [ ^ simulator readRegisterId: UcX86Registers xmm2 size: 16 diff --git a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st index 386f10c484..a4cd67ccdf 100644 --- a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMARMStackAlignmentTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMARMStackAlignmentTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'instructions' ], #pools : [ 'CogAbstractRegisters' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMStackAlignmentTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -20,25 +18,25 @@ VMARMStackAlignmentTest class >> wordSizeParameters [ yourself ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> addInstruction: anInstruction [ instructions add: anInstruction ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> disassembleInstructions [ ^ self disassembleFrom: cogInitialAddress opcodes: instructions size ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> runInstructions [ ^ self runFrom: cogInitialAddress until: cogInitialAddress + (instructions size * 4) ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> setUp [ super setUp. @@ -47,7 +45,7 @@ VMARMStackAlignmentTest >> setUp [ machineSimulator stackPointerRegisterValue: interpreter rumpCStackAddress ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ "To start the stack pointer should be aligned" @@ -98,7 +96,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ equals: 'Unhandled CPU exception (UC_ERR_EXCEPTION)' ] ] -{ #category : 'tests' } +{ #category : #tests } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ "To start the stack pointer should be aligned" @@ -137,7 +135,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMARMStackAlignmentTest >> writeInstructions [ cogInitialAddress := cogit methodZone allocate: instructions size * 4 . diff --git a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st index 522508bad7..82faa50100 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMARMV8SIMDEncodingTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMARMV8SIMDEncodingTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMV8SIMDEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -14,7 +12,7 @@ VMARMV8SIMDEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> armInstructionAt: index [ | addr inst | @@ -24,20 +22,20 @@ VMARMV8SIMDEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : 'configuration' } +{ #category : #configuration } VMARMV8SIMDEncodingTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : 'accessing' } +{ #category : #accessing } VMARMV8SIMDEncodingTest >> initializationOptions [ ^ super initializationOptions , { #ProcessorClass . DummyProcessor } ] -{ #category : 'accessing' } +{ #category : #accessing } VMARMV8SIMDEncodingTest >> jitOptions [ ^ super jitOptions @@ -46,7 +44,7 @@ VMARMV8SIMDEncodingTest >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ self compile: [ cogit DupS: 64 R: 3 Vr: 0 ]. @@ -56,7 +54,7 @@ VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ equals: 'dup v0.2d, x3' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ self compile: [ cogit FaddS: 32 Rv: 0 Rv: 1 Rv: 2 ]. @@ -66,7 +64,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ equals: 'fadd v2.4s, v0.4s, v1.4s' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ self compile: [ cogit FaddS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -76,7 +74,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ equals: 'fadd v2.2d, v0.2d, v1.2d' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ self compile: [ cogit FsubS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -86,7 +84,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ equals: 'fsub v2.2d, v0.2d, v1.2d' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -96,7 +94,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.4s }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -106,7 +104,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.2d }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 0 ]. @@ -116,7 +114,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ equals: 'ld1 { v0.2d }, [x1]' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -126,7 +124,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.4s }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -136,7 +134,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.2d }, [x1], #16' ] -{ #category : 'tests' } +{ #category : #tests } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 0 ]. diff --git a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st index 50b7051a80..ff35f32f94 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMARMV8SpecificEncodingTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMARMV8SpecificEncodingTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMARMV8SpecificEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -14,7 +12,7 @@ VMARMV8SpecificEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> armInstructionAt: index [ | addr inst | @@ -24,7 +22,7 @@ VMARMV8SpecificEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ | expectedAddress expectedValue | @@ -48,7 +46,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ | expectedAddress expectedValue | @@ -72,7 +70,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ | expectedAddress expectedValue | @@ -94,7 +92,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ | constant | @@ -110,7 +108,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ | negativeConstant12Bits | @@ -125,7 +123,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstant [ | negativeConstant12Bits | @@ -140,7 +138,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstant [ | negativeConstant12Bits | @@ -155,7 +153,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ | negativeConstant12Bits | @@ -170,7 +168,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ | positiveConstant12Bits | @@ -185,7 +183,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ | positiveConstant12Bits | @@ -200,7 +198,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstant [ | positiveConstant12Bits | @@ -215,7 +213,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstant [ | positiveConstant12Bits | @@ -230,7 +228,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstan self assert: machineSimulator zero ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ @@ -245,7 +243,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ @@ -260,7 +258,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ @@ -277,7 +275,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ self assert: machineSimulator x24 hex equals: completementValue hex ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ self doTestEncodeMoveMbrR: -256. @@ -285,7 +283,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMbrR: -1024. @@ -293,7 +291,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ self doTestEncodeMoveMbrR: 255. @@ -301,7 +299,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ ] -{ #category : 'tests - MoveMbrR' } +{ #category : #'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMbrR: 1024. @@ -309,35 +307,35 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegative9BitConstant [ self doTestEncodeMoveMwrR: -256 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMwrR: -20056 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositive12BitConstant [ self doTestEncodeMoveMwrR: 16r100 ] -{ #category : 'tests - MoveMwrR' } +{ #category : #'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMwrR: 20056 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ self doTestEncodeMoveRMwr: -256. @@ -348,28 +346,28 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ equals: 'stur x23, [x3, #-256]' ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitButShiftableConstant [ self doTestEncodeMoveRMwr: 512 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitNegativeConstant [ self doTestEncodeMoveRMwr: -61440 ] -{ #category : 'tests - MoveRMwr' } +{ #category : #'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithPositive9BitConstant [ self doTestEncodeMoveRMwr: 256 ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self compile: [ @@ -381,7 +379,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self assert: machineSimulator receiverRegisterValue equals: 16r1FF ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self compile: [ @@ -393,7 +391,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self assert: machineSimulator receiverRegisterValue equals: (67108865 bitOr: 16r100) ] -{ #category : 'tests - cmpCqR' } +{ #category : #'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithNonEncodableConstant [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st index c7defd272a..e712546ea2 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMAbstractBuilder', - #superclass : 'Object', + #name : #VMAbstractBuilder, + #superclass : #Object, #instVars : [ 'interpreter', 'memory' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ "convinience method to put an oop at a specific place No need to take care of the size of the collection, I'm taking care of it!" @@ -22,22 +20,22 @@ VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> interpreter [ ^ interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> interpreter: anObject [ interpreter := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> memory [ ^ memory ] -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractBuilder >> memory: anObject [ memory := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st index afe2f98aa3..4b0874a231 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st @@ -1,14 +1,13 @@ Class { - #name : 'VMAbstractFFITest', - #superclass : 'VMAbstractPrimitiveTest', + #name : #VMAbstractFFITest, + #superclass : #VMAbstractPrimitiveTest, #pools : [ 'LibFFIConstants' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argumentTypes withReturnType: returnType [ | functionAddress tfExternalFunction functionExternalAddress tfFunctionDefinition cif cifExternalAddress | @@ -32,7 +31,7 @@ VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argume ^ tfExternalFunction ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ ^ self @@ -41,7 +40,7 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ withReturnType: interpreter libFFI float ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTypes: argumentTypes [ ^ self @@ -50,20 +49,20 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTy withReturnType: interpreter libFFI float ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_FFI . true } ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> interpreterClass [ ^ VMTestMockInterpreter ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> newExternalAddress: anInteger [ | anExternalAddress | @@ -76,7 +75,7 @@ VMAbstractFFITest >> newExternalAddress: anInteger [ ^ anExternalAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMAbstractFFITest >> readyProcesses [ | collection | @@ -85,7 +84,7 @@ VMAbstractFFITest >> readyProcesses [ ^ collection ] -{ #category : 'initialization' } +{ #category : #initialization } VMAbstractFFITest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st index f1fa371973..68609896f2 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st @@ -1,42 +1,40 @@ Class { - #name : 'VMAbstractImageFormatTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMAbstractImageFormatTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'imageReader', 'imageReaderClass', 'imageWriterClass' ], - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'accessing' } +{ #category : #accessing } VMAbstractImageFormatTest >> defaultTimeLimit [ ^ 30 seconds ] -{ #category : 'tests' } +{ #category : #tests } VMAbstractImageFormatTest >> imageFileName [ ^ 'lala.image' ] -{ #category : 'tests' } +{ #category : #tests } VMAbstractImageFormatTest >> readHeader [ ^ imageReader readHeaderFromImage: self imageFileName ] -{ #category : 'actions' } +{ #category : #actions } VMAbstractImageFormatTest >> saveImage [ interpreter writeImageFileIO. ] -{ #category : 'running' } +{ #category : #running } VMAbstractImageFormatTest >> setUp [ super setUp. @@ -62,7 +60,7 @@ VMAbstractImageFormatTest >> setUp [ ] -{ #category : 'ston' } +{ #category : #ston } VMAbstractImageFormatTest >> stonPretty: anObject [ ^ String streamContents: [ :s | @@ -73,7 +71,7 @@ VMAbstractImageFormatTest >> stonPretty: anObject [ ] ] -{ #category : 'running' } +{ #category : #running } VMAbstractImageFormatTest >> tearDown [ self imageFileName asFileReference ensureDeleteAll. diff --git a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st index 9657b0b0bd..11812a06b3 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st @@ -1,17 +1,16 @@ Class { - #name : 'VMAbstractPrimitiveTest', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMAbstractPrimitiveTest, + #superclass : #VMSpurMemoryManagerTest, #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ | aProcess | @@ -24,7 +23,7 @@ VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ ^ aProcess ] -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPriority [ | suspendedContext aProcess | @@ -46,7 +45,7 @@ VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPrior ^ aProcess ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMAbstractPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -57,7 +56,7 @@ VMAbstractPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ ^ methodBuilder @@ -66,7 +65,7 @@ VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ buildMethod ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -115,7 +114,7 @@ VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : 'running' } +{ #category : #running } VMAbstractPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" diff --git a/smalltalksrc/VMMakerTests/VMBlockTest.class.st b/smalltalksrc/VMMakerTests/VMBlockTest.class.st index 8481eab72c..b257001c87 100644 --- a/smalltalksrc/VMMakerTests/VMBlockTest.class.st +++ b/smalltalksrc/VMMakerTests/VMBlockTest.class.st @@ -1,26 +1,24 @@ Class { - #name : 'VMBlockTest', - #superclass : 'VMInterpreterTests', + #name : #VMBlockTest, + #superclass : #VMInterpreterTests, #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> anEmptyMethod [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> evaluatingABlock [ [^1] value ] -{ #category : 'helpers' } +{ #category : #helpers } VMBlockTest >> installFullBlockClosureClass [ | aClass | aClass := self @@ -34,14 +32,14 @@ VMBlockTest >> installFullBlockClosureClass [ withValue: aClass ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodReturningABlock [ ^ [] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ true ifTrue: [ @@ -50,14 +48,14 @@ VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ ^ [ anArgument ] ] ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodReturningABlockWithTwoArguments [ ^ [:a :b] ] -{ #category : 'supports' } +{ #category : #supports } VMBlockTest >> methodWithLocalReturningABlock [ | a | @@ -65,14 +63,14 @@ VMBlockTest >> methodWithLocalReturningABlock [ ^ [ a ] ] -{ #category : 'running' } +{ #category : #running } VMBlockTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testCreatingABlockCapturesReceiver [ | methodReturning initialMethod | @@ -97,7 +95,7 @@ VMBlockTest >> testCreatingABlockCapturesReceiver [ self assert: (memory fetchPointer: FullClosureReceiverIndex ofObject: interpreter stackTop) equals: memory trueObject ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ | methodReturning initialMethod placeTakenByLiterals closure blockInitialPC compiledBlock | @@ -134,7 +132,7 @@ VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ | methodReturning initialMethod | @@ -161,7 +159,7 @@ VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ assert: (memory fetchPointer: FullClosureFirstCopiedValueIndex ofObject: interpreter stackTop) equals: (memory integerObjectOf: 2) ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ | methodReturning initialMethod | @@ -190,7 +188,7 @@ VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ self assert: (interpreter isWidowedContext: (memory outerContextOf: interpreter stackTop)) ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable [ | methodReturning initialMethod | @@ -217,7 +215,7 @@ VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ | methodReturning initialMethod | @@ -244,7 +242,7 @@ VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMBlockTest >> testEvaluatingABlock [ | methodReturning initialMethod | @@ -276,7 +274,7 @@ VMBlockTest >> testEvaluatingABlock [ equals: (memory classAtIndex: ClassFullBlockClosureCompactIndex) ] -{ #category : 'testing' } +{ #category : #testing } VMBlockTest >> testPushClosureBytecodePushesClosure [ | methodReturning initialMethod | diff --git a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st index 459f61526b..1fea546beb 100644 --- a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMByteCodesTest', - #superclass : 'VMInterpreterTests', + #name : #VMByteCodesTest, + #superclass : #VMInterpreterTests, #instVars : [ 'contextOop', 'context', 'callingFrame', 'topFrame' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -23,7 +21,7 @@ VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ self assert: (interpreter temporary: anIndex in: interpreter framePointer) equals: anOop ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock pushed: anOop [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -35,7 +33,7 @@ VMByteCodesTest >> assert: aBlock pushed: anOop [ ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assert: aBlock returned: anOop [ | callerSP | callerSP := interpreter frameCallerSP: interpreter framePointer. @@ -47,7 +45,7 @@ VMByteCodesTest >> assert: aBlock returned: anOop [ ] -{ #category : 'helper-assertions' } +{ #category : #'helper-assertions' } VMByteCodesTest >> assertPopped: aBlock [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -58,24 +56,24 @@ VMByteCodesTest >> assertPopped: aBlock [ ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> firstPushTemporaryVariableBytecode [ "in v3 bytecode table" ^ 16 ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> firstStoreAndPopTemporaryVariableBytecode [ ^ 104 ] -{ #category : 'helper-interpret' } +{ #category : #'helper-interpret' } VMByteCodesTest >> interpret: aBlock [ aBlock value ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> interpretNextBytecode [ | count | @@ -85,7 +83,7 @@ VMByteCodesTest >> interpretNextBytecode [ count = 1 ] ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> interpretWithFrame: aBlock [ callingFrame := stackBuilder addNewFrame method: @@ -97,7 +95,7 @@ VMByteCodesTest >> interpretWithFrame: aBlock [ self interpret: aBlock ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> pushTempTest: index [ stackBuilder addNewFrame tempAt: index put: (memory integerObjectOf: 42). @@ -111,13 +109,13 @@ VMByteCodesTest >> pushTempTest: index [ ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> pushTemporaryVariableBytecodeAt: offset [ ^ self firstPushTemporaryVariableBytecode + offset. ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> pushThisContextTopFrame [ self interpretWithFrame: [ interpreter pushActiveContextBytecode ]. @@ -128,14 +126,14 @@ VMByteCodesTest >> pushThisContextTopFrame [ withInterpreter: interpreter ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> setUp [ super setUp. self installFloat64RegisterClass ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ stackBuilder addNewFrame @@ -151,12 +149,12 @@ VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ intoTemporary: index ] -{ #category : 'helpers-bytecode-table' } +{ #category : #'helpers-bytecode-table' } VMByteCodesTest >> storeAndPopTemporaryVariableBytecodeAt: anInteger [ ^ self firstStoreAndPopTemporaryVariableBytecode + anInteger ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ | oldMaybeSenderContext newMaybeSenderContext | self interpretWithFrame: [ interpreter pushActiveContextBytecode. ]. @@ -166,7 +164,7 @@ VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ self assert: oldMaybeSenderContext equals: newMaybeSenderContext ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testAddVectorBytecode [ | index v0 v1 result firstTerm size | @@ -193,7 +191,7 @@ VMByteCodesTest >> testAddVectorBytecode [ ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testArraySumUsingVectorBytecode [ | cm x y result simulatedMethod z | @@ -235,7 +233,7 @@ VMByteCodesTest >> testArraySumUsingVectorBytecode [ ] -{ #category : 'tests-complex' } +{ #category : #'tests-complex' } VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMethod [ | class object objectToPutInSlot attemptToAssignMethod attemptToAssignSelector aMethodDictionary | @@ -279,7 +277,7 @@ VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMe self assert: topFrame method equals: attemptToAssignMethod ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ | v0 v1 result method | @@ -306,7 +304,7 @@ VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 6.0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testDuplicateStackTop [ stackBuilder addNewFrame ; buildStack. @@ -323,7 +321,7 @@ VMByteCodesTest >> testDuplicateStackTop [ ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPopStackTopBytecode [ stackBuilder addNewFrame ; buildStack. @@ -339,7 +337,7 @@ VMByteCodesTest >> testPopStackTopBytecode [ ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testPushArrayToRegisterBytecode [ | array index result | @@ -364,7 +362,7 @@ VMByteCodesTest >> testPushArrayToRegisterBytecode [ ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantFalseBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -372,7 +370,7 @@ VMByteCodesTest >> testPushConstantFalseBytecode [ pushed: memory falseObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantMinusOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -380,7 +378,7 @@ VMByteCodesTest >> testPushConstantMinusOneBytecode [ pushed: (memory integerObjectOf: -1) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantNilBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -388,7 +386,7 @@ VMByteCodesTest >> testPushConstantNilBytecode [ pushed: memory nilObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -396,7 +394,7 @@ VMByteCodesTest >> testPushConstantOneBytecode [ pushed: (memory integerObjectOf: 1) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantReceiverBytecode [ | intReceiver | intReceiver := memory integerObjectOf: 42. @@ -409,7 +407,7 @@ VMByteCodesTest >> testPushConstantReceiverBytecode [ pushed: intReceiver ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantTrueBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -417,7 +415,7 @@ VMByteCodesTest >> testPushConstantTrueBytecode [ pushed: memory trueObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantTwoBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -425,7 +423,7 @@ VMByteCodesTest >> testPushConstantTwoBytecode [ pushed: (memory integerObjectOf: 2) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushConstantZeroBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -433,74 +431,74 @@ VMByteCodesTest >> testPushConstantZeroBytecode [ pushed: (memory integerObjectOf: 0) ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp0 [ self pushTempTest: 0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp1 [ self pushTempTest: 1 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp10 [ self pushTempTest: 10 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp11 [ self pushTempTest: 11 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp2 [ self pushTempTest: 2 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp3 [ self pushTempTest: 3 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp4 [ self pushTempTest: 4 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp5 [ self pushTempTest: 5 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp6 [ self pushTempTest: 6 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp7 [ self pushTempTest: 7 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp8 [ self pushTempTest: 8 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testPushTemp9 [ self pushTempTest: 9 ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextIsContext [ self pushThisContextTopFrame. self assert: (memory isContext: interpreter stackTop). ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ self pushThisContextTopFrame. @@ -510,7 +508,7 @@ VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ equals: (interpreter frameCallerFP: interpreter framePointer) ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ self pushThisContextTopFrame. @@ -521,28 +519,28 @@ VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ equals: interpreter framePointer ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidReceiver [ self pushThisContextTopFrame. self assert: topFrame receiver equals: context receiver ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameContext: interpreter framePointer) equals: interpreter stackTop. ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetFlagContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameHasContext: interpreter framePointer). ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ | previousTop newTop | self interpretWithFrame: [ @@ -554,7 +552,7 @@ VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ self assert: newTop equals: previousTop. ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testReturnFalse [ "We need to return to a method. @@ -570,7 +568,7 @@ VMByteCodesTest >> testReturnFalse [ returned: memory falseObject ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testReturnTrue [ "We need to return to a method. @@ -586,7 +584,7 @@ VMByteCodesTest >> testReturnTrue [ returned: memory trueObject ] -{ #category : 'tests-pushThisContext' } +{ #category : #'tests-pushThisContext' } VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ | topFrameContext | self interpretWithFrame: [ @@ -600,7 +598,7 @@ VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ self assert: (interpreter isWidowedContext: topFrameContext) ] -{ #category : 'tests-send' } +{ #category : #'tests-send' } VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ | selectorOop aMethod aMethodToActivate receiver receiverClass aMethodDictionary arg1 arg2 | @@ -647,47 +645,47 @@ VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ self assert: interpreter stackTop equals: receiver ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary0 [ self storeAndPopTemporaryIntoTempTest: 0 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary1 [ self storeAndPopTemporaryIntoTempTest: 1 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary2 [ self storeAndPopTemporaryIntoTempTest: 2 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary3 [ self storeAndPopTemporaryIntoTempTest: 3 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary4 [ self storeAndPopTemporaryIntoTempTest: 4 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary5 [ self storeAndPopTemporaryIntoTempTest: 5 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary6 [ self storeAndPopTemporaryIntoTempTest: 6 ] -{ #category : 'tests-push-simple' } +{ #category : #'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary7 [ self storeAndPopTemporaryIntoTempTest: 7 ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ | register index array result | @@ -718,7 +716,7 @@ VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ self assert: (memory fetchFloat64: 3 ofObject: array) equals: 6.0. ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMByteCodesTest >> testSubVectorBytecode [ | index vector0 vector1 result | diff --git a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st index 1abed9f7a5..517ef6edc4 100644 --- a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMBytecodeMethod', - #superclass : 'Object', + #name : #VMBytecodeMethod, + #superclass : #Object, #instVars : [ 'virtualMachine', 'methodOop' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop [ ^ self new @@ -19,13 +17,13 @@ VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> at: index [ ^ virtualMachine objectMemory fetchByte: index - 1 "0 based" ofObject: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> disassemble [ | symbolicBytecodes | symbolicBytecodes := SymbolicBytecodeBuilder decode: self. @@ -33,52 +31,52 @@ VMBytecodeMethod >> disassemble [ ' join: (symbolicBytecodes collect: [ :sbc | sbc description ]) ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> encoderClass [ ^ EncoderForSistaV1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> endPC [ ^ virtualMachine objectMemory bytesInObject: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> initialPC [ "Answer the program counter for the receiver's first bytecode." ^ (self numLiterals + 1) * virtualMachine objectMemory wordSize + 1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> literalAt: anInteger [ ^ 'literal key' -> 'literal?' ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> methodOop [ ^ methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> methodOop: anObject [ methodOop := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> numLiterals [ ^ virtualMachine objectMemory literalCountOf: methodOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMBytecodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st index 800da59986..05a1565127 100644 --- a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMCodeCompactionTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMCodeCompactionTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod [ "Create the root context with a valid method" @@ -34,7 +32,7 @@ VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod ] -{ #category : 'utils' } +{ #category : #utils } VMCodeCompactionTest >> createFillingMethods: anInteger [ | firstMethod | @@ -47,7 +45,7 @@ VMCodeCompactionTest >> createFillingMethods: anInteger [ ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> fillCodeZone [ | aMethod | @@ -63,13 +61,13 @@ VMCodeCompactionTest >> fillCodeZone [ ] -{ #category : 'running' } +{ #category : #running } VMCodeCompactionTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -112,7 +110,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenUsingPrimCallMayCallBackShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -151,7 +149,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToTheBeginning [ | firstMethod compactMethod methodOop | @@ -174,7 +172,7 @@ VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToThe ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ | firstMethod cogMethod methodOop | @@ -208,7 +206,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ | firstMethod cogMethod methodOop | @@ -241,7 +239,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ | firstMethod cogMethod methodOop | @@ -274,7 +272,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ equals: (interpreter cogMethodOf: methodOop) ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ | firstMethod callerMethodOop calleeCogMethod selector callerCogMethod calleeMethodOop | @@ -324,7 +322,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ equals: (interpreter cogMethodOf: calleeMethodOop) asInteger + cogit entryOffset ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -421,7 +419,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ equals: cogit ceCPICMissTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -511,7 +509,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbo equals: cogit cePICAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -585,7 +583,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsi equals: cogit cePICAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMCodeCompactionTest >> testRelocatingAMethodDoesNotAffectTheFrameCreationPushes [ | firstMethod compactMethod methodOop readOnlyObject | diff --git a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st index 1ba5d89ee9..8f8e44af1f 100644 --- a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMCogitHelpersTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMCogitHelpersTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'checkIsSmallInteger', 'checkNotSmallInteger' @@ -9,12 +9,10 @@ Class { 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -24,7 +22,7 @@ VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -34,7 +32,7 @@ VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -44,7 +42,7 @@ VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -54,14 +52,14 @@ VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> runUntilReturnFrom: anAddress [ self prepareCall. super runUntilReturnFrom: anAddress ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> setUp [ super setUp. @@ -92,7 +90,7 @@ VMCogitHelpersTest >> setUp [ ]. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ self assertNotInSmallIntegerRange: memory maxSmallInteger + 1. @@ -103,14 +101,14 @@ VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithValidSmallIntegers [ self denyIsNotInSmallIntegerRange: 0. self denyIsNotInSmallIntegerRange: memory maxSmallInteger. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ self denyIsInSmallIntegerRange: memory maxSmallInteger + 1. @@ -121,7 +119,7 @@ VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithValidSmallIntegers [ self assertIsInSmallIntegerRange: 0. diff --git a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st index a12f0e88c7..0daae71c73 100644 --- a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMCompiledCodeBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMCompiledCodeBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'slotSize', 'numberOfTemporaries', @@ -15,18 +15,16 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> address [ ^ method ] -{ #category : 'deprecated' } +{ #category : #deprecated } VMCompiledCodeBuilder >> build [ self @@ -36,14 +34,14 @@ VMCompiledCodeBuilder >> build [ ^ self buildMethod ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> buildMethod [ self instantiateMethod. self fillMethod. ^ method ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> buildMethodHeader [ ^ (numberOfArguments bitShift: 24) @@ -53,7 +51,7 @@ VMCompiledCodeBuilder >> buildMethodHeader [ + (isPrimitive asBit << 16) ] -{ #category : 'helper' } +{ #category : #helper } VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ | methodHeader | "1 based" @@ -63,17 +61,17 @@ VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> bytecodes [ ^ bytecodes ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> bytecodes: anObject [ bytecodes := anObject ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> classIndexToUse [ | newClass | memory nilObject = (memory splObj: 16) ifTrue: [ @@ -90,7 +88,7 @@ VMCompiledCodeBuilder >> classIndexToUse [ ^ memory classTagForClass: (memory splObj: 16) ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self newMethod. @@ -101,7 +99,7 @@ VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self fillLiteralsFromPharo: aCompiledMethod allLiterals ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ originalLiterals := pharoLiterals copy. @@ -109,14 +107,14 @@ VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> fillMethod [ self putHeaderInMethod. self putLiteralInMethod. self putBytecodesInMethod. ] -{ #category : 'initialization' } +{ #category : #initialization } VMCompiledCodeBuilder >> initialize [ bytecodes := #[1 2 3 4 5 6 7 8 9 0]. literals := OrderedCollection new. @@ -131,7 +129,7 @@ VMCompiledCodeBuilder >> initialize [ slotSize := nil. ] -{ #category : 'inspecting' } +{ #category : #inspecting } VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ @@ -159,7 +157,7 @@ VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ yourself ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> instantiateMethod [ slotSize := literals size + (bytecodes size / memory wordSize) ceiling @@ -172,73 +170,73 @@ VMCompiledCodeBuilder >> instantiateMethod [ method ifNotNil: [ memory fillObj: method numSlots: slotSize with: memory nilObject ]. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isPrimitive [ ^ isPrimitive ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isPrimitive: anObject [ isPrimitive := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isSmall [ ^ isSmall ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> isSmall: anObject [ isSmall := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literalAt: anIndex put: anOop [ self collection: literals at: anIndex put: anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literals [ ^ literals ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> literals: anObject [ literals := anObject. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> method [ ^ method ] -{ #category : 'building' } +{ #category : #building } VMCompiledCodeBuilder >> newMethod [ self initialize. ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfArguments [ ^ numberOfArguments ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfArguments: anObject [ numberOfArguments := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfTemporaries [ ^ numberOfTemporaries ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> numberOfTemporaries: anObject [ numberOfTemporaries := anObject ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putBytecodesInMethod [ bytecodes doWithIndex:[ :aBytecode :anIndex | memory storeByte: @@ -251,7 +249,7 @@ VMCompiledCodeBuilder >> putBytecodesInMethod [ ] ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putHeaderInMethod [ memory storePointer: 0 ofObject: method @@ -259,7 +257,7 @@ VMCompiledCodeBuilder >> putHeaderInMethod [ ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> putLiteralInMethod [ originalLiterals doWithIndex: [ :aLiteral :anIndex | @@ -277,7 +275,7 @@ VMCompiledCodeBuilder >> putLiteralInMethod [ memory storePointer: anIndex ofObject: method withValue: aLiteral ] ] -{ #category : 'filling' } +{ #category : #filling } VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ "In the case of CompiledBlocks we need to put the outerCode object (the last literal). @@ -286,7 +284,7 @@ VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ literals at: literals size put: aVMCompiledCodeBuilder address ] -{ #category : 'accessing' } +{ #category : #accessing } VMCompiledCodeBuilder >> slotSize [ "Do not set by hand !" ^ slotSize diff --git a/smalltalksrc/VMMakerTests/VMContext.class.st b/smalltalksrc/VMMakerTests/VMContext.class.st index 4458533aba..af9973c650 100644 --- a/smalltalksrc/VMMakerTests/VMContext.class.st +++ b/smalltalksrc/VMMakerTests/VMContext.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMContext', - #superclass : 'Object', + #name : #VMContext, + #superclass : #Object, #instVars : [ 'contextOop', 'interpreter' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^ self new contextOop: anInteger; @@ -21,7 +19,7 @@ VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSim yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> caller [ | senderContext | @@ -37,12 +35,12 @@ VMContext >> caller [ ^ VMContext newOnContext: senderContext withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> contextOop: anInteger [ contextOop := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> description [ | homeContextOop method selector | homeContextOop := interpreter findHomeForContext: contextOop. @@ -52,32 +50,32 @@ VMContext >> description [ ^ interpreter stringOf: selector ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> instructionPointer [ ^interpreter objectMemory fetchPointer: InstructionPointerIndex ofObject: contextOop. ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : 'testing' } +{ #category : #testing } VMContext >> isMarried [ ^interpreter isStillMarriedContext: contextOop. ] -{ #category : 'testing' } +{ #category : #testing } VMContext >> isNilObject [ ^interpreter objectMemory nilObject = contextOop. ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> receiver [ ^interpreter objectMemory fetchPointer: ReceiverIndex ofObject: contextOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMContext >> sender [ ^interpreter objectMemory fetchPointer: SenderIndex ofObject: contextOop. ] diff --git a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st index d6324de0e9..7c132fdfb8 100644 --- a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st +++ b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMContextAccessTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMContextAccessTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: anIndex [ | originalPC copiedPC | @@ -19,7 +17,7 @@ VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: a self assert: copiedPC equals: originalPC ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> pushActiveContext [ interpreter pushActiveContextBytecode. @@ -27,7 +25,7 @@ VMContextAccessTest >> pushActiveContext [ ^ interpreter stackTop ] -{ #category : 'running' } +{ #category : #running } VMContextAccessTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -61,7 +59,7 @@ VMContextAccessTest >> setUp [ self initializeOldSpaceForFullGC ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectPC [ | contextOop newContext | @@ -75,7 +73,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPC [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ | contextOop newContext | @@ -93,7 +91,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ | contextOop newContext | @@ -108,7 +106,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ ] -{ #category : 'tests' } +{ #category : #tests } VMContextAccessTest >> testCloningTopContextHasCorrectSenderWhenItIsNil [ | contextOop newContext | diff --git a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st index 052c3aafb4..a6cdd6a8b6 100644 --- a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMDivisionInstructionTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMDivisionInstructionTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotient remainer: remainer [ | expectedQuotient expectedRemainer | @@ -32,63 +30,63 @@ VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotien self assert: machineSimulator classRegisterValue equals: expectedRemainer ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 7 quotient: -1 remainer: -3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorAndDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -7 quotient: 1 remainer: -3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -7 quotient: -1 remainer: 3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testDivisionWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 7 quotient: 1 remainer: 3. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 2 quotient: 5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -2 quotient: -5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorAndDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -2 quotient: 5 remainer: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 2 quotient: -5 remainer: 0. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMDivisionInstructionTest >> twoComplementOf: anInteger [ ^ self wordSize = 8 diff --git a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st index 0d7d7a6f1c..ad4a802dc9 100644 --- a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st @@ -1,29 +1,28 @@ Class { - #name : 'VMFFIArgumentMarshallingTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIArgumentMarshallingTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'private' } +{ #category : #private } VMFFIArgumentMarshallingTest class >> isAbstract [ ^ self == VMFFIArgumentMarshallingTest ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self subclassResponsibility ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self subclassResponsibility ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ | newLargeInteger byteSize class | @@ -44,7 +43,7 @@ VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ ^ newLargeInteger ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorrectly [ self @@ -53,7 +52,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorr expectedValue: 17 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrectly [ self @@ -62,7 +61,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrect expectedValue: 17.0 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectly [ self @@ -71,7 +70,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectl expectedValue: 17.0 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrectly [ self @@ -80,7 +79,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrec expectedValue: 17 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -89,7 +88,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -98,7 +97,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesBadArgument [ self @@ -108,7 +107,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesBadArgument [ self @@ -118,7 +117,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue aValueToStore | @@ -135,7 +134,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -150,7 +149,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -159,7 +158,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -168,7 +167,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesBadArgument [ | valueToStore | @@ -184,7 +183,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesBadArgument [ self @@ -194,7 +193,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesB ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue | @@ -206,7 +205,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -225,7 +224,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -238,7 +237,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveVa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -247,7 +246,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -256,7 +255,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -265,7 +264,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsM expectedValue: -42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -274,7 +273,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsM expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBadArgument [ self @@ -284,7 +283,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBadArgument [ self @@ -294,7 +293,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBa ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -311,7 +310,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshall expectedValue: storedValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -328,7 +327,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalled expectedValue: storedValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFails [ self @@ -337,7 +336,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -346,7 +345,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIs expectedValue: 8 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self @@ -355,7 +354,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -370,7 +369,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -385,7 +384,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveVa expectedValue: 16r3FFFFFFF + 2 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFails [ self @@ -394,7 +393,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -403,7 +402,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ | valueToStore | @@ -418,7 +417,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -437,7 +436,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -449,7 +448,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveVa expectedValue: aValue ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFails [ self @@ -458,7 +457,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -467,7 +466,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFails [ self @@ -476,7 +475,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFail failsWith: PrimErrBadArgument ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -485,7 +484,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsM expectedValue: 8 ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self diff --git a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st index b5bcbc2d51..be1875a921 100644 --- a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFICallbacksTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFICallbacksTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ interpreter push: memory nilObject. @@ -17,7 +16,7 @@ VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -52,7 +51,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProc interpreter primitiveSameThreadCallout. ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcessesInReady [ | parametersArray tfExternalFunction callbackContext processBefore | @@ -78,7 +77,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcesse self assertCollection: self readyProcesses hasSameElements: processBefore ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -105,7 +104,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess self assert: interpreter activeProcess equals: oldActiveProcess. ] -{ #category : 'tests - callbacks' } +{ #category : #'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadReentrantCallbackRestoresCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext numberOfCallbacks innerCallbackContext tfExternalFunction2 | diff --git a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st index 8d27531029..57db1b5e98 100644 --- a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFIHelpersTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIHelpersTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> assertPopInEmptyStackFails [ [ interpreter popSameThreadCalloutSuspendedProcess. @@ -16,7 +15,7 @@ VMFFIHelpersTest >> assertPopInEmptyStackFails [ equals: 'SameThreadCalloutSuspendedProcessStack is empty' ] ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesError [ self assert: (memory splObj: SuspendedProcessInCallout) equals: memory nilObject. @@ -24,7 +23,7 @@ VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesEr self assertPopInEmptyStackFails ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcess [ | aProcess anotherProcess | @@ -42,7 +41,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -60,7 +59,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcess [ | aProcess anotherProcess | @@ -76,7 +75,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -92,7 +91,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresThePassedProcess [ | aProcess | @@ -105,7 +104,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresT ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdatesNextLinkWithNil [ | aProcess | @@ -118,7 +117,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdates ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackFails [ | aProcess | @@ -133,7 +132,7 @@ VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptySt ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsProcessWithNilInNextLink [ | aProcess | @@ -146,7 +145,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsPushedProcess [ | aProcess | @@ -159,7 +158,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : 'tests - helpers' } +{ #category : #'tests - helpers' } VMFFIHelpersTest >> testReadAddressReadsTheValidAddressValue [ | anExternalAddress | diff --git a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st index a3aefe8ff7..03182807ca 100644 --- a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st @@ -1,23 +1,22 @@ Class { - #name : 'VMFFIReturnMarshallingTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFIReturnMarshallingTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'private' } +{ #category : #private } VMFFIReturnMarshallingTest class >> isAbstract [ ^ self = VMFFIReturnMarshallingTest ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ self subclassResponsibility ] -{ #category : 'utils' } +{ #category : #utils } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedLargeIntegerValue: expectedValue [ self @@ -37,7 +36,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedSmalltalkValue: expectedValue [ self @@ -51,7 +50,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteArray [ | valueToReturn | @@ -73,7 +72,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteAr ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatInStack [ self @@ -85,7 +84,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatI ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatInStack [ self @@ -97,7 +96,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatIn ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExternalAddress [ @@ -111,7 +110,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExtern ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallInteger [ self @@ -120,7 +119,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeInteger [ | value | @@ -132,7 +131,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallInteger [ | value | @@ -146,7 +145,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeInteger [ self @@ -155,7 +154,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallInteger [ self @@ -164,7 +163,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger [ self @@ -173,7 +172,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger expectedSmalltalkValue: INT8_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallInteger [ self @@ -182,7 +181,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeInteger [ | value | @@ -194,7 +193,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallInteger [ | value | @@ -208,7 +207,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeInteger [ self @@ -217,7 +216,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallInteger [ self @@ -226,7 +225,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT8PushSmallInteger [ self diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st index ba96a06ec5..d18e6ecd88 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadArgumentMarshallingTest', - #superclass : 'VMFFIArgumentMarshallingTest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadArgumentMarshallingTest, + #superclass : #VMFFIArgumentMarshallingTest, + #category : #VMMakerTests } -{ #category : 'implementation' } +{ #category : #implementation } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ | parametersArray tfExternalFunction savedValue | @@ -29,7 +28,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: savedValue equals: expectedValue. ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ | parametersArray tfExternalFunction savedValue | @@ -53,7 +52,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : 'tests - parameters marshalling' } +{ #category : #'tests - parameters marshalling' } VMFFISameThreadArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ | parametersArray tfExternalFunction functionCalled | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st index 4a8ee9389a..33727d32a7 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadCalloutTest', - #superclass : 'VMAbstractFFITest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadCalloutTest, + #superclass : #VMAbstractFFITest, + #category : #VMMakerTests } -{ #category : 'tests - callouts' } +{ #category : #'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess | @@ -25,7 +24,7 @@ VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProce self assert: interpreter activeProcess equals: oldActiveProcess ] -{ #category : 'tests - callouts' } +{ #category : #'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutShouldKeepTheNewMethodVariable [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st index 71a34defe3..bccbc9e6b1 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMFFISameThreadReturnMarshallingTest', - #superclass : 'VMFFIReturnMarshallingTest', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMFFISameThreadReturnMarshallingTest, + #superclass : #VMFFIReturnMarshallingTest, + #category : #VMMakerTests } -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ | parametersArray tfExternalFunction | @@ -27,7 +26,7 @@ VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType aBlock value ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st index 177e8e7463..884e602d1e 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerArgumentMarshallingTest', - #superclass : 'VMFFIArgumentMarshallingTest', + #name : #VMFFIWorkerArgumentMarshallingTest, + #superclass : #VMFFIArgumentMarshallingTest, #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -11,11 +11,10 @@ Class { 'task', 'savedValue' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -33,7 +32,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: savedValue equals: expectedValue ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -42,7 +41,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : 'implementation' } +{ #category : #implementation } VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofType: argumentType [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. @@ -78,21 +77,21 @@ VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofTy interpreter primitiveWorkerCallout ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerArgumentMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'running' } +{ #category : #running } VMFFIWorkerArgumentMarshallingTest >> setUp [ super setUp. interpreter libFFI testWorker clear ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st index 0cabd48fa0..10fc6eeb4f 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerCalloutTest', - #superclass : 'VMAbstractFFITest', + #name : #VMFFIWorkerCalloutTest, + #superclass : #VMAbstractFFITest, #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -9,17 +9,16 @@ Class { 'workerOop', 'semaphoreIndex' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes [ ^ self doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: interpreter libFFI void ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: returnType [ aFunctionBlock := [ self fail: 'It should enqueue it, not execute it' ]. @@ -50,21 +49,21 @@ VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: ar interpreter primitiveWorkerCallout ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutEnqueuesOnlyOneTask [ self doWorkerCallWithArguments: {} ofTypes: {}. self assert: interpreter libFFI testWorker tasks size equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIfPrimitiveFails [ | previous | @@ -87,7 +86,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIf self assert: interpreter allocatedElements size equals: previous. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocateReturnHolder [ self doWorkerCallWithArguments: {} ofTypes: {}. @@ -95,7 +94,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocate self assert: interpreter libFFI testWorker tasks first returnHolderAddress isNil ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgumentHoldersAndReturnHolderInCHeap [ | previous | @@ -117,7 +116,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgum self assert: interpreter allocatedElements size equals: previous + 7. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithReturnAllocateJustOne [ | previous | @@ -128,7 +127,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithRetu self assert: interpreter allocatedElements size equals: previous + 1. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutReturnDoesNotAllocate [ | previous | @@ -139,7 +138,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutR self assert: interpreter allocatedElements size equals: previous. ] -{ #category : 'tests' } +{ #category : #tests } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersHasNilAsParametersPointer [ self doWorkerCallWithArguments: {} ofTypes: {}. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st index d413ef8af6..92a15a06fb 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMFFIWorkerReturnMarshallingTest', - #superclass : 'VMFFIReturnMarshallingTest', + #name : #VMFFIWorkerReturnMarshallingTest, + #superclass : #VMFFIReturnMarshallingTest, #instVars : [ 'tfExternalFunction', 'returnHolder', @@ -12,11 +12,10 @@ Class { 'worker', 'workerOop' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ tfExternalFunction := self @@ -55,14 +54,14 @@ VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType ret aBlock value. ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : 'tests - marshalling return' } +{ #category : #'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st index dc8609f7ca..52f52916aa 100644 --- a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMForwardLiteralInMachineMethodTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMForwardLiteralInMachineMethodTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMForwardLiteralInMachineMethodTest >> initStack [ self createBaseFrame. @@ -24,13 +22,13 @@ VMForwardLiteralInMachineMethodTest >> initStack [ ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMForwardLiteralInMachineMethodTest >> methodWithGlobal [ ^ Smalltalk ] -{ #category : 'tests' } +{ #category : #tests } VMForwardLiteralInMachineMethodTest >> testForwardLiteralInMethod [ | machineCodeMethod literal methodOop array literalValue selector associationClass valueClass literalKey | diff --git a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st index 7716e906f5..a0768e8b2c 100644 --- a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st @@ -42,8 +42,8 @@ Configuring of the frame. When it links them, it gives the last frame the previous caller Frame, for debug purpose. " Class { - #name : 'VMFrameBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMFrameBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'method', 'context', @@ -61,12 +61,10 @@ Class { 'methodBuilder', 'isSuspended' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> adaptAddressToMemory: anInteger [ anInteger = memory nilObject ifTrue: [ ^ #nilObject ]. anInteger = memory trueObject ifTrue: [ ^ #trueObject ]. @@ -75,70 +73,70 @@ VMFrameBuilder >> adaptAddressToMemory: anInteger [ "^ memory integerObjectOf: anInteger" ] -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> adaptAddressToMemoryIfInteger: anAssociation [ anAssociation value isInteger ifTrue: [ anAssociation value: (self adaptAddressToMemory: anAssociation value) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> argumentSize [ ^ argumentSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> argumentSize: anObject [ argumentSize := anObject ] -{ #category : 'configuring' } +{ #category : #configuring } VMFrameBuilder >> beSuspended [ isSuspended := true ] -{ #category : 'configuring' } +{ #category : #configuring } VMFrameBuilder >> beSuspendedAt: anInstructionPointer [ instructionPointer := anInstructionPointer. self beSuspended ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> callerFrame [ ^ callerFrame ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> callerFrame: aFrame [ callerFrame := aFrame ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> context [ ^ context ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> context: anObject [ context := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> flags [ ^ flags ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> flags: anObject [ flags := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> framePointer [ ^ myFramePointer ] -{ #category : 'initialization' } +{ #category : #initialization } VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory andMethodBuilder: aMethodBuilder [ memory := aMemory. interpreter := anInterpreter. "allow to not care if it's for a cog or stack interpreter" @@ -155,7 +153,7 @@ VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory an argumentSize := 0. ] -{ #category : 'inspect' } +{ #category : #inspect } VMFrameBuilder >> inspectFrameIn: aBuilder [ @@ -186,12 +184,12 @@ VMFrameBuilder >> inspectFrameIn: aBuilder [ yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> instructionPointer [ ^ instructionPointer ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> isMarried [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -200,7 +198,7 @@ VMFrameBuilder >> isMarried [ ifFalse: [ interpreter isStillMarriedContext: contextOop ] ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> isSingle [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -211,43 +209,43 @@ VMFrameBuilder >> isSingle [ interpreter isSingleContext: contextOop ] ] -{ #category : 'testing' } +{ #category : #testing } VMFrameBuilder >> isSuspended [ ^ isSuspended ] -{ #category : 'context' } +{ #category : #context } VMFrameBuilder >> marryToContext [ interpreter ensureFrameIsMarried: myFramePointer SP: myStackPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> method [ ^ method ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> method: anOop [ method := anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> previousFrameArgsSize [ ^ previousFrameArgsSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> previousFrameArgsSize: anObject [ previousFrameArgsSize := anObject ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushCurrentFramesStack [ "push to the stack all objects in the frame stack" stack do: [ :oop | interpreter push: oop ]. ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushFlags [ "Flags: this stack frame is single. I.e., it has no context object. Otherwise GC fails with an assertion looking for it in the heap" @@ -258,14 +256,14 @@ VMFrameBuilder >> pushFlags [ interpreter push: flags ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushFrame [ interpreter push: receiver. temps do: [ :oop | interpreter push: oop ]. ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> pushYourself [ self setVariablesFromCompiledMethod. @@ -288,17 +286,17 @@ VMFrameBuilder >> pushYourself [ ^ myFramePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> receiver [ ^ receiver ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> receiver: anObject [ receiver := anObject ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setArgsFromMethod [ | argNumber | argNumber := interpreter argumentCountOf: method. @@ -309,7 +307,7 @@ VMFrameBuilder >> setArgsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of arguments from the method oop.' ]] ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ "If possible, setting IP to before the first bytecode, so it is ready for fetchNextBytecode" @@ -319,7 +317,7 @@ VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ interpreter instructionPointer: instructionPointer ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setTempsFromMethod [ | tempNumber | tempNumber := interpreter tempCountOf: method. @@ -330,7 +328,7 @@ VMFrameBuilder >> setTempsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of temporaries from the method oop.' ]] ] -{ #category : 'building' } +{ #category : #building } VMFrameBuilder >> setVariablesFromCompiledMethod [ (memory isCompiledMethod: method) ifFalse: [ ^ self ]. @@ -339,43 +337,43 @@ VMFrameBuilder >> setVariablesFromCompiledMethod [ self setArgsFromMethod ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stack [ ^ stack ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stack: anObject [ stack := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> stackPointer [ ^ myStackPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> tempAt: anIndex put: anOop [ self collection: temps at: anIndex put: anOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> temps [ ^ temps ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> temps: anObject [ temps := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> vmMethodBuilder [ ^ vmMethodBuilder ] -{ #category : 'accessing' } +{ #category : #accessing } VMFrameBuilder >> vmMethodBuilder: anObject [ vmMethodBuilder := anObject diff --git a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st index 2083513609..8223f68c98 100644 --- a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMImageHeaderWritingTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #name : #VMImageHeaderWritingTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'running' } +{ #category : #running } VMImageHeaderWritingTest >> setUp [ super setUp. @@ -20,7 +18,7 @@ VMImageHeaderWritingTest >> setUp [ self saveImage. ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ | header permanentObject | @@ -37,7 +35,7 @@ VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ + (memory bytesInObject: permanentObject) + 16 "PermSpace has an empty object as first object.". ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ | header | @@ -47,7 +45,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ self assert: header oldBaseAddr equals: memory getMemoryMap oldSpaceStart ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ | header | @@ -57,7 +55,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ self assert: header freeOldSpaceInImage equals: memory bytesLeftInOldSpace ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ | header | @@ -67,7 +65,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ self assert: header hdrCogCodeSize equals: interpreter unknownShortOrCodeSizeInKs ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ | header | @@ -77,7 +75,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ self assert: header dataSize equals: memory imageSizeToWrite ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ | header | @@ -87,7 +85,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ self assert: header hdrEdenBytes equals: interpreter getDesiredEdenBytes ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages [ | header | @@ -97,7 +95,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages self assert: header hdrNumStackPages equals: interpreter getDesiredNumStackPages ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable [ | header | @@ -107,7 +105,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable self assert: header hdrMaxExtSemTabSize equals: (interpreter getMaxExtSemTabSizeSet ifTrue: [interpreter ioGetMaxExtSemTableSize] ifFalse: [0]) ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ | header | @@ -117,7 +115,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ self assert: header extraVMMemory equals: interpreter getExtraVMMemory ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ | header | @@ -127,7 +125,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ self assert: header firstSegSize equals: memory firstSegmentBytes ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ | header | @@ -137,7 +135,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ self assert: header headerFlags equals: interpreter getImageHeaderFlags ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ | header expectedHeaderSize | @@ -149,7 +147,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ self assert: header imageHeaderSize equals: expectedHeaderSize. ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ | header | @@ -159,7 +157,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ self assert: header imageFormat equals: interpreter imageFormatVersion ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ | header | @@ -169,7 +167,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ self assert: header imageVersion equals: interpreter getImageVersion ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ | header | @@ -179,7 +177,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ self assert: header hdrLastHash equals: memory lastHash ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop [ | header | @@ -189,7 +187,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop self assert: header initialSpecialObjectsOop equals: memory specialObjectsOop ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONHeader [ | header readHeader | @@ -203,7 +201,7 @@ VMImageHeaderWritingTest >> testWritingSTONHeader [ self assert: readHeader equals: (self stonPretty: header). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONPermSpace [ | writtenMetadata expectedPermSpaceMetadata | @@ -224,7 +222,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpace [ self assert: writtenMetadata equals: (self stonPretty: expectedPermSpaceMetadata). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ | writtenMetadata | @@ -238,7 +236,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ self assert: writtenMetadata equals: (self stonPretty: ComposedMetadataStruct new). ] -{ #category : 'tests' } +{ #category : #tests } VMImageHeaderWritingTest >> testWritingSTONSegment [ | header writtenHeader segmentMetadata | diff --git a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st index 90e609d175..260d37e29e 100644 --- a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMImageReadingTest', - #superclass : 'VMAbstractImageFormatTest', + #name : #VMImageReadingTest, + #superclass : #VMAbstractImageFormatTest, #instVars : [ 'originalNilObjectIdentityHash', 'permanentObject', 'originalPermanentObjectIdentityHash' ], - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'query' } +{ #category : #query } VMImageReadingTest >> dataFrom: fileName [ ^ self imageFileName asFileReference / fileName ] -{ #category : 'accessing' } +{ #category : #accessing } VMImageReadingTest >> initializationOptions [ ^ super initializationOptions , { #CloneOnGC. false. #CloneOnScavenge. false } ] -{ #category : 'utilities' } +{ #category : #utilities } VMImageReadingTest >> loadImage [ environmentBuilder := VMSimulatedEnvironmentBuilder new. @@ -43,7 +41,7 @@ VMImageReadingTest >> loadImage [ ] -{ #category : 'query' } +{ #category : #query } VMImageReadingTest >> metadataFrom: fileName [ | writtenHeader | @@ -51,7 +49,7 @@ VMImageReadingTest >> metadataFrom: fileName [ ^ STON fromString: writtenHeader ] -{ #category : 'utilities' } +{ #category : #utilities } VMImageReadingTest >> saveImage [ memory garbageCollectForSnapshot. @@ -64,7 +62,7 @@ VMImageReadingTest >> saveImage [ ] -{ #category : 'initialization' } +{ #category : #initialization } VMImageReadingTest >> setUp [ super setUp. @@ -77,7 +75,7 @@ VMImageReadingTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ | obj magicNumber initSegmentSize initPermSpaceSize finalSegmentSize finalPermSpaceSize | @@ -118,7 +116,7 @@ VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ self assert: (self metadataFrom: 'permSpace.ston') dataSize equals: finalPermSpaceSize ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testReadingSTONHeader [ | headerStruct headerFile | @@ -136,7 +134,7 @@ VMImageReadingTest >> testReadingSTONHeader [ self assert: (self stonPretty: headerStruct) equals: headerFile contents. ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self saveImage. @@ -145,7 +143,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self assert: originalNilObjectIdentityHash equals: (memory hashBitsOf: memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ "Only valid in the new format" @@ -161,7 +159,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ | firstNewSegmentSize secondNewSegmentSize obj newObj originalObjHash | @@ -202,7 +200,7 @@ VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ self assert: originalObjHash equals: (memory hashBitsOf: newObj) ] -{ #category : 'tests' } +{ #category : #tests } VMImageReadingTest >> testSavingPermanentSpaceObjectsInSpurFormatFails [ imageWriterClass = SpurImageWriter ifFalse: [ ^ self skip ]. diff --git a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st index 9ead2ebb76..6837a56522 100644 --- a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st +++ b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMInterpreterTests', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMInterpreterTests, + #superclass : #VMSpurMemoryManagerTest, #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -25,7 +23,7 @@ VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : 'running' } +{ #category : #running } VMInterpreterTests >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -43,7 +41,7 @@ VMInterpreterTests >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMInterpreterTests >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" diff --git a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st index c1f9413e77..cdfda82889 100644 --- a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJITPrimitiveCallingTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJITPrimitiveCallingTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJITPrimitiveCallingTest >> initStack [ self createBaseFrame. @@ -21,7 +19,7 @@ VMJITPrimitiveCallingTest >> initStack [ ] -{ #category : 'running' } +{ #category : #running } VMJITPrimitiveCallingTest >> setUp [ super setUp. @@ -36,7 +34,7 @@ VMJITPrimitiveCallingTest >> setUp [ self createActiveProcess ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -56,7 +54,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNum ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -76,7 +74,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForT self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -96,7 +94,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidR self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidReceiverRunsFallbackCode [ | callingMethod | @@ -116,7 +114,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidRece ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntegerWillExecuteThePrimitiveAndReturnASmallInteger [ | callingMethod | @@ -136,7 +134,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntege ] -{ #category : 'tests - run on smalltalk stack' } +{ #category : #'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntegerReceiverReturnsSmallInteger [ | callingMethod | @@ -156,7 +154,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntege ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -176,7 +174,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersE ] -{ #category : 'tests - without tracing' } +{ #category : #'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValidResult [ | callingMethod | @@ -196,7 +194,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValid self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - without tracing' } +{ #category : #'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -218,7 +216,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidN ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -238,7 +236,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePri self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -258,7 +256,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResult self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - newMethod' } +{ #category : #'tests - newMethod' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ | callingMethod | @@ -280,7 +278,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ ] -{ #category : 'tests - primitiveFunctionPointer' } +{ #category : #'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -302,7 +300,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerW ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -336,7 +334,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwa ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -359,7 +357,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutFo ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -393,7 +391,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithF ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -416,7 +414,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWitho ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -450,7 +448,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -473,7 +471,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -490,7 +488,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : 'tests - newMethod' } +{ #category : #'tests - newMethod' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ | callingMethod | @@ -512,7 +510,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ ] -{ #category : 'tests - primitiveFunctionPointer' } +{ #category : #'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -534,7 +532,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCa ] -{ #category : 'tests - error code' } +{ #category : #'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -573,7 +571,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : 'tests - error code' } +{ #category : #'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -612,7 +610,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: machineSimulator framePointerRegisterValue) equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -648,7 +646,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwarders ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -673,7 +671,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForward ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -709,7 +707,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwar ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -734,7 +732,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutFor ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -770,7 +768,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithFo ] -{ #category : 'tests - retry primitive' } +{ #category : #'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -795,7 +793,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithou ] -{ #category : 'tests - with tracing' } +{ #category : #'tests - with tracing' } VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -812,7 +810,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : 'tests - fail fast' } +{ #category : #'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode [ | callingMethod | @@ -835,7 +833,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode ] -{ #category : 'tests - profile sampling' } +{ #category : #'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSample [ | callingMethod | @@ -861,7 +859,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSa self assert: interpreter nextProfileTick equals: 0 ] -{ #category : 'tests - profile sampling' } +{ #category : #'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoesNotTakeSample [ | callingMethod | @@ -885,7 +883,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoes self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42) ] -{ #category : 'tests - fail fast' } +{ #category : #'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithoutFunctionExecutesFallbackCode [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st index edbb279a46..95cae51655 100644 --- a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMJITVMPrimitiveTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJITVMPrimitiveTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> setUp [ super setUp. @@ -16,7 +14,7 @@ VMJITVMPrimitiveTest >> setUp [ self createBaseFrame ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod [ | methodToXray target | @@ -35,7 +33,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0111) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ | methodToXray target | @@ -54,7 +52,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0001) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ | methodToXray target | @@ -72,7 +70,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ | methodToXray target | @@ -91,7 +89,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0010) ] -{ #category : 'tests - primitiveMethodXray' } +{ #category : #'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasNotCompiled [ | methodToXray target | diff --git a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st index 5e0e973c35..0c20ab755d 100644 --- a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st +++ b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMJistMethodTestObject', - #superclass : 'Object', + #name : #VMJistMethodTestObject, + #superclass : #Object, #instVars : [ 'var1', 'var2', @@ -132,12 +132,10 @@ Class { 'var128', 'var129' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'initialization' } +{ #category : #initialization } VMJistMethodTestObject >> initialize [ super initialize. var1 := Array new. diff --git a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st index 4eec1ca80e..c2f21e9f2f 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJitMethodTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJitMethodTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ | tmp1 tmp2 | @@ -21,14 +19,14 @@ VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ ^ arg3 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> comparingSmallIntegers: aBitmap [ aBitmap size = 32768 ifTrue: [ ^ 17 ]. ^ 23 ] -{ #category : 'accessing' } +{ #category : #accessing } VMJitMethodTest >> filter: aGlyphForm [ "This method is here only for a test" @@ -111,7 +109,7 @@ VMJitMethodTest >> filter: aGlyphForm [ ^answer ] -{ #category : 'helpers' } +{ #category : #helpers } VMJitMethodTest >> initStack [ self createBaseFrame. @@ -126,13 +124,13 @@ VMJitMethodTest >> initStack [ ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> setUp [ super setUp. @@ -140,7 +138,7 @@ VMJitMethodTest >> setUp [ self installFloat64RegisterClass ] -{ #category : 'running' } +{ #category : #running } VMJitMethodTest >> setUpTrampolines [ super setUpTrampolines. @@ -152,7 +150,7 @@ VMJitMethodTest >> setUpTrampolines [ cogit ceReturnToInterpreterTrampoline: (self compileTrampoline: [ cogit Stop ] named:#ceReturnToInterpreterTrampoline). ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ | callingMethod parameter aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -187,7 +185,7 @@ VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ equals: 17 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ | callingMethod cm x y z | @@ -261,7 +259,7 @@ VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ | callingMethod cm x y z firstTerm size | @@ -333,7 +331,7 @@ VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ self assert: (memory fetchFloat64: 1 ofObject: z) equals: 22.0 ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ | callingMethod | @@ -342,7 +340,7 @@ VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ self deny: callingMethod address equals: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodTest >> testOnStackReplacementForLongRunningVectorAddMethod [ | callingMethod cm x y z firstTerm size frame | diff --git a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st index b80dc4405f..02dd237dfe 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st @@ -1,28 +1,26 @@ Class { - #name : 'VMJitMethodWithImmutabilityTest', - #superclass : 'VMPrimitiveCallAbstractTest', + #name : #VMJitMethodWithImmutabilityTest, + #superclass : #VMPrimitiveCallAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMJitMethodWithImmutabilityTest >> initialCodeSize [ ^ 32 * 1024 ] -{ #category : 'initialization' } +{ #category : #initialization } VMJitMethodWithImmutabilityTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : 'initialization' } +{ #category : #initialization } VMJitMethodWithImmutabilityTest >> setUpTrampolines [ super setUpTrampolines. @@ -32,7 +30,7 @@ VMJitMethodWithImmutabilityTest >> setUpTrampolines [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitMethodWithImmutabilityTest >> testCompileMethodWithALotOfAssignmentsToInstanceVariables [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st index 97a1aa0b1e..810ddfe30c 100644 --- a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st +++ b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMJitSimdBytecode', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJitSimdBytecode, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'running' } +{ #category : #running } VMJitSimdBytecode >> jitOptions [ ^ super jitOptions @@ -20,7 +18,7 @@ VMJitSimdBytecode >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -62,7 +60,7 @@ VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -97,7 +95,7 @@ VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -132,7 +130,7 @@ VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -163,7 +161,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -193,7 +191,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ self assert: (entry registerr) equals: 0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegisterContent [ | endInstruction primitiveAddress array | @@ -224,7 +222,7 @@ VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegister self assert: (memory fetchFloat64: 1 ofObject: array) equals: 4.0. ] -{ #category : 'tests' } +{ #category : #tests } VMJitSimdBytecode >> testSubVectorStoreResultIntoVectorRegister [ | endInstruction primitiveAddress array register | diff --git a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st index beaecb6e12..88d625ab18 100644 --- a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMJittedBoxFloatPrimitivesTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedBoxFloatPrimitivesTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> setUp [ super setUp. @@ -24,7 +22,7 @@ VMJittedBoxFloatPrimitivesTest >> setUp [ named: 'ceCheckFeatures') ] ] -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> testAsFloat [ cogit receiverTags: memory smallIntegerTag. @@ -38,7 +36,7 @@ VMJittedBoxFloatPrimitivesTest >> testAsFloat [ equals: 27.0 ] -{ #category : 'tests' } +{ #category : #tests } VMJittedBoxFloatPrimitivesTest >> testAsFloatWhenThereIsNotSpaceFailsPrimitive [ | stop | diff --git a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st index 9ecec6897e..96c2a4c216 100644 --- a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedByteArrayAccessPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedByteArrayAccessPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'receiver', 'targetReceiver' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMJittedByteArrayAccessPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: bitSize [ ({ 8. 16. 32. 64 } includes: bitSize) ifFalse: [ self fail ]. @@ -44,7 +42,7 @@ VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: b ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ | endPart | @@ -56,7 +54,7 @@ VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is the same receiver" @@ -70,7 +68,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ targetReceiver := receiver ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: bitSize [ | complementedValue | @@ -92,7 +90,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: memory storeLong64: 0 ofObject: targetReceiver withValue: complementedValue ]. ] -{ #category : 'tests - load booleans' } +{ #category : #'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ | expectedValue | @@ -113,7 +111,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ ] -{ #category : 'tests - load booleans' } +{ #category : #'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ | expectedValue | @@ -134,7 +132,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ | expectedValue | @@ -155,7 +153,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ | expectedValue | @@ -176,7 +174,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ ] -{ #category : 'tests - load chars' } +{ #category : #'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ | expectedValue | @@ -197,7 +195,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ | expectedValue | @@ -218,7 +216,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ | expectedValue | @@ -239,7 +237,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ ] -{ #category : 'tests - load floats' } +{ #category : #'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ | expectedValue | @@ -260,7 +258,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue [ | expectedValue | @@ -281,7 +279,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue [ | expectedValue | @@ -302,7 +300,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue [ | expectedValue | @@ -323,7 +321,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue [ | expectedValue | @@ -344,7 +342,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue [ | expectedValue | @@ -365,7 +363,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue [ | expectedValue | @@ -386,7 +384,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue [ | expectedValue | @@ -407,7 +405,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue [ | expectedValue | @@ -428,7 +426,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ | expectedValue | @@ -449,7 +447,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ | expectedValue | @@ -470,7 +468,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ | expectedValue | @@ -491,7 +489,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ | expectedValue | @@ -512,7 +510,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ ] -{ #category : 'tests - load integers' } +{ #category : #'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ | expectedValue | @@ -533,7 +531,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ ] -{ #category : 'tests - store booleans' } +{ #category : #'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ self genPrimitive: #StoreBoolean8. @@ -549,7 +547,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ ] -{ #category : 'tests - store booleans' } +{ #category : #'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ self genPrimitive: #StoreBoolean8. @@ -565,7 +563,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ | expectedValue | @@ -585,7 +583,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ | expectedValue | @@ -605,7 +603,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ ] -{ #category : 'tests - store chars' } +{ #category : #'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ | expectedValue | @@ -625,7 +623,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ | expectedValue | @@ -644,7 +642,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNotOverwriteAfter [ | expectedValue | @@ -663,7 +661,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNo self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloatValue [ | expectedValue | @@ -682,7 +680,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloa ] -{ #category : 'tests - store floats' } +{ #category : #'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ | expectedValue | @@ -701,7 +699,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeValue [ | expectedValue | @@ -721,7 +719,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValue [ | expectedValue | @@ -741,7 +739,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -763,7 +761,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeValue [ | expectedValue | @@ -783,7 +781,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValue [ | expectedValue | @@ -803,7 +801,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValueWithoutOverwriting [ | expectedValue | @@ -823,7 +821,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeValue [ | expectedValue | @@ -843,7 +841,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveValue [ | expectedValue | @@ -863,7 +861,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveVal ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValue [ | expectedValue | @@ -883,7 +881,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValu ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValue [ | expectedValue | @@ -903,7 +901,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -925,7 +923,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ | expectedValue | @@ -945,7 +943,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ | expectedValue | @@ -965,7 +963,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ | expectedValue | @@ -985,7 +983,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ | expectedValue | @@ -1006,7 +1004,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ ] -{ #category : 'tests - store integers' } +{ #category : #'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ | expectedValue | @@ -1026,7 +1024,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedByteArrayAccessPrimitiveTest >> trailingName [ ^ 'Bytes' diff --git a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st index 70c9624404..47ffe36324 100644 --- a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMJittedExternalAddressAccessPrimitiveTest', - #superclass : 'VMJittedByteArrayAccessPrimitiveTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMJittedExternalAddressAccessPrimitiveTest, + #superclass : #VMJittedByteArrayAccessPrimitiveTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'utils' } +{ #category : #utils } VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is a byteArray and the receiver to the primitive is an external address pointing to it" @@ -16,7 +14,7 @@ VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ ] -{ #category : 'utils' } +{ #category : #utils } VMJittedExternalAddressAccessPrimitiveTest >> trailingName [ ^ 'ExternalAddress' diff --git a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st index d647fb061c..944daa4de2 100644 --- a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedGeneralPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedGeneralPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ | lastOop | @@ -17,7 +15,7 @@ VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ ^ lastOop ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ "32 bits images does not have SmallFloats" @@ -42,7 +40,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self compile: [ | jump | @@ -62,7 +60,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self compile: [ | jump | @@ -82,7 +80,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self assert: machineSimulator receiverRegisterValue equals: 0 ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self compile: [ | jump | @@ -98,7 +96,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self compile: [ | jump | @@ -114,7 +112,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBoxedFloat [ self compile: [ | jump | @@ -130,7 +128,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBo self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSmallInteger [ self compile: [ | jump | @@ -146,7 +144,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSm self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterBoxedFloat [ self compile: [ | jump | @@ -162,7 +160,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterSmallInteger [ self compile: [ | jump | @@ -178,7 +176,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerBoxedFloat [ self compile: [ | jump | @@ -194,7 +192,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater or equal than comparison' } +{ #category : #'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerSmallInteger [ self compile: [ | jump | @@ -210,7 +208,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self compile: [ | jump | @@ -226,7 +224,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self compile: [ | jump | @@ -242,7 +240,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self compile: [ | jump | @@ -258,7 +256,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - equals comparison' } +{ #category : #'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self compile: [ | jump | @@ -274,7 +272,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat [ self compile: [ | jump | @@ -290,7 +288,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - greater than comparison' } +{ #category : #'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallInteger [ self compile: [ | jump | @@ -306,7 +304,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallIntege self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self compile: [ @@ -319,7 +317,7 @@ VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17). ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self compile: [ | jump | @@ -332,7 +330,7 @@ VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self assert: machineSimulator receiverRegisterValue equals: 17. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self compile: [ | jump | @@ -345,7 +343,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self assert: machineSimulator receiverRegisterValue equals: (memory classIndexOf: memory falseObject) ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self compile: [ @@ -358,7 +356,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self assert: machineSimulator arg0RegisterValue equals: classFloat ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self compile: [ @@ -372,7 +370,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding [ self compile: [ @@ -386,7 +384,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self compile: [ @@ -400,7 +398,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 4 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding [ self compile: [ @@ -414,7 +412,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: (7 * 4 roundUpTo: self wordSize) "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ | desiredSlots | @@ -432,7 +430,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: (desiredSlots * 8 / self wordSize) ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self compile: [ @@ -446,7 +444,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self compile: [ @@ -460,7 +458,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self compile: [ | jump | @@ -475,7 +473,7 @@ VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self assert: machineSimulator doublePrecisionFloatingPointRegister0Value equals: Float fmax. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -488,7 +486,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -505,7 +503,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -522,7 +520,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -539,7 +537,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegativ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -550,7 +548,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -567,7 +565,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 94). ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -585,7 +583,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -265). ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -598,7 +596,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagI self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -611,7 +609,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsS self assert: result equals: 0. "Incomplete Primitive, if the float cannot be allocated, it executes the C code" ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -631,7 +629,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ self assert: self machineSimulator receiverRegisterValue equals: (memory floatObjectOf: 42.0) ] -{ #category : 'tests - primitiveAsFloat' } +{ #category : #'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -654,7 +652,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmal equals: 8589934592 asFloat ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerReceiver [ | result | @@ -667,7 +665,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -680,7 +678,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -696,7 +694,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -714,7 +712,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerReceiver [ | result | @@ -727,7 +725,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerRece self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -740,7 +738,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallInteg self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -756,7 +754,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerA self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitAnd/Or' } +{ #category : #'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -774,7 +772,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerReceiver [ | result | @@ -787,7 +785,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerR self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -800,7 +798,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIn self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBiggerThanSmallIntegerBits [ | primitiveAddress endInstruction | @@ -818,7 +816,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBigge self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -834,7 +832,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ | primitiveAddress endInstruction | @@ -852,7 +850,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ | primitiveAddress endInstruction | @@ -874,7 +872,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ equals: (memory integerObjectOf: memory maxSmallInteger >> 1 << 1) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWithShiftRight [ | primitiveAddress endInstruction | @@ -896,7 +894,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWit equals: (memory integerObjectOf: 17) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBiggerThanNumSmallIntegerBits [ | primitiveAddress endInstruction | @@ -918,7 +916,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBi equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ | primitiveAddress endInstruction | @@ -936,7 +934,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 128) ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerReceiver [ | result | @@ -949,7 +947,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -962,7 +960,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -978,7 +976,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -996,7 +994,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ | endInstruction primitiveAddress | @@ -1014,7 +1012,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -1031,7 +1029,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1044,7 +1042,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1061,7 +1059,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1078,7 +1076,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1089,7 +1087,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1106,7 +1104,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1124,7 +1122,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1141,7 +1139,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1154,7 +1152,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIs self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -1171,7 +1169,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1188,7 +1186,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallIn self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1205,7 +1203,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1216,7 +1214,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSm self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1233,7 +1231,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1251,7 +1249,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1268,7 +1266,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1281,7 +1279,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsN self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1298,7 +1296,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInt self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1309,7 +1307,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSma self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1326,7 +1324,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1344,7 +1342,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNum self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveFormat' } +{ #category : #'tests - primitiveFormat' } VMJittedGeneralPrimitiveTest >> testPrimitiveFormatArray [ | primitiveAddress | @@ -1359,7 +1357,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveFormatArray [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: memory arrayFormat). ] -{ #category : 'tests - primitiveFormat' } +{ #category : #'tests - primitiveFormat' } VMJittedGeneralPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate [ | endInstruction primitiveAddress | @@ -1376,7 +1374,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveFormat' } +{ #category : #'tests - primitiveFormat' } VMJittedGeneralPrimitiveTest >> testPrimitiveFormatTrueObject [ | primitiveAddress | @@ -1391,7 +1389,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveFormatTrueObject [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). "According to SpurMemomyManager >> formatOfHeader:, the format of the True object is 0." ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1404,7 +1402,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfRecei self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1421,7 +1419,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1432,7 +1430,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceive self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1449,7 +1447,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1467,7 +1465,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNe self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1480,7 +1478,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1497,7 +1495,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1508,7 +1506,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1525,7 +1523,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1543,7 +1541,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveHashMultiply' } +{ #category : #'tests - primitiveHashMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHashMultiply [ | result primitiveAddress | @@ -1560,7 +1558,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHash self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50 hashMultiply). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1573,7 +1571,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1590,7 +1588,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1601,7 +1599,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1618,7 +1616,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1636,7 +1634,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1649,7 +1647,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1666,7 +1664,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1677,7 +1675,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1694,7 +1692,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1712,7 +1710,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1725,7 +1723,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1742,7 +1740,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflows [ | endInstruction primitiveAddress | @@ -1759,7 +1757,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ | endInstruction primitiveAddress | @@ -1778,7 +1776,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ | endInstruction primitiveAddress | @@ -1797,7 +1795,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -1814,7 +1812,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1825,7 +1823,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallInteger [ | endInstruction primitiveAddress | @@ -1842,7 +1840,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallIntege self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -84). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1859,7 +1857,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 84). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1877,7 +1875,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17424). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand [ | endInstruction primitiveAddress | @@ -1895,7 +1893,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop instanceVariableCount | @@ -1921,7 +1919,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ equals: memory nilObject ] ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop arraySize | @@ -1951,7 +1949,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectlyWhenNotAligned [ | endInstruction primitiveAddress class newOop arraySize | @@ -1982,7 +1980,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1995,7 +1993,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2012,7 +2010,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2023,7 +2021,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -2040,7 +2038,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2058,7 +2056,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -2076,7 +2074,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -2093,7 +2091,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2106,7 +2104,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2123,7 +2121,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -2140,7 +2138,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2151,7 +2149,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2168,7 +2166,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2186,7 +2184,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -2203,7 +2201,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ @@ -2222,7 +2220,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ @@ -2241,7 +2239,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ @@ -2260,7 +2258,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ @@ -2279,7 +2277,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -1). ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ @@ -2297,7 +2295,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2310,7 +2308,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2327,7 +2325,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -2344,7 +2342,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -2361,7 +2359,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2372,7 +2370,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2389,7 +2387,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -10). ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2407,7 +2405,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallIntegers [ | result | @@ -2419,7 +2417,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallI self assert: result equals: UnimplementedPrimitive. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentDoesNotReturn [ "If the argument is not an small integer, flow jumps and return does not (yet) happen" @@ -2445,7 +2443,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentD self assert: machineSimulator arg0RegisterValue equals: self memory falseObject. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self compile: [ @@ -2467,7 +2465,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject. ] -{ #category : 'tests - support' } +{ #category : #'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsTrue [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st index c78d8ff140..5d37bd7ef3 100644 --- a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMJittedLookupTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMJittedLookupTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'methodOop', 'selectorOop', 'receiver', 'receiverClass' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -27,7 +25,7 @@ VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -40,7 +38,7 @@ VMJittedLookupTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -53,7 +51,7 @@ VMJittedLookupTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setUpClassAndMethod [ @@ -65,7 +63,7 @@ VMJittedLookupTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" @@ -92,7 +90,7 @@ VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ | superclass superclassMethodDictionary foundMethod | @@ -125,7 +123,7 @@ VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ self assert: foundMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMJittedLookupTest >> testLookUpMNUWithAnyNonMethodObjectShouldNotJItCompile [ | superclass superclassMethodDictionary foundMethod | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st index 76898f93d9..7f9a69d72f 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedPrimitiveAtPutTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveAtPutTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtPutTest >> setUp [ super setUp. @@ -23,7 +21,7 @@ VMJittedPrimitiveAtPutTest >> setUp [ bytecodes: 10. ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtPutTest >> setUpTrampolines [ super setUpTrampolines. @@ -32,7 +30,7 @@ VMJittedPrimitiveAtPutTest >> setUpTrampolines [ ] -{ #category : 'tests' } +{ #category : #tests } VMJittedPrimitiveAtPutTest >> testPrimitiveAtPut32bitIndexableWithLargeNumberShouldStoreValue [ | integerArray offset expectedValue | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st index e36762ff81..18d5ef041c 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedPrimitiveAtTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveAtTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitiveAtTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveAtTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMJittedPrimitiveAtTest >> setUp [ bytecodes: 10. ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -43,7 +41,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -59,7 +57,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -75,7 +73,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBounds self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ | integerArray offset | @@ -102,7 +100,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -118,7 +116,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 16bit indexable' } +{ #category : #'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -144,7 +142,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShouldFallThrough [ | integerArray offset | @@ -160,7 +158,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShou self assertFallsThrough ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -176,7 +174,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ | integerArray offset | @@ -201,7 +199,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 32bit indexable' } +{ #category : #'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -230,7 +228,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -246,7 +244,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32BitsShouldFallthrough [ | integerArray offset | @@ -263,7 +261,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32Bits self assertFallsThrough ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldReturnValue [ | integerArray offset | @@ -290,7 +288,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldRe equals: SmallInteger maxVal + 1 ] -{ #category : 'tests - 64bit indexable' } +{ #category : #'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldReturnValue [ | integerArray offset | @@ -317,7 +315,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldRe equals: (memory integerObjectOf: 17) ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -332,7 +330,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -347,7 +345,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -362,7 +360,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -377,7 +375,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThro self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -392,7 +390,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -407,7 +405,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBounds self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ | integerArray offset | @@ -433,7 +431,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -448,7 +446,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -463,7 +461,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : 'tests - 8bit indexable' } +{ #category : #'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -489,7 +487,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldRetu equals: expectedValue ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ | offset array | @@ -502,7 +500,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ | offset array | @@ -516,7 +514,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShouldFallThrough [ | objectWithInstanceVariables | @@ -533,7 +531,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShould self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShouldFallThrough [ | objectWithNoInstanceVariables | @@ -548,7 +546,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShou self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ machineSimulator receiverRegisterValue: (memory characterObjectOf: $a codePoint). @@ -557,7 +555,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -569,7 +567,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'tests - immediate' } +{ #category : #'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtSmallIntegerShouldFallThrough [ machineSimulator receiverRegisterValue: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st index 9771567a95..f1948eec9d 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMJittedPrimitiveSizeTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedPrimitiveSizeTest, + #superclass : #VMJittedPrimitivesTest, #instVars : [ 'stop' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitiveSizeTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : 'running' } +{ #category : #running } VMJittedPrimitiveSizeTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMJittedPrimitiveSizeTest >> setUp [ bytecodes: 10. ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf16bitSlots [ | integerArray | @@ -43,7 +41,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf32bitSlots [ | integerArray | @@ -59,7 +57,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShouldReturnNumberOf32bitSlots [ | integerArray aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -85,7 +83,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShoul equals: 32768 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf64bitSlots [ | integerArray | @@ -101,7 +99,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : 'tests - bit indexable' } +{ #category : #'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8bitSlots [ | integerArray | @@ -117,7 +115,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8 equals: 7 ] -{ #category : 'tests - pointer indexable' } +{ #category : #'tests - pointer indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots [ | array | @@ -131,7 +129,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 7) ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ | objectWithInstanceVariables | @@ -146,7 +144,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThrough [ self prepareStackForSendReceiver: (memory characterObjectOf: $a codePoint). @@ -154,7 +152,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThroug self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -165,7 +163,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ self assertFallsThrough ] -{ #category : 'tests - fixed pointer layout' } +{ #category : #'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateIntegerShouldFallThrough [ self prepareStackForSendReceiver: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st index 99c580ac58..c306428b27 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st @@ -1,23 +1,21 @@ Class { - #name : 'VMJittedPrimitivesTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMJittedPrimitivesTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'classFloat' ], #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'private' } +{ #category : #private } VMJittedPrimitivesTest class >> isAbstract [ ^ self == VMJittedPrimitivesTest ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -30,7 +28,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: argumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -43,7 +41,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument ] -{ #category : 'utils' } +{ #category : #utils } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: firstArgumentOop and: secondArgumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -56,13 +54,13 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument self runUntilReturn ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : 'helpers' } +{ #category : #helpers } VMJittedPrimitivesTest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st index 17c2d6be67..94945ee4fb 100644 --- a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMJittedSmallFloatPrimitiveTest', - #superclass : 'VMJittedPrimitivesTest', + #name : #VMJittedSmallFloatPrimitiveTest, + #superclass : #VMJittedPrimitivesTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ "SmallFloats only exist in 64bits systems" @@ -17,7 +15,7 @@ VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -31,7 +29,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFl self assert: machineSimulator receiverRegisterValue equals: (self memory floatObjectOf: 3.0) ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -47,7 +45,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmal equals: 0.5 ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -63,7 +61,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse equals: memory falseObject ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -79,7 +77,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -95,7 +93,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -111,7 +109,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -127,7 +125,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenEqual [ cogit receiverTags: memory smallFloatTag. @@ -143,7 +141,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -159,7 +157,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -175,7 +173,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -191,7 +189,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -207,7 +205,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -223,7 +221,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -239,7 +237,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -255,7 +253,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -271,7 +269,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -287,7 +285,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASm equals: 6.0 ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -303,7 +301,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : 'tests - primitiveEquals' } +{ #category : #'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -319,7 +317,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : 'tests - primitiveSquareRoot' } +{ #category : #'tests - primitiveSquareRoot' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -334,7 +332,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASm equals: 2.0 sqrt ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSubtractTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. diff --git a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st index a1b3df39a5..63226acbf5 100644 --- a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st @@ -1,11 +1,10 @@ Class { - #name : 'VMLiterRulesTest', - #superclass : 'TestCase', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMLiterRulesTest, + #superclass : #TestCase, + #category : #VMMakerTests } -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ | ast | @@ -21,7 +20,7 @@ VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ ast pragmas first). ] -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ | ast | @@ -32,7 +31,7 @@ VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ ast pragmas first) ] -{ #category : 'tests' } +{ #category : #tests } VMLiterRulesTest >> testSlangTypeDeclarationForVariable [ | ast | diff --git a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st index 48bc2548f9..7094ce4b0e 100644 --- a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMLookUpTest', - #superclass : 'VMInterpreterTests', + #name : #VMLookUpTest, + #superclass : #VMInterpreterTests, #instVars : [ 'methodOop', 'selectorOop', @@ -14,12 +14,10 @@ Class { 'VMBasicConstants', 'VMBytecodeConstants' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest class >> testParameters [ ^ super testParameters * (ParametrizedTestMatrix new @@ -28,7 +26,7 @@ VMLookUpTest class >> testParameters [ yourself) ] -{ #category : 'assertions' } +{ #category : #assertions } VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ | length | @@ -39,19 +37,19 @@ VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ self deny: (memory isForwarded: selector) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMLookUpTest >> linearSearchLimit [ ^ linearSearchLimit ] -{ #category : 'accessing' } +{ #category : #accessing } VMLookUpTest >> linearSearchLimit: anObject [ linearSearchLimit := anObject ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -64,7 +62,7 @@ VMLookUpTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -77,7 +75,7 @@ VMLookUpTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : 'running' } +{ #category : #running } VMLookUpTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -133,7 +131,7 @@ VMLookUpTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> setUpClassAndMethod [ @@ -145,7 +143,7 @@ VMLookUpTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ "We set a smallInteger class into the classTable" @@ -155,7 +153,7 @@ VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ equals: receiverClass ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsForwardedMethod [ | aMethodDictionary | @@ -171,7 +169,7 @@ VMLookUpTest >> testLookUpFindsForwardedMethod [ self assert: interpreter newMethod equals: methodOop. ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodInClass [ | aMethodDictionary | @@ -186,7 +184,7 @@ VMLookUpTest >> testLookUpFindsMethodInClass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodInSuperclass [ | superclass superclassMethodDictionary | @@ -211,7 +209,7 @@ VMLookUpTest >> testLookUpFindsMethodInSuperclass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ | aMethodDictionary | @@ -228,7 +226,7 @@ VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ self assertNonForwardedSelectorsIn: aMethodDictionary ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ | aMethodDictionary | @@ -243,7 +241,7 @@ VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -285,7 +283,7 @@ VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -321,7 +319,7 @@ VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ | superclass superclassMethodDictionary | @@ -343,7 +341,7 @@ VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ | nonExistingSelector superclass superclassMethodDictionary dnuMethodOop dnuSelectorOop | @@ -381,7 +379,7 @@ VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ | nonExistingSelector aMethodDictionary | @@ -402,7 +400,7 @@ VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ self should: [interpreter lookupMethodInClass: receiverClass] raise: Error. ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -436,7 +434,7 @@ VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ "There is no superclass, so no cannotInterpret: to call" @@ -458,7 +456,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ self should: [ interpreter lookupMethodInClass: receiverClass ] raise: Error ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUMethod [ "Class has a nil methodDictionary, so `cannotInterpret:` is send. But superclass does not understand it, so `doesNotUnderstand:` is called instead." @@ -504,7 +502,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUM self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -544,7 +542,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ self assert: interpreter newMethod equals: cannotInterpretMethodOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ | aMethodDictionary receiverOop frame | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." @@ -569,7 +567,7 @@ VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformExecutes [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -587,7 +585,7 @@ VMLookUpTest >> testPrimitivePerformExecutes [ self assert: interpreter stackTop equals: receiverOop ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformFindsMethodOop [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -608,7 +606,7 @@ VMLookUpTest >> testPrimitivePerformFindsMethodOop [ "(1) the Instruction Pointer is set to be just before the bytecode to execute, so fetchNextBytecode will fetch the first bytecode ( #justActivateNewMethod: )" ] -{ #category : 'tests' } +{ #category : #tests } VMLookUpTest >> testPrimitivePerformSetsIPBeforeFirstBytecode [ | aMethodDictionary receiverOop | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." diff --git a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st index acd7a0e1c3..245cbd43ed 100644 --- a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st @@ -1,47 +1,46 @@ Class { - #name : 'VMMASTTranslationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #name : #VMMASTTranslationTest, + #superclass : #TestCase, + #category : #VMMakerTests } -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> + arg [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> emptyBlockHasSingleNilStatement [ [ ] value ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineMethodWithLoop [ self methodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineSecondLevelMethodWithLoop [ self inlineMethodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineTwiceMethodWithLoop [ self methodWithLoop. self methodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlineTwiceSecondLevelMethodWithLoop [ self inlineMethodWithLoop. self inlineMethodWithLoop ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ @@ -51,17 +50,17 @@ VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithArgument: anArgument [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithExpressionInLoopCondition [ 1 to: self something - 10 do: [ :i | self foo: i ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNil [ self something @@ -69,7 +68,7 @@ VMMASTTranslationTest >> methodWithIfNil [ ifNotNil: [ 2 ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNil [ self something @@ -78,7 +77,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNil [ ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ self something @@ -86,7 +85,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNil [ self something @@ -94,7 +93,7 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNil [ ifNil: [ 2 ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ self something @@ -102,14 +101,14 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ ifNil: [ ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilWithArgument [ self something ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ @@ -118,17 +117,17 @@ VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ self inlinedMethodWithLocalWithSameName. ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithLoop [ 1 to: 10 do: [ :i | self foo: i ] ] -{ #category : 'generation-targets' } +{ #category : #'generation-targets' } VMMASTTranslationTest >> methodWithNoArguments [ ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testArgumentIsNoTemp [ | translation method | @@ -138,7 +137,7 @@ VMMASTTranslationTest >> testArgumentIsNoTemp [ self deny: (translation locals includes: method methodNode arguments first name) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -175,7 +174,7 @@ VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -212,7 +211,7 @@ VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -244,7 +243,7 @@ VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ | translation method codeGenerator block | @@ -260,7 +259,7 @@ VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ self assert: block statements first value equals: nil ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ | translation | @@ -269,7 +268,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ self assert: translation statements first selector equals: #ifTrue:ifFalse: ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ | translation | @@ -289,7 +288,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ | translation | @@ -309,7 +308,7 @@ VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -324,7 +323,7 @@ VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ self assert: (translation locals includesAll: inlinedMethod locals) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -340,7 +339,7 @@ VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVar self assert: translation locals asSet size equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -355,7 +354,7 @@ VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVari self assert: translation locals asSet size equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -371,7 +370,7 @@ VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopInd self assert: translation locals asSet size equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ | method codeGenerator methodTranslation inlinedMethod inlinedMethodTranslation | @@ -391,7 +390,7 @@ VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ self assert: (methodTranslation declarations at: #cond2) equals: 'pthread_cond_t cond2' ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testKeywordMethodHasArgument [ | translation method | @@ -401,7 +400,7 @@ VMMASTTranslationTest >> testKeywordMethodHasArgument [ self assert: (translation args includes: method methodNode arguments first name) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ | translation method loop | @@ -412,7 +411,7 @@ VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ self assert: loop arguments size equals: 4 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable [ | translation method loop | @@ -423,7 +422,7 @@ VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable self assert: loop arguments size equals: 6 ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ | translation method block | @@ -434,7 +433,7 @@ VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ self deny: (translation locals includes: block arguments first) ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid [ | translation codeGenerator | @@ -451,7 +450,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid self assert: translation returnType equals: #void ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ | translation codeGenerator | @@ -468,7 +467,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ self assert: translation returnType equals: #void ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ | translation | @@ -477,7 +476,7 @@ VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ self assert: translation selector equals: #+. ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ | translation method | @@ -487,7 +486,7 @@ VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ self assert: translation selector equals: method selector. ] -{ #category : 'tests' } +{ #category : #tests } VMMASTTranslationTest >> testTranslateUnaryMethodHasSameName [ | translation method | diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st index 74591986af..bc7e61b968 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMMachineCodeFrameBuilderForTest', - #superclass : 'Object', + #name : #VMMachineCodeFrameBuilderForTest, + #superclass : #Object, #instVars : [ 'test', 'returnAddress', @@ -10,21 +10,20 @@ Class { 'spouseContext', 'method' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> arguments [ ^ arguments ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> arguments: anObject [ arguments := anObject ] -{ #category : 'building' } +{ #category : #building } VMMachineCodeFrameBuilderForTest >> buildFrame [ | methodAddress | @@ -55,13 +54,13 @@ VMMachineCodeFrameBuilderForTest >> buildFrame [ test cogit needsFrame: true. ] -{ #category : 'testing' } +{ #category : #testing } VMMachineCodeFrameBuilderForTest >> hasSpouseContext [ ^ spouseContext notNil ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ self test: aTest. @@ -71,63 +70,63 @@ VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ temporaries := #(). ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> method [ ^ method ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> method: anObject [ method := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> receiver [ ^ receiver ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> receiver: anObject [ receiver := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> returnAddress [ ^ returnAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> returnAddress: anObject [ returnAddress := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> spouseContext [ ^ spouseContext ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> spouseContext: aContextOop [ spouseContext := aContextOop ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> temporaries [ ^ temporaries ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> temporaries: anObject [ temporaries := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> test [ ^ test ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeFrameBuilderForTest >> test: anObject [ test := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st index b46584b7c3..a4ead00b02 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMMachineCodeMethod', - #superclass : 'Object', + #name : #VMMachineCodeMethod, + #superclass : #Object, #instVars : [ 'virtualMachine', 'cogMethodSurrogate' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogate: aCogMethodSurrogate [ ^ self new @@ -22,17 +20,17 @@ VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogat yourself ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> cogMethodSurrogate [ ^ cogMethodSurrogate ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> cogMethodSurrogate: anObject [ cogMethodSurrogate := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> disassemble [ | methodEntry instructions | methodEntry := cogMethodSurrogate asInteger + virtualMachine cogit entryOffset. @@ -44,12 +42,12 @@ VMMachineCodeMethod >> disassemble [ ' join: (instructions collect: [:i | i assemblyCodeString]) ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMMachineCodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st index 078c4b36a4..5a50d7cb27 100644 --- a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMMachineSimulatorTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMMachineSimulatorTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogAbstractRegisters' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - instruction exception' } +{ #category : #'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ | label lastInstruction subInstruction breakInstruction | @@ -38,7 +36,7 @@ VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ ] -{ #category : 'tests - instruction exception' } +{ #category : #'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ | label lastInstruction subInstruction breakInstruction | @@ -67,7 +65,7 @@ VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -95,7 +93,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ | label lastInstruction invalidAddressHandled addInstruction jumpInstruction | @@ -135,7 +133,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ equals: jumpInstruction address ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ | label lastInstruction invalidAddressHandled | @@ -179,7 +177,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ ^ self ] ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespected [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -215,7 +213,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self temporaryRegisterValue equals: 1 ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespectedCorrectInstructionPointer [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -251,7 +249,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self machineSimulator instructionPointerRegisterValue equals: jumpInstruction address ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -278,7 +276,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -304,7 +302,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -331,7 +329,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -357,7 +355,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : 'tests - memory access exception' } +{ #category : #'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -388,7 +386,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAd self assert: invalidAddressHandled ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ | label lastInstruction subInstruction | @@ -414,7 +412,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstructionPointer [ | label lastInstruction subInstruction jumpInstruction | @@ -439,7 +437,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstru ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ | label lastInstruction | @@ -461,7 +459,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ self fail. ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPointer [ | label lastInstruction | @@ -485,7 +483,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPoi self fail. ] -{ #category : 'tests - normal execution' } +{ #category : #'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionUntilAddressIsRespected [ | label lastInstruction | diff --git a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st index 15c0afc846..be3b8ddce2 100644 --- a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st +++ b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st @@ -1,16 +1,14 @@ Class { - #name : 'VMMockCodeGenerator', - #superclass : 'Object', + #name : #VMMockCodeGenerator, + #superclass : #Object, #instVars : [ 'interpreter', 'addedPrimitives' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ ^ self new @@ -18,13 +16,13 @@ VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ yourself ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> accessorDepthCalculator [ ^ self ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> accessorDepthForSelector: aString [ ^ addedPrimitives at: aString @@ -32,31 +30,31 @@ VMMockCodeGenerator >> accessorDepthForSelector: aString [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector [ self addPrimitive: aSelector accessorDepth: -1 ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector accessorDepth: aDepth [ addedPrimitives at: aSelector put: aDepth ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> exportedPrimitiveNames [ ^ (addedPrimitives keys collect: [ :e | e -> e ]) asDictionary ] -{ #category : 'initialization' } +{ #category : #initialization } VMMockCodeGenerator >> initialize [ addedPrimitives := Dictionary new ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> initializeWithPrimitiveTable [ interpreter primitiveTable @@ -64,7 +62,7 @@ VMMockCodeGenerator >> initializeWithPrimitiveTable [ thenDo: [ :aSelector | self addPrimitive: aSelector ] ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMMockCodeGenerator >> interpreter: aCogVMSimulatorLSB [ interpreter := aCogVMSimulatorLSB. diff --git a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st index acfab19b5c..42382cc3ae 100644 --- a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMObjectAccessorIdentificationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests-Simulation', - #package : 'VMMakerTests', - #tag : 'Simulation' + #name : #VMObjectAccessorIdentificationTest, + #superclass : #TestCase, + #category : #'VMMakerTests-Simulation' } -{ #category : 'tests' } +{ #category : #tests } VMObjectAccessorIdentificationTest >> testObjectAccessorMessagesAreCorrectlyDetected [ | knownSelectors nonAccessorSelectors | diff --git a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st index 54dd7eedd7..5419d39e53 100644 --- a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st @@ -1,19 +1,17 @@ Class { - #name : 'VMObjectLayoutTests', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-ObjectLayoutTests', - #package : 'VMMakerTests', - #tag : 'ObjectLayoutTests' + #name : #VMObjectLayoutTests, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-ObjectLayoutTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMObjectLayoutTests >> formatFromInstSpec: instSpecInt instSize: instSizeInt [ "A class format is composed by" "<5 bits inst spec><16 bits inst size>" ^ instSpecInt << 16 + instSizeInt ] -{ #category : 'helpers' } +{ #category : #helpers } VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSize: aSizeInt [ | class | class := self @@ -23,7 +21,7 @@ VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSi ^class ] -{ #category : 'helper' } +{ #category : #helper } VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ | objSize | "always have at least one slot for forwarders" @@ -39,7 +37,7 @@ VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testCharacterIsImmediate [ | char | char := memory characterObjectOf: $a asInteger. @@ -47,7 +45,7 @@ VMObjectLayoutTests >> testCharacterIsImmediate [ self assert: (memory fetchClassTagOf: char) equals: 2 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ | class objOop | 0 to: 254 do: [ :slots | @@ -63,19 +61,19 @@ VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ equals: objSize ] ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesInRange [ self assert: (memory isIntegerValue: memory minSmallInteger) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesNotInRange [ "An integer smaller than the smallest integer is not in a valid range" self deny: (memory isIntegerValue: memory minSmallInteger - 1) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectAlignment [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -86,7 +84,7 @@ VMObjectLayoutTests >> testObjectAlignment [ self assert: objOop2 \\ 8 equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ | class objOop header | 0 to: 254 do: [ :slots | @@ -97,7 +95,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ | class objOop header classIndex | 0 to: 10 do: [ :slots | @@ -110,7 +108,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ | class objOop header classInstSpec | "instSpec: @@ -125,7 +123,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout16Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 12-15 = 16-bit indexable @@ -147,7 +145,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout32Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 10-11 = 32-bit indexable @@ -167,7 +165,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout8Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 16-23 = 8-bit indexable @@ -194,7 +192,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayout [ | class objOop header classInstSpec instSpec | instSpec := 2. "instSpec for indexable objects with no inst vars (Array et al)" @@ -208,7 +206,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayo ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectMinimumSize [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -218,7 +216,7 @@ VMObjectLayoutTests >> testObjectMinimumSize [ self assert: objOop2 - objOop1 equals: 16 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ | class slots obj1oop obj2oop | "objects always are allocated with at least one slots for forwarding" @@ -229,7 +227,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ self assert: obj2oop - obj1oop equals: self objectHeaderSize + memory allocationUnit ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForwarding [ | class slots oop | slots := 0. @@ -238,7 +236,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForw self assert: (memory bytesInObject: oop) equals: self objectHeaderSize + memory allocationUnit. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ | class objOop slots | slots := 255. @@ -253,7 +251,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ | class objOop bigOopHeader mask numSlots | mask := 16rFFFFFFFFFFFFFF. @@ -267,7 +265,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ self assert: numSlots equals: slots ] ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ "Test of the border case when int = 2r000111111... . The highest possible value using usqInt encoding is (2**61) -1 since (2**61) can be confused with a pointer (on a 64 bits machine) Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guarantees the portability @@ -276,25 +274,25 @@ VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ self deny: (memory isIntegerValue: memory maxCInteger >> memory numSmallIntegerTagBits) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase2 [ "Test of the border case when int = 2r111000000 ... . Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guaranties the portability of the test on 32 and 64 bit computer. " self deny: (memory isIntegerValue: (memory maxCInteger >> memory numSmallIntegerTagBits) bitInvert) "<=> isIntegerValue: (0001111) bitInvert" ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesInRange [ self assert: (memory isIntegerValue: memory maxSmallInteger) ] -{ #category : 'tests - integerValues' } +{ #category : #'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesNotInRange [ self deny: (memory isIntegerValue: memory maxSmallInteger + 1) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testSmallIntegerIsImmediate [ | int | int := memory integerObjectOf: 42. @@ -302,7 +300,7 @@ VMObjectLayoutTests >> testSmallIntegerIsImmediate [ self assert: (memory fetchClassTagOf: int) equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectLayoutTests >> testVariableObjectWithInstVarsHasTheRightSize [ | class objOop fixedFieldsSize indexableSize | indexableSize := 12. diff --git a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st index c780fcb9c2..b3400f900f 100644 --- a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMObjectStackTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMObjectStackTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ @@ -14,7 +12,7 @@ VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ self assert: memory mournQueue equals: (memory objStackAt: 4098"MournQueueRootIndex") ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testNewMournQueueIsEmpty [ | objStack | @@ -24,7 +22,7 @@ VMObjectStackTest >> testNewMournQueueIsEmpty [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testNewObjectStackIsEmpty [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -35,7 +33,7 @@ VMObjectStackTest >> testNewObjectStackIsEmpty [ ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ | objStack | @@ -48,7 +46,7 @@ VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ ]. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -62,7 +60,7 @@ VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ ]. ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopMournQueueReducesSize [ | objStack | @@ -72,7 +70,7 @@ VMObjectStackTest >> testPopMournQueueReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ | objStack | @@ -81,7 +79,7 @@ VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -91,7 +89,7 @@ VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPopObjectStackReducesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -102,14 +100,14 @@ VMObjectStackTest >> testPopObjectStackReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjects: n [ "Create an object stack at the position of the mark stack in the class table (4096)" self testPushObjects: n inStackAtIndex: 4096 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ memory ensureRoomOnObjStackAt: objectStackIndex. @@ -121,19 +119,19 @@ VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ self assert: (memory sizeOfObjStack: (memory objStackAt: objectStackIndex)) equals: n ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjectsAboveObjectStackLimit [ self testPushObjects: memory objectStackPageLimit + 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushObjectsToObjectStackLimit [ self testPushObjects: memory objectStackPageLimit ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushToMournQueueIncreasesSize [ | objStack | @@ -142,7 +140,7 @@ VMObjectStackTest >> testPushToMournQueueIncreasesSize [ self assert: (memory sizeOfObjStack: objStack) equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMObjectStackTest >> testPushToObjectStackIncreasesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st index 822de70068..3cdae8df48 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPermanentSpaceImageReadingTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #name : #VMPermanentSpaceImageReadingTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-PermSpace' } -{ #category : 'utilities' } +{ #category : #utilities } VMPermanentSpaceImageReadingTest >> loadImage [ | memoryClass isa | @@ -39,7 +37,7 @@ VMPermanentSpaceImageReadingTest >> loadImage [ ] -{ #category : 'initialization' } +{ #category : #initialization } VMPermanentSpaceImageReadingTest >> setUp [ super setUp. @@ -51,7 +49,7 @@ VMPermanentSpaceImageReadingTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpaceImageReadingTest >> testLoadingImageHasEmptyPermSpaceWhenImageDoesNotHave [ self saveImage. diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st index 81376cf7b0..01eaca0a91 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPermanentSpaceMemoryTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #name : #VMPermanentSpaceMemoryTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-PermSpace' } -{ #category : 'running' } +{ #category : #running } VMPermanentSpaceMemoryTest >> setUp [ super setUp. @@ -14,7 +12,7 @@ VMPermanentSpaceMemoryTest >> setUp [ self createWeakArrayClass ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ | permanentObject allInstances | @@ -27,7 +25,7 @@ VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ self assert: (memory fetchPointer: 0 ofObject: allInstances) equals: permanentObject. ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ | permanentObject oldObject youngReplacement arrFrom arrTo ec | @@ -54,7 +52,7 @@ VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ self deny: ec equals: PrimNoErr ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenModified [ | oldObject1 permanentObject1 | @@ -75,7 +73,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenMoving [ | oldObject1 permanentObject1 | @@ -96,7 +94,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ | permanentObject newObject | @@ -114,7 +112,7 @@ VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ | permanentObject oldObject | @@ -132,7 +130,7 @@ VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ | oldObject youngObject permanentObject | @@ -161,7 +159,7 @@ VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememberedSet [ | permanentObject youngObject rootObject| @@ -177,7 +175,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememb self assert: (memory getFromPermToNewSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRememberedSet [ | permanentObject oldObject rootObject| @@ -194,7 +192,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRemembe self assert: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded [ | permanentObject oldObject rootObject| @@ -217,7 +215,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ | permanentObject oldObject | @@ -232,7 +230,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesArray [ | permanentObject youngObject rootObject anArray| @@ -256,7 +254,7 @@ VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesAr self assert: (memory getMemoryMap isPermanentObject: youngObject). ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ | permanentObject | @@ -266,7 +264,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ self assert: permanentObject equals: memory getMemoryMap permSpaceStart + 16 "There is a zero-slot objects always in the perm space" ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ | permanentObject | @@ -276,7 +274,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ self deny: (memory getMemoryMap isYoungObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ | permanentObject | @@ -286,7 +284,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ self deny: (memory getMemoryMap isOldObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ | permanentObject | @@ -296,7 +294,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ self assert: (memory getMemoryMap isPermanentObject: permanentObject) ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ | permanentObject nextObject | @@ -308,7 +306,7 @@ VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ | oldObject1 permanentObject1 oldObject2 youngObject | @@ -345,7 +343,7 @@ VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ ] -{ #category : 'tests - allocation' } +{ #category : #'tests - allocation' } VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRememberedSetAndThenRemoved [ | oldObject1 oldObject2 permObject2 | @@ -369,7 +367,7 @@ VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRemembered self assert: memory getFromPermToNewSpaceRememberedSet rememberedSetSize equals: 0. ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ @@ -387,7 +385,7 @@ VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 array | @@ -408,7 +406,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInReme ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTheRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array youngObject | @@ -440,7 +438,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTh ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array | @@ -463,7 +461,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFro self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -483,7 +481,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -501,7 +499,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememb ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForwarderInOldSpace [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -516,7 +514,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForw self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: oldObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarderInScanvenge [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -533,7 +531,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarde self deny: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderInGC [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -550,7 +548,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderIn self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompactingForSaving [ | oldObject1 permanentObject1 oldObject2 oldObject2Hash | @@ -574,7 +572,7 @@ VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompa self assert: (memory hashBitsOf: (memory fetchPointer: 0 ofObject: permanentObject1)) equals: oldObject2Hash ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ | permanentObject oldObject oldClass oldClassHash found | @@ -600,7 +598,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ self assert: found ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered [ @@ -613,7 +611,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemembered [ @@ -626,7 +624,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ @@ -638,7 +636,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ @@ -651,7 +649,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedWhenPointingToMachineCodeMethod [ @@ -682,7 +680,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedW self assert: (memory fetchPointer: 0 ofObject: permanentObject ) equals: fakeMachineCodeMethod. ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRememberedSet [ @@ -704,7 +702,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRemem ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -730,7 +728,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | @@ -759,7 +757,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNille ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -782,7 +780,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFire ] -{ #category : 'test - moving' } +{ #category : #'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st index 5ba4cc63d3..7393d6f584 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st @@ -1,17 +1,15 @@ Class { - #name : 'VMPermanentSpacePrimitiveTest', - #superclass : 'VMAbstractPrimitiveTest', + #name : #VMPermanentSpacePrimitiveTest, + #superclass : #VMAbstractPrimitiveTest, #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : 'VMMakerTests-PermSpace', - #package : 'VMMakerTests', - #tag : 'PermSpace' + #category : #'VMMakerTests-PermSpace' } -{ #category : 'configuring' } +{ #category : #configuring } VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ super configureEnvironmentBuilder. @@ -19,7 +17,7 @@ VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ environmentBuilder permSpaceSize: 10*1024*1024. ] -{ #category : 'initialization' } +{ #category : #initialization } VMPermanentSpacePrimitiveTest >> setUp [ super setUp. @@ -27,7 +25,7 @@ VMPermanentSpacePrimitiveTest >> setUp [ self createWeakArrayClass. ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ interpreter push: (memory integerObjectOf: 42). @@ -37,7 +35,7 @@ VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ interpreter push: (self newZeroSizedObject). @@ -47,7 +45,7 @@ VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ interpreter push: (self newOldSpaceObjectWithSlots: 0). @@ -57,7 +55,7 @@ VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ | oldObj permObject | @@ -71,7 +69,7 @@ VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ | oldObject | @@ -86,7 +84,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ | oldObject | @@ -101,7 +99,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ | newObject | @@ -116,7 +114,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ | oldObject | @@ -131,7 +129,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksWithByteArray [ | oldObject | diff --git a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st index f23f44e730..2b4eea4684 100644 --- a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMPinnedObjectTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMPinnedObjectTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> lastAliveObject [ ^ self keptObjectInVMVariable2 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> lastPinnedObject [ ^ self keptObjectInVMVariable1 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newAliveObject [ | newAliveObject | newAliveObject := self newOldSpaceObjectWithSlots: 1. @@ -25,12 +23,12 @@ VMPinnedObjectTest >> newAliveObject [ ^ newAliveObject ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newDeadObject [ ^ self newOldSpaceObjectWithSlots: 1 ] -{ #category : 'helper' } +{ #category : #helper } VMPinnedObjectTest >> newKeptPinnedObject [ | newPinned | newPinned := self newOldSpaceObjectWithSlots: 1. @@ -40,7 +38,7 @@ VMPinnedObjectTest >> newKeptPinnedObject [ ^ newPinned ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed aliveHash | "D = Dead @@ -70,7 +68,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOld self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPinnedObject [ | aliveObject destination | "D = Dead @@ -98,7 +96,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPi self assert: self lastAliveObject equals: destination. ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -128,7 +126,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStar self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBeforeFirstPinned [ | aliveObject destination | "D = Dead @@ -156,7 +154,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBefore self assert: self lastAliveObject equals: destination. ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -186,7 +184,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfO self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDead [ | destination aliveObject aliveObjectHash | "D = Dead @@ -212,7 +210,7 @@ VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDea self assert: (memory isFreeObject: (memory objectAfter: self lastPinnedObject)). ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ "if we follow the forwarder, the object is in the old space" | obj | @@ -223,7 +221,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ self assert: (memory isInOldSpace: (memory followForwarded: obj)) ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForwarderBehind [ | obj | obj := self newObjectWithSlots: 0. @@ -233,7 +231,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForward self assert: (memory isForwarded: obj) ] -{ #category : 'tests' } +{ #category : #tests } VMPinnedObjectTest >> testPinnedObjectShouldNotBeMovedByGC [ | pinned | self newOldSpaceObjectWithSlots: 0. "deadObject, that differenciate the start of the old space to the pin" diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st index 87474aad24..1c7a580223 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st @@ -1,17 +1,15 @@ Class { - #name : 'VMPrimitiveCallAbstractTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMPrimitiveCallAbstractTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'baseMethodIP', 'baseFrame', 'baseMethod' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver arguments: arguments returnAddress: returnAddress [ machineSimulator receiverRegisterValue: receiver. @@ -34,19 +32,19 @@ VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver a ] -{ #category : 'helpers' } +{ #category : #helpers } VMPrimitiveCallAbstractTest >> findMethod: aSelector [ ^ self class lookupSelector: aSelector ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> jitOptions [ ^ super jitOptions @@ -54,13 +52,13 @@ VMPrimitiveCallAbstractTest >> jitOptions [ yourself ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodReturningNil [ ^ nil ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ "This method is used to test sends. @@ -68,7 +66,7 @@ VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ ^ self methodWithSend: $7 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ "This method is used to test sends. @@ -76,7 +74,7 @@ VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ ^ self methodWithSend: Object ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ "This method is used to test sends. @@ -84,7 +82,7 @@ VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ ^ self methodWithSend: nil ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ "This method is used to test the invocation of a primitive. @@ -94,7 +92,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ ^ 84 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ "This method is used to test the invocation of a primitive. @@ -104,7 +102,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ ^ 84 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ @@ -112,7 +110,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ "This method is used to test the invocation of a primitive. @@ -122,7 +120,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ "This method is used to test the invocation of a primitive. @@ -132,13 +130,13 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodToCompile1 [ ^ 42 ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend [ "This method is used to test sends. @@ -146,7 +144,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend [ ^ self send ] -{ #category : 'methods under test' } +{ #category : #'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend: arg [ "This method is used to test sends. @@ -154,7 +152,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend: arg [ ^ arg send ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveCallAbstractTest >> setUp [ | primitiveAccessorDepthTable | @@ -179,7 +177,7 @@ VMPrimitiveCallAbstractTest >> setUp [ ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveCallAbstractTest >> setUpTrampolines [ super setUpTrampolines. diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st index 084419c9cc..384475fb9b 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMPrimitiveCallingTest', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #name : #VMPrimitiveCallingTest, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -28,7 +26,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLongStore [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -50,7 +48,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLong self assert: interpreter fetchByte equals: 16rF4 ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -72,7 +70,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: interpreter framePointer) equals: (memory integerObjectOf: -1) ] -{ #category : 'tests' } +{ #category : #tests } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTempWithInternalActivation [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st index 009a19163e..20591fd644 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st @@ -1,17 +1,15 @@ Class { - #name : 'VMPrimitiveTest', - #superclass : 'VMInterpreterTests', + #name : #VMPrimitiveTest, + #superclass : #VMInterpreterTests, #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'asserting' } +{ #category : #asserting } VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ | numSlotOop numSlotOopToCompare | @@ -25,7 +23,7 @@ VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMPrimitiveTest >> fillNewSpace [ "Allocate enough space to generate a full new space" @@ -37,7 +35,7 @@ VMPrimitiveTest >> fillNewSpace [ classIndex: memory arrayClassIndexPun) isNotNil ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -48,7 +46,7 @@ VMPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : 'running' } +{ #category : #running } VMPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -73,7 +71,7 @@ VMPrimitiveTest >> setUp [ interpreter setStackPageAndLimit: page ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> setUpForwardedObjects [ | class1 class2 object1 object2 array1 array2 | @@ -97,7 +95,7 @@ VMPrimitiveTest >> setUpForwardedObjects [ ^ object1. ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -110,7 +108,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -123,7 +121,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ | string | @@ -139,7 +137,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ interpreter push: (memory integerObjectOf: 1). @@ -154,7 +152,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -171,7 +169,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflow [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -184,7 +182,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflow [ ] -{ #category : 'tests - primitiveAdd' } +{ #category : #'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ | maxSmallInt | @@ -202,7 +200,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -223,7 +221,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferen self assert: (memory isForwarded: object2) equals: true ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -244,7 +242,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ self assert: (memory fetchClassOf: object2) equals: class1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -265,7 +263,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSi self assert: (memory fetchClassOf: (memory followForwarded: object2)) equals: class1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -287,7 +285,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ self assert: (memory fetchInteger: 0 ofObject: object2) equals: 42. ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -313,7 +311,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferen self assert: (memory fetchInteger: 0 ofObject: (memory followForwarded: object2)) equals: 42 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -336,7 +334,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ self assert: (memory rawHashBitsOf: object2) equals: hash1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDifferentSize [ | class1 class2 object1 object2 hash1 hash2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -360,7 +358,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDiff self assert: (memory rawHashBitsOf: (memory followForwarded: object2)) equals: hash1 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ | class immediate array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -379,7 +377,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -400,7 +398,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ self assert: interpreter primFailCode equals: PrimErrNoModification ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -420,7 +418,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ self assert: interpreter primFailCode equals: PrimErrObjectIsPinned ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNotCopyHash [ | class object1 object2 hash2BeforeBecome array1 array2 object2FromForwarder | class := self @@ -443,7 +441,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNot self assert: (memory hashBitsOf: object2) equals: hash2BeforeBecome ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -466,7 +464,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHa self deny: (memory hashBitsOf: object2) equals: hash2 ] -{ #category : 'tests - become' } +{ #category : #'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOriginalObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -486,7 +484,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOrigi self assert: (memory followForwarded: object1) equals: object2 ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacter [ interpreter push: (memory integerObjectOf: 65). @@ -496,7 +494,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacter [ self assert: interpreter stackTop equals: (memory characterObjectOf: 65). ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ | invalidNumber | @@ -515,7 +513,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAsCharacter' } +{ #category : #'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ interpreter push: memory trueObject. @@ -526,7 +524,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -550,7 +548,7 @@ VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: interpreter stackTop. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -561,7 +559,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -576,7 +574,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -590,7 +588,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ | class objectInstance biggerClass objectForwarded array1 array2 | "Forwarding an object happens when becoming it with a bigger object" @@ -620,7 +618,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -632,7 +630,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ | class objectInstance | "I don't know how to force a bad argument count." @@ -655,7 +653,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -671,7 +669,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -686,7 +684,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ | class object slotIndex objectToPutInSlot | @@ -709,7 +707,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ self assert: interpreter primFailCode equals: 2. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -733,7 +731,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ self assert: interpreter primFailCode equals: PrimErrNoModification. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -749,7 +747,7 @@ VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -772,7 +770,7 @@ VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger >> memory numSmallIntegerTagBits)). @@ -783,7 +781,7 @@ VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -794,7 +792,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -805,7 +803,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ | string | @@ -822,7 +820,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ | string | @@ -836,7 +834,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -847,7 +845,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ "This insures the fact that no data is lost during the processing of usqInt by the primitive" @@ -863,7 +861,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : 'tests - primitiveBitAnd' } +{ #category : #'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ "111... 010110 -> -42 000... 010110 -> 21""" @@ -876,7 +874,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: 21). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -887,7 +885,7 @@ VMPrimitiveTest >> testPrimitiveBitOr1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -902,7 +900,7 @@ VMPrimitiveTest >> testPrimitiveBitOr2 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr3 [ interpreter push: (memory integerObjectOf: 16r0). @@ -917,7 +915,7 @@ VMPrimitiveTest >> testPrimitiveBitOr3 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr4 [ "This is to insure that primitiveBitOr executes a logical Or and not an XOr" @@ -933,7 +931,7 @@ VMPrimitiveTest >> testPrimitiveBitOr4 [ ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ interpreter push: memory trueObject. @@ -947,7 +945,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -958,7 +956,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -969,7 +967,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ "This insure the fact that no data is lost during the processing of usqInt by the primitive" @@ -985,7 +983,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : 'tests - primitiveBitOr' } +{ #category : #'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ interpreter push: (memory integerObjectOf: -73). @@ -996,7 +994,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> memory numSmallIntegerTagBits) - 1)). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShift1 [ interpreter push: (memory integerObjectOf: 2). @@ -1007,7 +1005,7 @@ VMPrimitiveTest >> testPrimitiveBitShift1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1020,7 +1018,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -1033,7 +1031,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ interpreter push: memory trueObject. @@ -1046,7 +1044,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftLeft [ interpreter push: (memory integerObjectOf: 16). @@ -1057,7 +1055,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftLeft [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftRight [ interpreter push: (memory integerObjectOf: 16). @@ -1068,7 +1066,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftRight [ self assert: interpreter stackTop equals: (memory integerObjectOf: 8). ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ memory wordSize = 8 ifFalse: [ ^ self ]. "The 32 bits version of the primitive doesn't handle the negativ number case" @@ -1080,7 +1078,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ equals: (memory integerObjectOf: 16r1C00000000000000) ] -{ #category : 'tests - primitiveBitShift' } +{ #category : #'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ "Insures no data is lost when bitshift overflows the integer type." @@ -1092,7 +1090,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ self assert: (interpreter stackTop) > (memory maxSmallInteger). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1103,7 +1101,7 @@ VMPrimitiveTest >> testPrimitiveBitXor1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor2 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1114,7 +1112,7 @@ VMPrimitiveTest >> testPrimitiveBitXor2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor3 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1125,7 +1123,7 @@ VMPrimitiveTest >> testPrimitiveBitXor3 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor4 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1136,7 +1134,7 @@ VMPrimitiveTest >> testPrimitiveBitXor4 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ interpreter push: memory trueObject. @@ -1150,7 +1148,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1161,7 +1159,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1172,7 +1170,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ "This guarantees the fact that no data is lost during the processing of usqInt by the primitive" "111... 111 @@ -1192,7 +1190,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> (memory numSmallIntegerTagBits + 1)))). ] -{ #category : 'tests - primitiveBitXor' } +{ #category : #'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ interpreter push: (memory integerObjectOf: -42). @@ -1203,7 +1201,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 40). ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqualsZero [ interpreter push: self setUpForwardedObjects. @@ -1217,7 +1215,7 @@ VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqu ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZero [ interpreter push: self setUpForwardedObjects. @@ -1232,7 +1230,7 @@ VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZ ] -{ #category : 'tests - primitiveClass' } +{ #category : #'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ interpreter push: memory trueObject. @@ -1244,7 +1242,7 @@ VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesArgCountLessThanOne [ | array1 size | @@ -1262,7 +1260,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesArgCountLessThanOne [ self assert: interpreter failed ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesEmpty [ | array1 array2 | @@ -1278,7 +1276,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesEmpty [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesIdentity [ | array1 size | @@ -1298,7 +1296,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesIdentity [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize1 [ | array1 array2 size | @@ -1321,7 +1319,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize1 [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize2 [ | array1 array2 size | @@ -1344,7 +1342,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize2 [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentValues [ | array1 array2 size | @@ -1365,7 +1363,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentValues [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithLastDifferentValue [ | array1 array2 size | @@ -1387,7 +1385,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithLastDifferentValue [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteArgument [ | array1 size nilClass | @@ -1408,7 +1406,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteArgument [ self assert: interpreter failed ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiver [ | array1 size nilClass | @@ -1430,7 +1428,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiver [ self assert: interpreter failed ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiverShouldLeaveTheSameStack [ | array1 size nilClass | @@ -1453,7 +1451,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiverShouldLeaveTheSam self assert: (interpreter stackValue: 1) equals: memory nilObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithSize [ | array1 array2 size | @@ -1474,7 +1472,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithSize [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithWordArgument [ | array1 array2 size | @@ -1493,7 +1491,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithWordArgument [ self assert: interpreter failed ] -{ #category : 'tests - primitiveCompareBytes' } +{ #category : #'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareWordsEmpty [ | array1 array2 | @@ -1509,7 +1507,7 @@ VMPrimitiveTest >> testPrimitiveCompareWordsEmpty [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDiv [ interpreter push: (memory integerObjectOf: 15). @@ -1522,7 +1520,7 @@ VMPrimitiveTest >> testPrimitiveDiv [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ interpreter push: (memory trueObject). @@ -1535,7 +1533,7 @@ VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1546,7 +1544,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1557,7 +1555,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ "In the primitive implementation of quo, it doesnt push the rest of the operation on the stack" @@ -1569,7 +1567,7 @@ VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1580,7 +1578,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1591,7 +1589,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 4). @@ -1602,7 +1600,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -1613,7 +1611,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDiv' } +{ #category : #'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1628,7 +1626,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivide [ interpreter push: (memory integerObjectOf: 4). @@ -1639,7 +1637,7 @@ VMPrimitiveTest >> testPrimitiveDivide [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 2). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ interpreter push: (memory trueObject). @@ -1651,7 +1649,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ "The interpreter fails because 42%4 != 0" @@ -1665,7 +1663,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1676,7 +1674,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1687,7 +1685,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1698,7 +1696,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1709,7 +1707,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 6). @@ -1720,7 +1718,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : 'tests - primitiveDivide' } +{ #category : #'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -42). @@ -1731,7 +1729,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -21). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self installFloatClass. @@ -1744,7 +1742,7 @@ VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1755,7 +1753,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 15). @@ -1766,7 +1764,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 15). @@ -1777,7 +1775,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1792,7 +1790,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory falseObject). @@ -1803,7 +1801,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual' } +{ #category : #'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -1814,7 +1812,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - Float64Array' } +{ #category : #'tests - primitiveAdd - Float64Array' } VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ | x y z result firstTerm size | @@ -1838,7 +1836,7 @@ VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 22.0. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate [ | object | @@ -1856,7 +1854,7 @@ VMPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate [ equals: (memory integerObjectOf: memory ephemeronFormat) ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatShouldFail [ | object | @@ -1869,7 +1867,7 @@ VMPrimitiveTest >> testPrimitiveFormatShouldFail [ self assert: interpreter failed ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithArray [ | object | @@ -1887,7 +1885,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithArray [ equals: (memory integerObjectOf: memory arrayFormat) ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithByteFormat [ | object | @@ -1905,7 +1903,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithByteFormat [ equals: (memory integerObjectOf: memory firstByteFormat) ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithCompiledMethod [ | object | @@ -1923,7 +1921,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithCompiledMethod [ equals: (memory integerObjectOf: memory firstCompiledMethodFormat) ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithEphemeron [ | object | @@ -1941,7 +1939,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithEphemeron [ equals: (memory integerObjectOf: memory ephemeronFormat) ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithWeakArray [ | object | @@ -1959,7 +1957,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithWeakArray [ equals: (memory integerObjectOf: memory weakArrayFormat) ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ interpreter push: (memory integerObjectOf: 1). @@ -1968,7 +1966,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1981,7 +1979,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1995,7 +1993,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2009,7 +2007,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2020,7 +2018,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2031,7 +2029,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2042,7 +2040,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2053,7 +2051,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2064,7 +2062,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2075,7 +2073,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2090,7 +2088,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2101,7 +2099,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2112,7 +2110,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2123,7 +2121,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2134,7 +2132,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2145,7 +2143,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ interpreter push: (memory integerObjectOf: -1000). @@ -2156,7 +2154,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2167,7 +2165,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveGreaterThan' } +{ #category : #'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2182,7 +2180,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectWithArgCountLessThanOne [ |object1| "Tests the case where objectArg = 1 and: isOopFowarded: stackTop" @@ -2199,7 +2197,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectW self deny: interpreter failed. ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ |object1| "Tests the case where objectArg > 1 and: isOopFowarded: stackTop" @@ -2218,7 +2216,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ |object1| @@ -2234,7 +2232,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ interpreter push: memory trueObject. @@ -2246,7 +2244,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButDifferentType [ | object1 object2 | @@ -2265,7 +2263,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButD ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ | object | @@ -2281,7 +2279,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ | object | @@ -2295,7 +2293,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ ] -{ #category : 'tests - primitiveIdentical' } +{ #category : #'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameValue [ | object1 object2 | @@ -2311,7 +2309,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameV ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ interpreter push: (memory trueObject). @@ -2324,7 +2322,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ interpreter push: (memory characterObjectOf: 66). @@ -2337,7 +2335,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ interpreter push: (memory integerObjectOf: 0). @@ -2350,7 +2348,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ ] -{ #category : 'tests - primitiveImmediateAsInteger' } +{ #category : #'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -2363,7 +2361,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -2378,7 +2376,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2393,7 +2391,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat . @@ -2409,7 +2407,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2425,7 +2423,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2441,7 +2439,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2466,7 +2464,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedBool [ interpreter push: (memory trueObject). @@ -2477,7 +2475,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedBool [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -2488,7 +2486,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveIsPinned' } +{ #category : #'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ interpreter push: (memory integerObjectOf: 16). @@ -2499,7 +2497,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2510,7 +2508,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2521,7 +2519,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2532,7 +2530,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2543,7 +2541,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2554,7 +2552,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2569,7 +2567,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2580,7 +2578,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual' } +{ #category : #'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory trueObject). @@ -2591,7 +2589,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2602,7 +2600,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2613,7 +2611,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2624,7 +2622,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2635,7 +2633,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2646,7 +2644,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2657,7 +2655,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2668,7 +2666,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveLessThan' } +{ #category : #'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2683,7 +2681,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ | class array | @@ -2703,7 +2701,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ | class array | @@ -2721,7 +2719,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 0.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ | class array | @@ -2741,7 +2739,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ | class array | @@ -2761,7 +2759,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ | class array | @@ -2781,7 +2779,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ | class array | @@ -2801,7 +2799,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ | class array | @@ -2821,7 +2819,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ | class array | @@ -2843,7 +2841,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveMod [ interpreter push: (memory integerObjectOf: 16). @@ -2856,7 +2854,7 @@ VMPrimitiveTest >> testPrimitiveMod [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ interpreter push: (memory trueObject). @@ -2871,7 +2869,7 @@ VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2882,7 +2880,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 42). @@ -2894,7 +2892,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMod' } +{ #category : #'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModNegativeValue [ interpreter push: (memory integerObjectOf: 16). @@ -2907,7 +2905,7 @@ VMPrimitiveTest >> testPrimitiveModNegativeValue [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ interpreter push: (memory integerObjectOf: memory maxCInteger >> memory numSmallIntegerTagBits). @@ -2920,7 +2918,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -2931,7 +2929,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2942,7 +2940,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ interpreter push: (memory trueObject). @@ -2955,7 +2953,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ interpreter push: (memory integerObjectOf: 16). @@ -2968,7 +2966,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2983,7 +2981,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -2994,7 +2992,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply' } +{ #category : #'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ interpreter push: (memory integerObjectOf: 16). @@ -3006,7 +3004,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ self assert: (interpreter stackValue: 2) equals: (memory integerObjectOf: 16). ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3018,7 +3016,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ | class | class := self newClassInOldSpaceWithSlots: 4 instSpec: memory nonIndexablePointerFormat. @@ -3029,7 +3027,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: interpreter stackTop) equals: 4 ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ | class | @@ -3043,7 +3041,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ | class | @@ -3057,7 +3055,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3068,7 +3066,7 @@ VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ self deny: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewOldSpace' } +{ #category : #'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3081,7 +3079,7 @@ VMPrimitiveTest >> testPrimitiveNewOldCreatesTheObjectInOldSpace [ self assert: (memory isOld: interpreter stackTop) ] -{ #category : 'tests - primitiveNewOldSpace' } +{ #category : #'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -3097,7 +3095,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewOldSpace' } +{ #category : #'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3109,7 +3107,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewOldSpace' } +{ #category : #'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3123,7 +3121,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsCreatesTheObjectInOldSpace [ self assert: (memory isOld: interpreter stackTop) ] -{ #category : 'tests - primitiveNewOldSpace' } +{ #category : #'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3136,7 +3134,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3148,7 +3146,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -3164,7 +3162,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3176,7 +3174,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3188,7 +3186,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3201,7 +3199,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3214,7 +3212,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : 'tests - primitiveNewPinned' } +{ #category : #'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3227,7 +3225,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ | newObj class | @@ -3244,7 +3242,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: newObj) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ | newObj class | @@ -3260,7 +3258,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: newObj) equals: 7 ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ | newObj class | @@ -3278,7 +3276,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ self assert: (memory getMemoryMap isOldObject: newObj) ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ | class | @@ -3294,7 +3292,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ | class | @@ -3308,7 +3306,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ | class | @@ -3323,7 +3321,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ | class | @@ -3339,7 +3337,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNewWithArgs' } +{ #category : #'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ | class | @@ -3353,7 +3351,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ self assert: interpreter primFailCode equals: PrimErrBadArgument ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3364,7 +3362,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ | class | "class object with no slots, so no format" @@ -3376,7 +3374,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNew' } +{ #category : #'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ | class | "class with nil used as format" @@ -3389,7 +3387,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -3400,7 +3398,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -3411,7 +3409,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 16). @@ -3422,7 +3420,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -3433,7 +3431,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3448,7 +3446,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -3459,7 +3457,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual' } +{ #category : #'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -3470,7 +3468,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -3481,7 +3479,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ interpreter push: (memory integerObjectOf: 16). @@ -3492,7 +3490,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ interpreter push: (memory instantiateClass: (self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat)). @@ -3504,7 +3502,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ |object object2| @@ -3523,7 +3521,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ self assert: (memory isPinned: object2). ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ |object| @@ -3543,7 +3541,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ ] -{ #category : 'tests - primitivePin' } +{ #category : #'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ |object| @@ -3563,7 +3561,7 @@ VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuo [ interpreter push: (memory integerObjectOf: 15). @@ -3573,7 +3571,7 @@ VMPrimitiveTest >> testPrimitiveQuo [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ interpreter push: (memory trueObject). @@ -3586,7 +3584,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -3597,7 +3595,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -3608,7 +3606,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ "Tests that the rest of the integer division is not pushed into the stack, as this is not expected in a primitive behavior" interpreter push: (memory integerObjectOf: 16). @@ -3620,7 +3618,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ self assert: (interpreter stackValue: 1) equals: (memory integerObjectOf: 16). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ interpreter push: (memory integerObjectOf: 42). @@ -3631,7 +3629,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -3642,7 +3640,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -3653,7 +3651,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ interpreter push: (memory integerObjectOf: -13). @@ -3664,7 +3662,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 6). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -3675,7 +3673,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: -2). ] -{ #category : 'tests - primitiveQuo' } +{ #category : #'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3690,7 +3688,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ interpreter push: (memory integerObjectOf: 1). @@ -3700,7 +3698,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ self assert: interpreter failed ] -{ #category : 'tests - primitiveImmutability' } +{ #category : #'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ | class object | @@ -3715,7 +3713,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ self assert: (memory isImmutable: object) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ | method | @@ -3730,7 +3728,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ | array1 | @@ -3743,7 +3741,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ | method | @@ -3758,7 +3756,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ | array1 array2 arrayForwarder arrayForwardee | @@ -3783,7 +3781,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderResolutionAndCallPrimitiveAgain [ | array1 array2 arrayForwarder arrayForwardee | @@ -3810,7 +3808,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderReso ] -{ #category : 'tests - primitiveSize' } +{ #category : #'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ | class objectInstance | "Forwarding an object happens when becoming it with a bigger object" @@ -3826,7 +3824,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3841,7 +3839,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3856,7 +3854,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3872,7 +3870,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3888,7 +3886,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3904,7 +3902,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3926,7 +3924,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3943,7 +3941,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ equals: (memory smallFloatObjectOf: 10.0) ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3960,7 +3958,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPre self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3977,7 +3975,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3991,7 +3989,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4005,7 +4003,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveAdd - SmallFloat' } +{ #category : #'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4023,7 +4021,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4040,7 +4038,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ equals: (memory smallFloatObjectOf: 1.0) ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4057,7 +4055,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeError self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4074,7 +4072,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErro self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4092,7 +4090,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStac self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 0.0). ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4106,7 +4104,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4120,7 +4118,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperan self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4133,7 +4131,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveDivide - SmallFloat' } +{ #category : #'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4151,7 +4149,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4166,7 +4164,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4181,7 +4179,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4195,7 +4193,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4209,7 +4207,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4226,7 +4224,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4245,7 +4243,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveEqual - SmallFloat' } +{ #category : #'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4260,7 +4258,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4275,7 +4273,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4292,7 +4290,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4309,7 +4307,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithT self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4326,7 +4324,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWith self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4340,7 +4338,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirs self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4354,7 +4352,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSeco self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4374,7 +4372,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4389,7 +4387,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4404,7 +4402,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4421,7 +4419,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4438,7 +4436,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4452,7 +4450,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4466,7 +4464,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4485,7 +4483,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveGreaterThan - SmallFloat' } +{ #category : #'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4500,7 +4498,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4515,7 +4513,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4530,7 +4528,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4547,7 +4545,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4564,7 +4562,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4578,7 +4576,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4592,7 +4590,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4611,7 +4609,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4626,7 +4624,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4643,7 +4641,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4659,7 +4657,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOpera ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4675,7 +4673,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOper ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4694,7 +4692,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesSta ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4716,7 +4714,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ ] -{ #category : 'tests - primitiveLessThan - SmallFloat' } +{ #category : #'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4732,7 +4730,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4749,7 +4747,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ equals: (memory smallFloatObjectOf: 100.0) ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4768,7 +4766,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErr ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4787,7 +4785,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeEr ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4801,7 +4799,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4815,7 +4813,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveMultiply - SmallFloat' } +{ #category : #'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4833,7 +4831,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4848,7 +4846,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4863,7 +4861,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4880,7 +4878,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErr self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4897,7 +4895,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4911,7 +4909,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4925,7 +4923,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4944,7 +4942,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveNotEqual - SmallFloat' } +{ #category : #'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4959,7 +4957,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4974,7 +4972,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4991,7 +4989,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -5005,7 +5003,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -5019,7 +5017,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract - SmallFloat' } +{ #category : #'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -5038,7 +5036,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ | class array | @@ -5059,7 +5057,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ | class array | @@ -5080,7 +5078,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ | class array | @@ -5099,7 +5097,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ | class array | @@ -5118,7 +5116,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ | class array | @@ -5137,7 +5135,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ | class array | @@ -5156,7 +5154,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ ] -{ #category : 'tests - primitiveFloat64' } +{ #category : #'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ | class array | @@ -5175,7 +5173,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -5191,7 +5189,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -5208,7 +5206,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ ] -{ #category : 'tests - primitiveAtPut' } +{ #category : #'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -5226,7 +5224,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonC self assert: string contentEquals: (self newString: 'po') ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -5241,7 +5239,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -5264,7 +5262,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ ] -{ #category : 'tests - primitiveAt' } +{ #category : #'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -5282,7 +5280,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonChar self assert: string contentEquals: (self newString: 'po') ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5302,7 +5300,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -5322,7 +5320,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -5342,7 +5340,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5362,7 +5360,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - primitiveStringCompare' } +{ #category : #'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ | byteSymbol asciiOrder | @@ -5381,7 +5379,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -5394,7 +5392,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -5407,7 +5405,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ | string | @@ -5422,7 +5420,7 @@ VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ interpreter push: (memory integerObjectOf: 2). @@ -5437,7 +5435,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -5454,7 +5452,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ interpreter push: (memory integerObjectOf: memory minSmallInteger). @@ -5465,7 +5463,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ self assert: interpreter failed. ] -{ #category : 'tests - primitiveSubtract' } +{ #category : #'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ | minSmallInt | @@ -5483,7 +5481,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ interpreter setImageVersion: 110. @@ -5498,7 +5496,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 110). ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ | slots | @@ -5524,7 +5522,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ memory okayOop: (memory fetchPointer: i ofObject: interpreter stackTop) ] ] -{ #category : 'tests - primitiveVMParameter' } +{ #category : #'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterSetsImageVersion [ interpreter push: memory nilObject. diff --git a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st index 895ba3b5f2..8ec7e8c742 100644 --- a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMPushThisContextRoutineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMPushThisContextRoutineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> setUp [ | contextClass | @@ -29,7 +27,7 @@ VMPushThisContextRoutineTest >> setUp [ ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | @@ -74,7 +72,7 @@ VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ equals: contextOop ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -107,7 +105,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: LargeContextSlots. ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -142,7 +140,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: SmallContextSlots ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments expectedStackPointer | @@ -179,7 +177,7 @@ VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ | isLargeContext isInBlock routine numberOfArguments | @@ -216,7 +214,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ self assert: (memory fetchPointer: Context allSlots size +2 ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: 3). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ | isLargeContext isInBlock routine numberOfArguments | @@ -250,7 +248,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ | isLargeContext isInBlock routine numberOfArguments | @@ -285,7 +283,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop expectedStackPointer | @@ -323,7 +321,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ | isLargeContext isInBlock routine numberOfArguments | @@ -358,7 +356,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ self assert: (memory fetchPointer: ReceiverIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ | isLargeContext isInBlock routine numberOfArguments | @@ -398,7 +396,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ self assert: (memory fetchPointer: Context allSlots size + numberOfArguments + 3 ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : 'tests' } +{ #category : #tests } VMPushThisContextRoutineTest >> testSingleContextReturnsNewSpouseInNewSpace [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | diff --git a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st index df3bbbdc82..1bf2f3ffe4 100644 --- a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSegmentsImageFormatTest', - #superclass : 'VMAbstractImageFormatTest', - #category : 'VMMakerTests-ImageFormat', - #package : 'VMMakerTests', - #tag : 'ImageFormat' + #name : #VMSegmentsImageFormatTest, + #superclass : #VMAbstractImageFormatTest, + #category : #'VMMakerTests-ImageFormat' } -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegment [ | header newSegmentSize | @@ -28,7 +26,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegme equals: (memory segmentManager segments at: 0) segSize ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage [ | header newSegmentSize | @@ -54,7 +52,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage equals: header firstSegSize + newSegmentSize ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBigger [ | newSegmentSize | @@ -70,7 +68,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBi self assert: newSegmentSize >= memory growHeadroom ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSmaller [ | newSegmentSize | @@ -88,7 +86,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSm self assert: newSegmentSize >= memory growHeadroom ] -{ #category : 'tests' } +{ #category : #tests } VMSegmentsImageFormatTest >> testMinimalImageHasASingleSegment [ diff --git a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st index 9b55da5b97..8a162f9399 100644 --- a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMSelectorIndexDereferenceRoutineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSelectorIndexDereferenceRoutineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ "32 bit platforms use a direct selector reference and not an index" @@ -20,7 +18,7 @@ VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ self assert: cogit ceDereferenceSelectorIndex isNil ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -31,7 +29,7 @@ VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ self assert: cogit ceDereferenceSelectorIndex notNil ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSpecialSelectorTable [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -60,7 +58,7 @@ VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSp self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMSelectorIndexDereferenceRoutineTest >> testPositiveSelectorIndexIsLookedUpInMethodLiterals [ "64 bit platforms use a selector index and a routine to map it to the real selector" diff --git a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st index 34f53a536e..8e4b9726e7 100644 --- a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSessionIdTest', - #superclass : 'VMInterpreterTests', - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #name : #VMSessionIdTest, + #superclass : #VMInterpreterTests, + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'tests' } +{ #category : #tests } VMSessionIdTest >> testGlobalSessionID [ "The globalSessionID is stored as a 64 bit number, but for compatibility with older plugins, is restricted to postive signed 32 bit values" | vm predicted diff | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st index 62f82ef61d..0df1c1ac40 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimpleStackBasedCogitAbstractTest', - #superclass : 'VMSpurMemoryManagerTest', + #name : #VMSimpleStackBasedCogitAbstractTest, + #superclass : #VMSpurMemoryManagerTest, #instVars : [ 'cogit', 'codeSize', @@ -31,18 +31,16 @@ Class { 'VMBytecodeConstants', 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ ^ { { (#useComposedImageFormat -> true) } } ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ ^ ParametrizedTestMatrix new @@ -51,7 +49,7 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ yourself ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ ^ ParametrizedTestMatrix new @@ -60,26 +58,26 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ yourself ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSizeParameters [ ^ self wordSize64Parameters + self wordSize32Parameters ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> ISA: anISA [ isa := anISA ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> abstractInstructions [ ^ (0 to: cogit getOpcodeIndex - 1) collect: [ :i | cogit abstractOpcodes at: i ] ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure [ | before after | @@ -91,7 +89,7 @@ VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure self assert: (self readMemoryAt: after) equals: anOop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlockClosure [ | before | @@ -103,17 +101,17 @@ VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlock equals: before ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> callerAddress [ ^ callerAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> cogit [ ^ cogit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ "Compiles some native code using the code inside the block closure as builder. This version assumes the block has a single 1-bytecode statement @@ -122,13 +120,13 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ ^ self compile: aBlockClosure bytecodes: 2 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes [ ^ self compile: aBlockClosure bytecodes: bytecodes headerSize: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes headerSize: headerSize [ "Compiles some native code using the code inside the block closure as builder. @@ -153,7 +151,7 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecod ^ allocatedAddress ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ "We will call to this address" @@ -165,7 +163,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ sendAddress := self compile: [ cogit genSpecialSelectorSend ]. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampolineName [ | startAddress | @@ -185,7 +183,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampol ^ startAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytecodes: bytecodes [ "Call a compilation block initializing the compiler before. @@ -203,7 +201,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytec ^ aBlockClosure value ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ "Create the root context with a valid method" @@ -239,7 +237,7 @@ VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ baseFrame := interpreter framePointer ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ self @@ -249,13 +247,13 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ temporaries: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments [ self createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for machine code. @@ -286,7 +284,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress rec builder buildFrame ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ self @@ -295,7 +293,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ arguments: #() ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress receiver: receiver arguments: arguments [. "I create a frameless call @@ -322,7 +320,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress re ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for interpreter. @@ -363,7 +361,7 @@ VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: return cogit needsFrame: true. ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ | specialObjectsOop | @@ -380,19 +378,19 @@ VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ memory specialObjectsOop: specialObjectsOop. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassemble [ ^ self disassembleFrom: cogInitialAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex [ ^ self disassembleFrom: anIndex opcodes: opcodes ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ machineSimulator disassembler @@ -405,25 +403,25 @@ VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberO pc: 0 ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue [ ^ machineSimulator framePointerRegisterValue ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue: aValue [ machineSimulator framePointerRegisterValue: aValue ] -{ #category : 'configuration' } +{ #category : #configuration } VMSimpleStackBasedCogitAbstractTest >> generateCaptureCStackPointers [ ^ true ] -{ #category : 'helpers - cog methods' } +{ #category : #'helpers - cog methods' } VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector: anSelectorOop [ | targetCog allocatedAddress | @@ -442,18 +440,18 @@ VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> getLastAddress [ ^ machineSimulator getLastAddress: self abstractInstructions. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initialCodeSize [ ^ 4 * 1024 ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ "I will create the initial stack with a well-known caller address so we know if the code comes back @@ -465,7 +463,7 @@ VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ | page | @@ -478,31 +476,31 @@ VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ machineSimulator framePointerRegisterValue: page baseAddress. ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> instructionPointer [ ^ self readRegister: machineSimulator instructionPointerRegister ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> interpreterClass [ ^ CogVMSimulatorLSB ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> jitCompilerClass [ ^ SimpleStackBasedCogit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod [ ^ self jitMethod: aHostCompiledMethod selector: memory nilObject ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: aSelectorOop [ | methodOop | @@ -512,7 +510,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: ^ cogit cog: methodOop selector: aSelectorOop ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> jitOptions [ ^ Dictionary newFromPairs: { @@ -523,7 +521,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitOptions [ #ObjectMemory. self memoryClass name } ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ | builder | @@ -532,12 +530,12 @@ VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ ^ builder ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> machineSimulator [ ^ machineSimulator ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ^ self wordSize = 4 @@ -545,7 +543,7 @@ VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ifFalse: [ Spur64BitCoMemoryManager ] ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ | compiler | @@ -560,13 +558,13 @@ VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> openMachineDebugger [ self openMachineDebuggerAt: cogInitialAddress ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ ^ VMMachineCodeDebugger new @@ -577,7 +575,7 @@ VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ openWithSpec. ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pop [ | stackAddressIntegerValue poppedByteArray | @@ -594,13 +592,13 @@ VMSimpleStackBasedCogitAbstractTest >> pop [ ^ poppedByteArray ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> popAddress [ ^ self pop integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareCall [ machineSimulator hasLinkRegister @@ -613,13 +611,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareCall [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver arguments: arguments [ machineSimulator baseRegisterValue: cogit varBaseAddress. @@ -636,13 +634,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver ar self prepareCall ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> primitiveTraceLogSize [ ^ 256 * 8 "word size" ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ | stackAddressIntegerValue | @@ -663,7 +661,7 @@ VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ | aByteArray | @@ -672,7 +670,7 @@ VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ self push: aByteArray ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ | bytes | @@ -680,7 +678,7 @@ VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ ^ bytes integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ registerValue := ByteArray new: self wordSize. @@ -688,7 +686,7 @@ VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ " @@ -711,26 +709,26 @@ VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ ^ self readMemoryAt: machineSimulator framePointerRegisterValue - ((3 + anIndex) * self wordSize) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> receiverRegister: anInteger [ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> returnValue [ ^ self readRegister: machineSimulator receiverRegister ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress [ ^ self runFrom: startAddress until: endAddress timeout: 100000. "microseconds" ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress timeout: microseconds [ machineSimulator startAt: startAddress @@ -739,7 +737,7 @@ VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress t count: 0. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ "The different platforms generates code in a different way, so the number of opcodes can not be valid. Eg: ARM generates more instructions per opcode. It has to calculate the instructions to run differently" @@ -750,7 +748,7 @@ VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ count: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ machineSimulator startAt: cogInitialAddress @@ -760,7 +758,7 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ machineSimulator startAt: anAddress @@ -770,17 +768,17 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> sentSelector [ ^ sentSelector ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> sentSelector: anObject [ sentSelector := anObject ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUp [ super setUp. @@ -823,7 +821,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUp [ self initializeInitialStackFrame. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit allocateOpcodes: 80 bytecodes: 0 ifFail: [ self error: 'Could not allocate opcodes' ]. @@ -840,7 +838,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit methodZone manageFrom: cogit methodZoneBase to: memory getMemoryMap codeZoneEnd. ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ "Create a send trampoline so we can stop..." @@ -867,7 +865,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ ^ (self stackAt: index) @@ -876,7 +874,7 @@ VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ signed: false ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ | stackAddressIntegerValue | @@ -886,37 +884,37 @@ VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ ^ machineSimulator memoryAt: stackAddressIntegerValue readNext: self wordSize. ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue: aValue [ machineSimulator stackPointerRegisterValue: aValue ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimpleStackBasedCogitAbstractTest >> temporaryRegisterValue [ ^ self machineSimulator temporaryRegisterValue ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> top [ ^ self stackAt: 0 ] -{ #category : 'helpers - stack' } +{ #category : #'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> topAddress [ ^ self top integerAt: 1 size: self wordSize signed: false ] -{ #category : 'helpers - registers' } +{ #category : #'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st index c43441d889..da38e1895e 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitBytecodeTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitBytecodeTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -27,7 +25,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVa self runGeneratedCode. ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrameful onBlock: generationBlock [ | oldFP oldSP | @@ -47,7 +45,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrame self assert: oldSP equals: self stackPointerRegisterValue. ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister: anAddress withFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -60,7 +58,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister self assert: machineSimulator receiverRegisterValue equals: anAddress ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -71,50 +69,50 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isF self runUntilReturn. ] -{ #category : 'tests - extended store bytecode - store inst var' } +{ #category : #'tests - extended store bytecode - store inst var' } VMSimpleStackBasedCogitBytecodeTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable1 [ self testExtendedPushPushesInstanceVariable: 1 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable2 [ self testExtendedPushPushesInstanceVariable: 2 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable3 [ self testExtendedPushPushesInstanceVariable: 3 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable32 [ self testExtendedPushPushesInstanceVariable: 32 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable64 [ self testExtendedPushPushesInstanceVariable: 64 ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable: instanceVariableToWrite [ self testExtendedPushPushesVariableType: 0 "Instance variable type" index: instanceVariableToWrite ] -{ #category : 'tests - extended push bytecode - push inst var' } +{ #category : #'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type index: instanceVariableToWrite [ "Type = 0 is instance variable" @@ -138,7 +136,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - jumps' } +{ #category : #'tests - jumps' } VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ | firstBytecode | @@ -178,67 +176,67 @@ VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ equals: memory trueObject ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempPopsValue [ self testPopIntoTempPopsValueAt: 3 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 3 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempPopsValue [ self testPopIntoTempPopsValueAt: 4 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 4 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempPopsValue [ self testPopIntoTempPopsValueAt: 5 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 5 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempPopsValue [ self testPopIntoTempPopsValueAt: 6 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 6 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempPopsValue [ self testPopIntoTempPopsValueAt: 7 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 7 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -246,7 +244,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -254,7 +252,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -262,19 +260,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempPopsValue [ self testPopIntoTempPopsValueAt: 1 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 1 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -282,55 +280,55 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresEigthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFifthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFirstInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFourthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSecondInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSeventhInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSixthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresThirdInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite. @@ -339,7 +337,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStores self assert: (memory fetchPointer: instanceVariableToWrite - 1 ofObject: obj) equals: memory falseObject ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -347,19 +345,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempPopsValue [ self testPopIntoTempPopsValueAt: 2 ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 2 ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -367,7 +365,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecod self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -375,7 +373,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableUnderTest [ | temporaries | @@ -402,7 +400,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableU self assert: self popAddress equals: memory trueObject ] -{ #category : 'tests - single bytecode - pop into temp' } +{ #category : #'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVariableUnderTest [ | temporaries | @@ -427,7 +425,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVar self assert: (self readTemporaryValueAt: tempVariableUnderTest) equals: memory falseObject ] -{ #category : 'tests - single bytecode - pop into inst var' } +{ #category : #'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -435,157 +433,157 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 10 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 10 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 11 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 11 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 12 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 12 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 13 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 13 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 14 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 14 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 15 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 15 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush3rdTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 3 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 4 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 4 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 5 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 5 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 6 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 6 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 7 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 7 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 8 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 8 ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 9 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 9 ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse [ self compile: [ cogit genPushConstantFalseBytecode ]. @@ -594,7 +592,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - two bytecodes' } +{ #category : #'tests - two bytecodes' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self compile: [ @@ -606,7 +604,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self assert: machineSimulator receiverRegisterValue equals: memory nilObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self compile: [ cogit genPushConstantNilBytecode ]. @@ -615,7 +613,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self assert: self popAddress equals: memory nilObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self compile: [ cogit genPushConstantTrueBytecode ]. @@ -624,7 +622,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self assert: self popAddress equals: memory trueObject ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallIntegerZero [ self compile: [ cogit genPushConstantZeroBytecode ]. @@ -633,19 +631,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallI self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 1 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 1 ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusOne [ cogit byte0: 116. @@ -656,7 +654,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusO self assert: self popAddress equals: (memory integerObjectOf: -1) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ cogit byte0: 118. @@ -667,7 +665,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ self assert: self popAddress equals: (memory integerObjectOf: 1) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ cogit byte0: 119. @@ -678,7 +676,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ self assert: self popAddress equals: (memory integerObjectOf: 2) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ cogit byte0: 117. @@ -689,7 +687,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : 'tests - single bytecode' } +{ #category : #'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver [ machineSimulator receiverRegisterValue: 75. @@ -700,103 +698,103 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver self assert: self popAddress equals: 75 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEighthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 8 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEleventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 11 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 15 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 5 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFirstVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 1 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 14 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 4 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesNinthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 9 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSecondVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 2 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSeventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 7 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 16 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 6 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 10 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirdVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 3 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 13 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTwelfthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 12 ] -{ #category : 'tests - single bytecode - push inst var' } +{ #category : #'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -815,19 +813,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushe self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 2 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 2 ] -{ #category : 'tests - single bytecode - push temp - arg' } +{ #category : #'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tempVariableUnderTest [ | arguments | @@ -850,7 +848,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tempVariableUnderTest [ | temporaries | @@ -875,13 +873,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : 'tests - single bytecode - push temp' } +{ #category : #'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushThirdTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 3 ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -920,7 +918,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFr equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -958,7 +956,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallF equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFrameCallsLargeMethodTrampoline [ | numberOfArguments methodObject method | @@ -995,7 +993,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFram equals: numberOfArguments ] -{ #category : 'tests - thisContext' } +{ #category : #'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFrameCallsSmallMethodTrampoline [ | numberOfArguments methodObject method | @@ -1032,13 +1030,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFram equals: numberOfArguments ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnRegister [ self @@ -1047,19 +1045,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnReg onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRegister [ self @@ -1068,13 +1066,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRe onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInReturnRegister [ self @@ -1085,7 +1083,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInRet cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ @@ -1093,7 +1091,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ @@ -1101,7 +1099,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ @@ -1109,7 +1107,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInReturnRegister [ self @@ -1120,7 +1118,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInRe cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ @@ -1128,7 +1126,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ self @@ -1136,7 +1134,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInReturnRegister [ self @@ -1146,7 +1144,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInR cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ self @@ -1154,7 +1152,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ self @@ -1162,7 +1160,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectInReturnRegister [ self @@ -1172,7 +1170,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectIn cogit genReturnTrue ] ] -{ #category : 'tests - single bytecode - return' } +{ #category : #'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ self @@ -1180,7 +1178,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1194,7 +1192,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsP equals: memory trueObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1209,7 +1207,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjec equals: memory falseObject ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1246,7 +1244,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector literalIndex | @@ -1274,7 +1272,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesReceiverFromStackTopIntoReceiverRegister [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1298,7 +1296,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesRecei equals: memory falseObject ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1325,7 +1323,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector | @@ -1352,7 +1350,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : 'tests - sends' } +{ #category : #'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesReturnValueFromReceiverRegisterAfterReturn [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1381,7 +1379,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesRetu self assert: self popAddress equals: (memory integerObjectOf: 42) ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1396,7 +1394,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjec equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1411,7 +1409,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalOb equals: memory trueObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1431,7 +1429,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1456,7 +1454,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #+. @@ -1471,7 +1469,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1490,7 +1488,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelector equals: selectorAtIndex ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #+. @@ -1509,7 +1507,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1530,7 +1528,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1556,7 +1554,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #at:put:. @@ -1572,7 +1570,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ | signed | @@ -1598,7 +1596,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelector equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #at:put:. @@ -1618,7 +1616,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1637,7 +1635,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMoves equals: previousValue ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64Bits [ | signed | @@ -1661,7 +1659,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegated equals: (selectorIndex + 1 / 2) negated ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #atEnd. @@ -1675,7 +1673,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceive self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelectorIntoClassRegisterIn32Bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1693,7 +1691,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelecto equals: selectorAtIndex ] -{ #category : 'tests - special sends' } +{ #category : #'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #atEnd. diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st index c69374a214..e471e136aa 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st @@ -1,21 +1,19 @@ Class { - #name : 'VMSimpleStackBasedCogitCoggedMethods', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitCoggedMethods, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogMethodConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitCoggedMethods >> setUp [ super setUp. self setUpCogMethodEntry. ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndContinue [ | cogMethod otherBlock | @@ -30,7 +28,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: otherBlock ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndGoesToAbort [ | cogMethod otherBlock | @@ -45,7 +43,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: cogit ceMethodAbortTrampoline ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitCoggedMethods >> testUsingNoCheckEntryDoesNotCheckClassTag [ | cogMethod otherBlock | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st index e2345429d5..021b93d5c5 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMSimpleStackBasedCogitMegamorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitMegamorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'VMMethodCacheConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ | specialSelectorsArray | @@ -27,7 +25,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ cogit generateOpenPICPrototype. ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICReturnsPIC [ | selector createdPic specialObjectsArray | @@ -38,13 +36,13 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICRet self assert: (cogit methodZone openPICWithSelector: selector) equals: createdPic. ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupNonExistingMegamorphicPICReturnsNil [ self assert: (cogit methodZone openPICWithSelector: memory trueObject) equals: nil ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ "We have to call the pic and see if it reaches the abort trampoline" @@ -76,7 +74,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ self assert: machineSimulator sendNumberOfArgumentsRegisterValue equals: createdPic address ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectPicAbortTrampoline [ | createdPic selector | @@ -89,7 +87,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectP equals: (cogit picAbortTrampolineFor: 1) ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numArgs [ | selector createdPic | @@ -98,43 +96,43 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numAr self assert: createdPic cmNumArgs equals: numArgs ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith1 [ self testNewMegamorphicPICNumArgs: 1 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith16 [ self testNewMegamorphicPICNumArgs: 16 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith2 [ self testNewMegamorphicPICNumArgs: 2 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith4 [ self testNewMegamorphicPICNumArgs: 4 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith8 [ self testNewMegamorphicPICNumArgs: 8 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWithoutArgs [ self testNewMegamorphicPICNumArgs: 0 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ | createdPic selector | @@ -143,7 +141,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ self assert: createdPic selector equals: selector ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ | createdPic selector | @@ -152,7 +150,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ self assert: createdPic blockSize equals: cogit openPICSize. ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ | selector createdPic | @@ -162,7 +160,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testRelinkCallSiteToMegamorphicPICCallsNewPIC [ | selector literalIndex method createdPic returnAfterCallAddress patchedCogMethod startAddress | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st index e1ff4724cd..64f66063c8 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitMonomorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitMonomorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ "Calculate the size of the Closed Pic" @@ -16,7 +14,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ self assert: cogit closedPICSize isNotNil ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineReplacesTheCallTargetWithTheCogMethodAddress [ "This is for the monomorphic case" @@ -66,7 +64,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineR self deny: executedTheTrampoline ] -{ #category : 'tests - PIC' } +{ #category : #'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testObtainInlineCacheFromLinkedCall [ | sendingMethod targetCog selector executedTheTrampoline | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st index 2d4f3a96ab..1aba76164e 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimpleStackBasedCogitPolymorphicPICTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMSimpleStackBasedCogitPolymorphicPICTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'selector', 'numArgs', @@ -14,12 +14,10 @@ Class { #pools : [ 'CogMethodConstants' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ ^ super testParameters * @@ -28,7 +26,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ yourself) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ | pic | "Only run this test if the test is configured for so much cases" @@ -39,7 +37,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ self assertPIC: pic hits: (cogMethods at: aCase) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ "Receiver is nil, class tag of the first entry is the receiver's class tag. - the receiver matches class tag for case 0 @@ -61,7 +59,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ "Receiver is nil, class tag of the first entry is 1 (a small integer). @@ -82,19 +80,19 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases [ ^ configuredPicCases ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases: aNumber [ configuredPicCases := aNumber ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ cogit @@ -104,7 +102,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ isMNUCase: false. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ | pic | @@ -119,7 +117,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ ^ pic ] -{ #category : 'running' } +{ #category : #running } VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ super setUp. @@ -160,7 +158,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ cogMethods at: index - 1 put: cogMethod ] "Maximum polymorphic cases" ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ | pic | @@ -169,7 +167,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ self assert: pic cPICNumCases equals: self configuredPicCases ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ | pic | pic := self makePolymorphicPIC. @@ -177,43 +175,43 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ self assert: (cogit backend callTargetFromReturnAddress: pic asInteger + cogit missOffset) equals: (cogit picAbortTrampolineFor: numArgs) ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase0 [ self assertHitAtCase: 0 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase1 [ self assertHitAtCase: 1 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase2 [ self assertHitAtCase: 2 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase3 [ self assertHitAtCase: 3 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase4 [ self assertHitAtCase: 4 ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase5 [ "This is the last case. Cog PICs have 6 cases (0-based)" self assertHitAtCase: 5 ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ | pic | pic := self makePolymorphicPIC. @@ -221,7 +219,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ self assert: pic cmType equals: CMPolymorphicIC. ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ | pic | @@ -231,7 +229,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ self assertPICMiss: pic ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ | pic | @@ -240,7 +238,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ self assert: pic cmNumArgs equals: numArgs ] -{ #category : 'tests - hit/miss' } +{ #category : #'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEntryOffset [ | pic methodCheckEntryPoint methodNoCheckEntryPoint passedByCheckEntryPoint | @@ -271,7 +269,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEnt self deny: passedByCheckEntryPoint ] -{ #category : 'tests - metadata' } +{ #category : #'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testSelectorInHeader [ | pic | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st index 00fe287064..7ab3e09968 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimpleStackBasedCogitRememberedSetTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSimpleStackBasedCogitRememberedSetTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: value shouldCallTrampoline: shouldCallTrampoline [ | trampoline afterBytecode | @@ -30,14 +28,14 @@ VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: valu ] -{ #category : 'initialization' } +{ #category : #initialization } VMSimpleStackBasedCogitRememberedSetTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesNotCallTrampoline [ | newObject otherNewObject | @@ -50,7 +48,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesN shouldCallTrampoline: false ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesCallTrampoline [ | oldObject otherNewObject | @@ -64,7 +62,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesC shouldCallTrampoline: true ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesNotCallTrampoline [ | oldObject otherOldObject | @@ -78,7 +76,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesN shouldCallTrampoline: false ] -{ #category : 'tests' } +{ #category : #tests } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInPermObjectDoesCallTrampoline [ | permObject otherPermObject | diff --git a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st index cdc0ba4a1f..e2fc08acf9 100644 --- a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSimulatedEnvironmentBuilder', - #superclass : 'Object', + #name : #VMSimulatedEnvironmentBuilder, + #superclass : #Object, #instVars : [ 'interpreter', 'interpreterClass', @@ -19,19 +19,17 @@ Class { 'allocateMemory', 'useComposedImageFormatAsDefault' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> build [ self doBuildSimulator. self doBuild ] -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> doBuild [ "100 k at least to put the class table in the old space. @@ -88,7 +86,7 @@ VMSimulatedEnvironmentBuilder >> doBuild [ ] -{ #category : 'building' } +{ #category : #building } VMSimulatedEnvironmentBuilder >> doBuildSimulator [ objectMemory := objectMemoryClass simulatorClass new. @@ -105,17 +103,17 @@ VMSimulatedEnvironmentBuilder >> doBuildSimulator [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> initialCodeSize: anInteger [ initialCodeSize := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> initializationOptions: aCollection [ initializationOptions := aCollection ] -{ #category : 'initialization' } +{ #category : #initialization } VMSimulatedEnvironmentBuilder >> initialize [ super initialize. @@ -123,58 +121,58 @@ VMSimulatedEnvironmentBuilder >> initialize [ permSpaceSize := 0. ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> interpreter [ ^ interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> interpreterClass: aClass [ interpreterClass := aClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> memoryInitialAddress [ ^ initialAddress ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> methodCacheSize [ ^ methodCacheSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> newSpaceSize [ ^ newSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> objectMemory [ ^ objectMemory ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> objectMemoryClass: aClass [ objectMemoryClass := aClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> oldSpaceSize [ ^ oldSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> permSpaceSize: anInteger [ permSpaceSize := anInteger ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> primitiveTraceLogSize: anInteger [ primitiveTraceLogSize := anInteger ] -{ #category : 'helpers' } +{ #category : #helpers } VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ "Unicorn simulator requires mapped memory to be multiple of 4096" @@ -186,7 +184,7 @@ VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ ^ anInteger + (pageSize - remainder) ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ^ 4096. @@ -194,18 +192,18 @@ VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> stackSpaceSize [ ^ stackSpaceSize ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> useComposedImageFormatAsDefault: aBoolean [ useComposedImageFormatAsDefault := aBoolean ] -{ #category : 'accessing' } +{ #category : #accessing } VMSimulatedEnvironmentBuilder >> wordSize: anInteger [ wordSize := anInteger ] diff --git a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st index 480b5bbd00..e1da177f74 100644 --- a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSimulationTest', - #superclass : 'TestCase', - #category : 'VMMakerTests-Simulation', - #package : 'VMMakerTests', - #tag : 'Simulation' + #name : #VMSimulationTest, + #superclass : #TestCase, + #category : #'VMMakerTests-Simulation' } -{ #category : 'tests' } +{ #category : #tests } VMSimulationTest >> testSetUpJITSimulationReadsImage [ | options c | @@ -27,7 +25,7 @@ VMSimulationTest >> testSetUpJITSimulationReadsImage [ extraMemory: 100000. ] -{ #category : 'tests' } +{ #category : #tests } VMSimulationTest >> testSetUpNonJITSimulationReadsImage [ | options c | diff --git a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st index f09dcfb865..746c298210 100644 --- a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSistaSuperSendsTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSistaSuperSendsTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSistaSuperSendsTest >> jitOptions [ ^ super jitOptions @@ -14,7 +12,7 @@ VMSistaSuperSendsTest >> jitOptions [ yourself ] -{ #category : 'tests - sends/super' } +{ #category : #'tests - sends/super' } VMSistaSuperSendsTest >> testSuperSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector binding literalVariableIndex literalSelectorIndex startPC receiver expectedSelector | diff --git a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st index bcaf2eb03b..d5644e8ee9 100644 --- a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSistaTrampolineTest', - #superclass : 'VMTrampolineTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSistaTrampolineTest, + #superclass : #VMTrampolineTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMSistaTrampolineTest >> jitOptions [ ^ super jitOptions @@ -14,7 +12,7 @@ VMSistaTrampolineTest >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMSistaTrampolineTest >> testSendTrampolineWithFourArguments [ | trampolineStart receiver | diff --git a/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st index 13b0c013b5..1a242ba383 100644 --- a/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSnapshotPrimitiveTest', - #superclass : 'VMInterpreterTests', + #name : #VMSnapshotPrimitiveTest, + #superclass : #VMInterpreterTests, #instVars : [ 'imageName' ], @@ -9,12 +9,10 @@ Class { 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : 'VMMakerTests-InterpreterTests', - #package : 'VMMakerTests', - #tag : 'InterpreterTests' + #category : #'VMMakerTests-InterpreterTests' } -{ #category : 'running' } +{ #category : #running } VMSnapshotPrimitiveTest >> setUp [ super setUp. @@ -27,14 +25,14 @@ VMSnapshotPrimitiveTest >> setUp [ imageName := self class name ] -{ #category : 'running' } +{ #category : #running } VMSnapshotPrimitiveTest >> tearDown [ imageName ifNotNil: [ imageName asFileReference ensureDeleteAll ]. super tearDown ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ | method frame contextOop contextIdentityHash suspendedContext | @@ -64,7 +62,7 @@ VMSnapshotPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ equals: contextIdentityHash ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotCreateImage [ | method | @@ -83,7 +81,7 @@ VMSnapshotPrimitiveTest >> testPrimitiveSnapshotCreateImage [ interpreter imageReaderWriter validateImage: imageName ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotHandlesFormatToUse [ | method | @@ -106,7 +104,7 @@ VMSnapshotPrimitiveTest >> testPrimitiveSnapshotHandlesFormatToUse [ interpreter imageReaderWriter validateImage: imageName ] -{ #category : 'tests - snapshot' } +{ #category : #'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ | method object objectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st index 45d181195e..f4a16ac4a2 100644 --- a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpecialSendArithmethicTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMSpecialSendArithmethicTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpecialSendArithmethicTest class >> testParameters [ ^ super testParameters * { @@ -15,7 +13,7 @@ VMSpecialSendArithmethicTest class >> testParameters [ } ] -{ #category : 'running' } +{ #category : #running } VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop [ self assert: machineSimulator instructionPointerRegisterValue equals: sendTrampolineAddress. @@ -23,7 +21,7 @@ VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop self assert: machineSimulator arg0RegisterValue equals: argOop. ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTrampoline [ self @@ -33,7 +31,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTram shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoline [ self @@ -44,7 +42,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -54,7 +52,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCa shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCallsTrampoline [ self @@ -64,7 +62,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCalls shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsTrampoline [ self @@ -75,7 +73,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsT shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : 'tests - receiver non integer argument' } +{ #category : #'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -85,7 +83,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSmallInteger [ self @@ -96,7 +94,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSm shouldPerformOperationReturning: expectedResult ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -106,7 +104,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgument shouldCallTrampolineWith: (memory integerObjectOf: value1) and: (memory integerObjectOf: value2) ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstReturnsSmallInteger [ self @@ -116,7 +114,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstRet shouldPerformOperationReturning: expectedResult. ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTrampoline [ self @@ -126,7 +124,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTra shouldCallTrampolineWith: (memory integerObjectOf: value2) and: memory trueObject ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -136,7 +134,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampo shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : 'tests - receiver integer argument' } +{ #category : #'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampoline [ self @@ -147,7 +145,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampol shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -158,7 +156,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentRet ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturnsSmallInteger [ self @@ -168,7 +166,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturn ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -179,7 +177,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturns ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampoline [ @@ -190,7 +188,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampo shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampoline [ self @@ -200,7 +198,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampolin ] -{ #category : 'tests - receiver constant integer' } +{ #category : #'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline [ @@ -211,7 +209,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -222,7 +220,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentRetu shouldPerformOperationReturning: expectedResult ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturnsSmallInteger [ self @@ -233,7 +231,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturns ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -243,7 +241,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsS shouldPerformOperationReturning: expectedReflexiveResult ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampoline [ self @@ -254,7 +252,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampol shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : 'tests - receiver integer self' } +{ #category : #'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline [ self @@ -264,7 +262,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ self @@ -274,7 +272,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ self @@ -283,7 +281,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ self @@ -293,7 +291,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampoline [ self @@ -303,7 +301,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampo shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampoline [ self @@ -312,7 +310,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampolin shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver constant not integer' } +{ #category : #'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline [ self @@ -322,7 +320,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ self @@ -333,7 +331,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ self @@ -343,7 +341,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampoline [ self @@ -354,7 +352,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampol shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline [ self @@ -364,7 +362,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : 'tests - receiver non integer self' } +{ #category : #'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusTrueSelfCallsTrampoline [ self diff --git a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st index 6dc630f31b..1965e24efa 100644 --- a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMSpurInitializedOldSpaceTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurInitializedOldSpaceTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'testing' } +{ #category : #testing } VMSpurInitializedOldSpaceTest class >> isAbstract [ ^ self == VMSpurInitializedOldSpaceTest ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> assertFreeListEmpty: aFreeListOop [ self assert: aFreeListOop equals: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createEphemeronClass [ ourEphemeronClass := self createEphemeronClassForSlots: 3 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ | theNewClass formatWithSlots hash | @@ -40,7 +38,7 @@ VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ ^ theNewClass ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ | address | @@ -49,24 +47,24 @@ VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ ^ address ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> denyFreeListEmpty: aFreeListOop [ self deny: aFreeListOop equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurInitializedOldSpaceTest >> forgetObject3 [ memory coInterpreter profileMethod: memory nilObject ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeListForSize: allocationSize [ ^ memory freeLists at: allocationSize / memory allocationUnit ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ "Initially the old space has a single big chunk of free memory and no small free chunks. @@ -79,7 +77,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ ^ memory freeLists at: 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ "The free tree lists stores the oop of free tree nodes. @@ -90,7 +88,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ ^ memory startOfObject: self freeTreeRootOop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ^ memory @@ -98,7 +96,7 @@ VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ | class | @@ -109,14 +107,14 @@ VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" ^ self newOldEphemeronObjectWithSlots: 3 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ | class | @@ -127,7 +125,7 @@ VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -146,7 +144,7 @@ VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ ^ oop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ^ memory @@ -154,7 +152,7 @@ VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ^ memory @@ -162,7 +160,7 @@ VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ^ memory @@ -170,7 +168,7 @@ VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : 'running' } +{ #category : #running } VMSpurInitializedOldSpaceTest >> setUp [ super setUp. @@ -180,7 +178,7 @@ VMSpurInitializedOldSpaceTest >> setUp [ memory classByteArray: (self newClassInOldSpaceWithSlots: 0 instSpec: (memory byteFormatForNumBytes: 0)). ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurInitializedOldSpaceTest >> smallerNodeOf: aNode [ ^ memory diff --git a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st index eff8c524da..d44e8be9c7 100644 --- a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMSpurMemoryManagerTest', - #superclass : 'ParametrizedTestCase', + #name : #VMSpurMemoryManagerTest, + #superclass : #ParametrizedTestCase, #instVars : [ 'memory', 'interpreter', @@ -22,12 +22,10 @@ Class { 'VMClassIndices', 'VMObjectIndices' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> imageFormatParameters [ ^ { @@ -36,13 +34,13 @@ VMSpurMemoryManagerTest class >> imageFormatParameters [ } ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> testParameters [ ^ self wordSizeParameters * self imageFormatParameters ] -{ #category : 'building suites' } +{ #category : #'building suites' } VMSpurMemoryManagerTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -50,7 +48,7 @@ VMSpurMemoryManagerTest class >> wordSizeParameters [ yourself ] -{ #category : 'configuring' } +{ #category : #configuring } VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ environmentBuilder @@ -63,7 +61,7 @@ VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ useComposedImageFormatAsDefault: useComposedImageFormat ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createActiveProcess [ | processorOopAssociation processorOop processorListsArray priorities | @@ -85,7 +83,7 @@ VMSpurMemoryManagerTest >> createActiveProcess [ memory storePointer: ActiveProcessIndex ofObject: processorOop withValue: (self newArrayWithSlots: 4). ] -{ #category : 'initialization' } +{ #category : #initialization } VMSpurMemoryManagerTest >> createArrayClass [ | ourArrayClass | @@ -103,7 +101,7 @@ VMSpurMemoryManagerTest >> createArrayClass [ ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createEphemeronClass [ ourEphemeronClass := self newObjectWithSlots: 3. memory @@ -113,7 +111,7 @@ VMSpurMemoryManagerTest >> createEphemeronClass [ memory ensureBehaviorHash: ourEphemeronClass. ] -{ #category : 'utils' } +{ #category : #utils } VMSpurMemoryManagerTest >> createLargeIntegerClasses [ | classLargeInteger classLargeNegativeInteger | @@ -134,7 +132,7 @@ VMSpurMemoryManagerTest >> createLargeIntegerClasses [ withValue: classLargeNegativeInteger. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ | methodOop | @@ -144,7 +142,7 @@ VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ ^ methodOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> createWeakArrayClass [ ourWeakClass := self newObjectWithSlots: 3. memory @@ -155,19 +153,19 @@ VMSpurMemoryManagerTest >> createWeakArrayClass [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> emptyObjectSize [ "It is the header plus a word, padded to 8 bytes alignment" ^ self objectHeaderSize + "memory wordSize" 8 ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> initialCodeSize [ ^ 0 ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializationOptions [ ^ { @@ -177,7 +175,7 @@ VMSpurMemoryManagerTest >> initializationOptions [ self memoryClass name } ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ | ourArrayClass | @@ -199,7 +197,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ memory flushNewSpace. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ | freeListOop firstClassTablePage | @@ -263,7 +261,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ self deny: memory needGCFlag ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> initializeSpecialSelectors [ | specialSelectorsArrayOop | @@ -279,7 +277,7 @@ VMSpurMemoryManagerTest >> initializeSpecialSelectors [ memory splObj: SpecialSelectors put: specialSelectorsArrayOop ] -{ #category : 'tests-simd' } +{ #category : #'tests-simd' } VMSpurMemoryManagerTest >> installFloat64RegisterClass [ | registerClass | @@ -298,7 +296,7 @@ VMSpurMemoryManagerTest >> installFloat64RegisterClass [ ] -{ #category : 'tests - primitiveGreaterOrEqual' } +{ #category : #'tests - primitiveGreaterOrEqual' } VMSpurMemoryManagerTest >> installFloatClass [ | classFloat | @@ -314,52 +312,52 @@ VMSpurMemoryManagerTest >> installFloatClass [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" ] -{ #category : 'accessor' } +{ #category : #accessor } VMSpurMemoryManagerTest >> interpreter [ ^ interpreter ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> interpreterClass [ ^ StackInterpreterSimulatorLSB ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable1: anOop [ interpreter newMethod: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable2: anOop [ interpreter profileSemaphore: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keepObjectInVMVariable3: anOop [ interpreter profileMethod: anOop ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable1 [ ^ interpreter newMethod ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable2 [ ^ interpreter profileSemaphore ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> keptObjectInVMVariable3 [ ^ interpreter profileMethod ] -{ #category : 'accessor' } +{ #category : #accessor } VMSpurMemoryManagerTest >> memory [ ^ memory ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> memoryClass [ ^ self wordSize = 4 @@ -367,13 +365,13 @@ VMSpurMemoryManagerTest >> memoryClass [ ifFalse: [ Spur64BitMemoryManager ] ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new16BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 2 format: memory firstShortFormat ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ | indexable | @@ -383,13 +381,13 @@ VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ ^ indexable ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new32BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 4 format: memory firstLongFormat ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ | indexable | @@ -399,31 +397,31 @@ VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ ^ indexable ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new64BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 8 format: memory sixtyFourBitIndexableFormat ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> new8BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 1 format: memory firstByteFormat ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots [ ^ self newArrayWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: memory arrayFormat classIndex: anIndex ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSlot format: format [ | padding numberOfWordSizeSlots desiredByteSize theClass classIndex | @@ -439,7 +437,7 @@ VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSl classIndex: classIndex ] -{ #category : 'asd' } +{ #category : #asd } VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ | oop | @@ -457,7 +455,7 @@ VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ ^ oop ] -{ #category : 'helpers - classes' } +{ #category : #'helpers - classes' } VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: format [ | newClass formatWithSlots | @@ -475,7 +473,7 @@ VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: ^ newClass ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -486,7 +484,7 @@ VMSpurMemoryManagerTest >> newEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : 'helpers - methods' } +{ #category : #'helpers - methods' } VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arguments [ | method methodHeader | @@ -507,13 +505,13 @@ VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arg ^ method ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots [ ^ self newObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ | format | @@ -524,7 +522,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: format classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -536,7 +534,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: ^ oop ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -555,7 +553,7 @@ VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ ^ oop ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -566,7 +564,7 @@ VMSpurMemoryManagerTest >> newOldEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ ^ self @@ -574,13 +572,13 @@ VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots [ ^ self newOldSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -592,7 +590,7 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -604,13 +602,13 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat cla ^ oop ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentObjectWithSlots: slots [ ^ self newPermanentSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -624,7 +622,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: a classIndex: anIndex ] -{ #category : 'helpers - objects' } +{ #category : #'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -636,7 +634,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aForm ^ oop ] -{ #category : 'helpers - frames' } +{ #category : #'helpers - frames' } VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -682,7 +680,7 @@ VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newString: aString [ | vmString | @@ -701,7 +699,7 @@ VMSpurMemoryManagerTest >> newString: aString [ ^ vmString ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ ^ self @@ -710,7 +708,7 @@ VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ classIndex: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> newZeroSizedObject [ ^ memory @@ -719,7 +717,7 @@ VMSpurMemoryManagerTest >> newZeroSizedObject [ classIndex: self zeroSizedObjectClassIndex. ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ^ nextIndex @@ -727,18 +725,18 @@ VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ifNotNil: [ nextIndex := nextIndex + 1 ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> objectHeaderSize [ ^ memory baseHeaderSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> primitiveTraceLogSize [ ^ 0 ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ | aClass | aClass := self @@ -751,7 +749,7 @@ VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ withValue: aClass ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ | aClass | aClass := self @@ -764,7 +762,7 @@ VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ withValue: aClass ] -{ #category : 'tests' } +{ #category : #tests } VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ | class | @@ -788,7 +786,7 @@ VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUp [ super setUp. @@ -815,7 +813,7 @@ VMSpurMemoryManagerTest >> setUp [ memory lastHash: 1. ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUpScheduler [ "The ScheduleAssocation should be initialized to a valid Processor object" @@ -843,7 +841,7 @@ VMSpurMemoryManagerTest >> setUpScheduler [ memory memoryActiveProcess: activeProcessOop. ] -{ #category : 'running' } +{ #category : #running } VMSpurMemoryManagerTest >> setUpUsingImage [ "/!\ Only runnable with a wordsize equals to your image's (needs disabling parametizing of wordsize) /!\" @@ -876,30 +874,30 @@ VMSpurMemoryManagerTest >> setUpUsingImage [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> sizeOfObjectWithSlots: slots [ ^ self objectHeaderSize + ((slots min: 1 "at least one for the forwarder pointer") * memory wordSize "bytes") ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> useComposedImageFormat: aBoolean [ useComposedImageFormat := aBoolean ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> wordSize [ ^ wordSize ifNil: [ 8 ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurMemoryManagerTest >> wordSize: aWordSize [ wordSize := aWordSize ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurMemoryManagerTest >> zeroSizedObjectClassIndex [ ^ zeroSizedObjectClassIndex ifNil: [ self nextOrdinaryClassIndex ] diff --git a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st index 2617ab3f77..db41fee015 100644 --- a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurNewSpaceStructureTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurNewSpaceStructureTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> fillEden [ "Allocate enough objects to fill the eden." @@ -15,7 +13,7 @@ VMSpurNewSpaceStructureTest >> fillEden [ do: [ :index | self newZeroSizedObject ] ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject [ | freeStartBefore | @@ -26,7 +24,7 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAfterObject [ | freeStartBefore | @@ -37,38 +35,38 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAft self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenEndIsAtTheStartOfOldSpace [ self assert: memory scavenger eden limit equals: memory getMemoryMap newSpaceEnd ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenIsRestOfNewSpace [ self assert: memory scavenger eden size > (environmentBuilder newSpaceSize - memory scavenger pastSpace size - memory scavenger futureSpace size - interpreter interpreterAllocationReserveBytes) ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFreeStartIsEdenStart [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceEndIsAtTheStartOfEden [ self assert: memory scavenger futureSpace limit equals: memory scavenger eden start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger futureSpace size equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceStart [ "The future survivor start indicates during the execution of the scavenger, where the next free space in future space starts." @@ -76,13 +74,13 @@ VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceSt self assert: memory scavenger futureSurvivorStart equals: memory scavenger futureSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceEndIsAtTheStartOfFutureSpace [ self assert: memory scavenger pastSpace limit equals: memory scavenger futureSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart [ " - pastSpaceStart points to where the free space in the past space starts => it **does** move @@ -91,19 +89,19 @@ VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsAtTheStartOfNewSpace [ self assert: memory scavenger pastSpace start equals: memory getMemoryMap newSpaceStart ] -{ #category : 'tests-1-memory-initialization' } +{ #category : #'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger pastSpaceBytes equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ "Allocate enough objects to fill the eden." @@ -117,7 +115,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ self assert: error messageText equals: 'no room in eden for allocateNewSpaceSlots:format:classIndex:' ] ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ | futureSpaceStartBefore | @@ -127,7 +125,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ self assert: memory scavenger futureSurvivorStart equals: futureSpaceStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ | pastSpaceStartBefore | @@ -137,7 +135,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ self assert: memory pastSpaceStart equals: pastSpaceStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -148,7 +146,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ self assert: oop equals: freeStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -159,7 +157,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeade self assert: oop equals: freeStartBefore ] -{ #category : 'tests-2-instantiation' } +{ #category : #'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testScavengeThresholdIsInsideTheEden [ self assert:(memory scavengeThreshold diff --git a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st index 04a758a911..9eb2876f3f 100644 --- a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurObjectAllocationTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurObjectAllocationTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ | oldFreeStart | @@ -16,7 +14,7 @@ VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ self assert: memory freeStart > oldFreeStart ] -{ #category : 'tests' } +{ #category : #tests } VMSpurObjectAllocationTest >> testAllocateObjectInOldSpaceMovesFreeStart [ | oldFreeStart | diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st index b86ff4e514..2e6576bb9a 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurOldSpaceBootstrapTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceBootstrapTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ | tableRoot | @@ -31,7 +29,7 @@ VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ equals: memory classTableRootSlots + memory hiddenRootSlots ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ | freeListOop | @@ -40,7 +38,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ self assert: (memory numSlotsOf: freeListOop) equals: memory numFreeLists ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ | freeListOop | @@ -49,7 +47,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ self assert: (memory formatOf: freeListOop) equals: memory wordIndexableFormat ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ | freeListOop | @@ -59,14 +57,14 @@ VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ self assert: (memory fetchPointer: i ofObject: freeListOop) equals: 0 ] ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid [ memory initializeFreeList. memory validFreeTree ] -{ #category : 'tests-memory-bootstrap' } +{ #category : #'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid2 [ memory initializeFreeList. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index 8f584c1825..6331e5ee93 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -1,20 +1,18 @@ Class { - #name : 'VMSpurOldSpaceGarbageCollectorTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurOldSpaceGarbageCollectorTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'objectStackLimit' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'assertion' } +{ #category : #assertion } VMSpurOldSpaceGarbageCollectorTest >> assertHashOf: anOop equals: aHash [ self assert: (memory hashBitsOf: anOop) equals: aHash ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ | initialSpace lastObjectToBeRemembered sizeOfLastObject | "The planning compactor frees object by sliding, and therefore does not reclaim memory if there is only dead objects in the oldspace." @@ -35,34 +33,34 @@ VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ ^ initialSpace - sizeOfLastObject - memory totalFreeListBytes ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> initializationOptions [ ^ super initializationOptions , { #ObjStackPageSlots . objectStackLimit } ] -{ #category : 'testing' } +{ #category : #testing } VMSpurOldSpaceGarbageCollectorTest >> isValidFirstBridge [ ^ memory segmentManager isValidSegmentBridge: (memory segmentManager bridgeAt: 0) ] -{ #category : 'running' } +{ #category : #running } VMSpurOldSpaceGarbageCollectorTest >> runCaseManaged [ ^ self runCase ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> setUp [ objectStackLimit := 10. super setUp. ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpace [ | anObjectOop slotsNumber | @@ -73,7 +71,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: anObjectOop isNil ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpaceShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -84,7 +82,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: memory needGCFlag ] -{ #category : 'testCompactor' } +{ #category : #testCompactor } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFreeChunk [ | chuckSize chunk next object free | @@ -119,7 +117,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFr self assert: (memory isFreeObject: free). ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ | anObjectOop slotsNumber | @@ -130,7 +128,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ self assert: anObjectOop isNotNil ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldBeZero [ | anObjectOop slotsNumber | @@ -141,7 +139,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldB self assert: memory totalFreeOldSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -152,7 +150,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldP self assert: memory needGCFlag ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollected [ | deltaFreeSpace | @@ -162,7 +160,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollec self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShouldBeCollected [ | deltaFreeSpace | @@ -175,7 +173,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShou self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPermObjectShouldBeKept [ | oldObjectSize deltaFreeSpace | @@ -188,7 +186,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPer self assert: deltaFreeSpace equals: oldObjectSize ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedCycleObjectShouldBeCollected [ | deltaFreeSpace | @@ -202,7 +200,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedC self assert: deltaFreeSpace equals: 0 ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeKept [ | oldOop objectSize deltaFreeSpace | @@ -216,7 +214,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assert: deltaFreeSpace equals: objectSize ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeMoved [ | anObjectOop hash | @@ -235,7 +233,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assertHashOf: self keptObjectInVMVariable1 equals: hash ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantained [ | deltaFreeSpace arrayOfPerms objectsSize aPermObject anOldObject originalRememberedSetSize afteRememberedSetSize numberOfObjects originalNewRememberedSetSize afteNewRememberedSetSize | @@ -262,7 +260,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: deltaFreeSpace equals: objectsSize + (afteRememberedSetSize - originalRememberedSetSize) + (afteNewRememberedSetSize - originalNewRememberedSetSize) ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantainedWhenObjectsMoved [ | numberOfObjects originalHashes permArray anOldObject | @@ -285,7 +283,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: (originalHashes at: i) equals: (memory hashBitsOf: (memory fetchPointer: i - 1 ofObject: permArray))] ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemerons [ "This test creates a set of ephemerons on the old space that should be fired because their key is not referenced. @@ -325,7 +323,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemerons [ equals: ephemerons ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithNonFirableHead [ "This test creates a set of ephemerons on the old space that should be fired because their key is not referenced. @@ -375,7 +373,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithNonFirable equals: 5 ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithOldKeys [ "This test creates a set of ephemerons on the old space that should be fired because their key is not referenced. @@ -415,7 +413,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithOldKeys [ equals: ephemerons ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ | ephemeron | @@ -437,7 +435,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ | ephemeron | @@ -467,7 +465,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ memory fullGC. @@ -478,7 +476,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ self deny: (memory isFreeObject: (memory freeListsObj)). ] -{ #category : 'tests-OldSpaceSize' } +{ #category : #'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ | obj1 obj2 obj3 arrFrom arrTo arrFrom2 arrTo2 | @@ -510,7 +508,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ self assert: (memory isRemembered: arrTo2). ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ | roots ephemeron1 ephemeron2 ephemeron3 key1 key2 key3 | @@ -573,7 +571,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -611,7 +609,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQue equals: numberJustOverLimit ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail [ | ephemeron1 key | @@ -629,7 +627,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ | ephemeronObjectOopOne ephemeronObjectOopTwo nonEphemeronObjectOop | @@ -652,7 +650,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect non ephemeron object" + "Collect non ephemeron object that is in the old space" memory fullGC. ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. @@ -661,7 +659,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ | freespace freespace2 slotsNumber anObjectOop | @@ -686,7 +684,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ self assert: freespace equals: memory totalFreeOldSpace ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ | roots keyObj ephemeronObj | @@ -705,7 +703,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ self assert: memory dequeueMourner equals: nil. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ | roots keyObj ephemeronObj keyObj2 ephemeronObj2 | @@ -732,7 +730,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ self assert: memory dequeueMourner equals: nil. ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -770,7 +768,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ equals: numberJustOverLimit ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronAsKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -785,7 +783,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronA memory fullGC ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -799,7 +797,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemer memory fullGC ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -816,7 +814,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEph memory fullGC ] -{ #category : 'ephemerons' } +{ #category : #ephemerons } VMSpurOldSpaceGarbageCollectorTest >> testPageLimitMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st index 11d8661998..33212d0b85 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMSpurOldSpaceStructureTest', - #superclass : 'VMSpurMemoryManagerTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceStructureTest, + #superclass : #VMSpurMemoryManagerTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceShouldHaveOneSegment [ self assert: memory segmentManager numSegments equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSameSizeAsOldSpace [ self @@ -20,7 +18,7 @@ VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSam equals: memory oldSpaceSize ] -{ #category : 'tests' } +{ #category : #tests } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSizeShouldBeAskedMemory [ self assert: memory oldSpaceSize equals: oldSpaceSize diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st index 131ffcdd73..b923eade30 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurOldSpaceTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurOldSpaceTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ memory allocateOldSpaceChunkOfBytes: memory totalFreeListBytes. @@ -14,7 +12,7 @@ VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ self assert: memory totalFreeListBytes equals: 0 ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self createFreeChunkOfSize: 120. @@ -26,7 +24,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: 24) ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists [ self createFreeChunkOfSize: 120. @@ -38,7 +36,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists self assertFreeListEmpty: (self freeListForSize: 120) ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ | smallerAddress newAddress | @@ -51,7 +49,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ self assert: newAddress equals: smallerAddress ] -{ #category : 'tests-8-allocation-strategy-list-bestfit' } +{ #category : #'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self createFreeChunkOfSize: 120. @@ -63,7 +61,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self denyFreeListEmpty: (self freeListForSize: 160) ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ | someBytes freeBytesBefore | @@ -74,7 +72,7 @@ VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ self assert: memory totalFreeListBytes equals: freeBytesBefore - someBytes ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ | secondAddress newAddress | @@ -85,7 +83,7 @@ VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ self deny: newAddress equals: secondAddress ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self createFreeChunkOfSize: 160. @@ -97,7 +95,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self denyFreeListEmpty: (self freeListForSize: 200) ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ | secondAddress | @@ -108,7 +106,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ self assert: (self freeListForSize: 160) equals: 0 ] -{ #category : 'tests-6-allocation-strategy-list-exact' } +{ #category : #'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ | secondAddress newAddress | @@ -118,7 +116,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ self assert: newAddress equals: secondAddress ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ memory allocateOldSpaceChunkOfBytes: (memory bytesInObject: self freeTreeRootOop). @@ -126,7 +124,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ self assert: self freeTreeRootOop equals: 0 ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -137,7 +135,7 @@ VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ | size childAddress smallerChildOop largerChildOop aBitBiggerThanHalf | @@ -156,7 +154,7 @@ VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ self assert: (memory bytesInObject: largerChildOop) equals: aBitBiggerThanHalf ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ | freeRootOopBeforeAllocation | @@ -167,7 +165,7 @@ VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ self deny: freeRootOopBeforeAllocation equals: self freeTreeRootOop ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ "Allocation should be contiguous because we have a single big chunk of memory to take memory from" @@ -178,7 +176,7 @@ VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ | address | @@ -187,7 +185,7 @@ VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ self assert: address isNil ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRoot [ | leftOverSize | @@ -197,7 +195,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRo self assert: (memory bytesInObject: self freeTreeRootOop) equals: leftOverSize ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList [ | leftOverSize | @@ -207,7 +205,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : 'tests-9-allocation-strategy-tree' } +{ #category : #'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -220,7 +218,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ | sizeToAllocate powerOfSizeToAllocate leftOverSize | @@ -233,7 +231,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ | sizeToAllocate powerOfSizeToAllocate nonMultipleAddress newAddress | @@ -255,7 +253,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ self deny: newAddress equals: nonMultipleAddress. ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ | sizeToAllocate powerOfSizeToAllocate | @@ -267,7 +265,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ self assertFreeListEmpty: (self freeListForSize: powerOfSizeToAllocate) ] -{ #category : 'tests-7-allocation-strategy-list-power' } +{ #category : #'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ | sizeToAllocate freeMultipleAddress newAddress powerOfSizeToAllocate | @@ -279,7 +277,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ self assert: newAddress equals: freeMultipleAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ | secondAddress newAddress | @@ -290,7 +288,7 @@ VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ self assert: newAddress equals: secondAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ | secondAddress thirdAddress | @@ -301,7 +299,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ self assert: secondAddress < thirdAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ | freeChunkStartAddress allocatedSize | @@ -313,7 +311,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ equals: freeChunkStartAddress + allocatedSize ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted [ | freeChunkStartAddressBeforeAllocation allocatedAddress | @@ -324,7 +322,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted equals: freeChunkStartAddressBeforeAllocation ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ | firstAddress byteSize smallerNodeOop | @@ -337,7 +335,7 @@ VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ self assert: smallerNodeOop equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian [ | newAddress freeLargeSpaceAddressBeforeAllocation freeAddress | @@ -351,7 +349,7 @@ VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian self assert: newAddress equals: freeLargeSpaceAddressBeforeAllocation ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ | smallerChild freeTreeRoot parentNode | @@ -364,7 +362,7 @@ VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ self assert: parentNode equals: freeTreeRoot ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ | freeTreeRoot size child1 child2 nextChildOop child3 siblingOop previousOop | @@ -391,7 +389,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ self assert: previousOop equals: nextChildOop. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ | freeTreeRoot size child1 child2 nextChildOop child3 largerOop largerThanSmaller siblingOop | @@ -423,7 +421,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ self assert: largerOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ | freeTreeRoot size child1 child2 nextChild child3 parentOop | @@ -450,7 +448,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ self assert: parentOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ | freeTreeRoot size child1 child2 nextChildOop child3 smallerOop smallerThanSmaller siblingOop | @@ -482,7 +480,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ self assert: smallerOop equals: 0. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ | freeRoot address | @@ -494,7 +492,7 @@ VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ self assert: freeRoot equals: (memory freeLists at: 0) ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead [ | smallerChild freeTreeRoot size child1 child2 nextChild child3 | @@ -516,7 +514,7 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead self assert: nextChild equals: child2. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ | smallerChild freeTreeRoot size child1 child2 nextChild | @@ -534,13 +532,13 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ self assert: nextChild equals: child2. ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testFalseObjectIsNotAnArray [ self deny: (memory isArray: memory falseObject). ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ | firstAddress secondAddress freeListHead chunkSize | chunkSize := 32. @@ -554,7 +552,7 @@ VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ self assert: freeListHead equals: secondAddress ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ | secondAddress | @@ -564,7 +562,7 @@ VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ self assert: memory allFreeObjects size equals: 2 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize | allocationSize := 32. @@ -580,7 +578,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ self assert: nextFreeChunk equals: firstAddress ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize previousFreeChunk | allocationSize := 32. @@ -597,7 +595,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ self assert: previousFreeChunk equals: freeListHead ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChunks [ | secondAddress newAddress | @@ -609,7 +607,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChu self assert: memory allFreeObjects size equals: 3 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ | secondAddress allocationSize firstAddress | allocationSize := 32. @@ -622,7 +620,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ self assert: memory allFreeListHeads size equals: 1 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ | firstAddress freeListHead | @@ -638,7 +636,7 @@ VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ ] ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ 2 to: memory numFreeLists - 1 do: [ :numberOfSlots | @@ -648,7 +646,7 @@ VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ ] ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ | bigChunk nextNode | @@ -658,7 +656,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ | bigChunk nextNode | @@ -668,7 +666,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ | bigChunk nextNode | @@ -678,7 +676,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ | bigChunk nextNode | @@ -688,7 +686,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ | bigChunk nextNode | @@ -698,13 +696,13 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ self assert: nextNode equals: 0. ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootIsFreeObject [ self assert: (memory isFreeObject: self freeTreeRootOop) ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ self @@ -712,7 +710,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ equals: memory totalFreeListBytes ] -{ #category : 'tests-4-free-tree' } +{ #category : #'tests-4-free-tree' } VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ | firstAddress byteSize smallerNodeOop | @@ -725,7 +723,7 @@ VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ self assert: (memory startOfObject: smallerNodeOop) equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop | @@ -746,7 +744,7 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ self assert: (memory startOfObject: largerChildOop) equals: firstAddress ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop parentNodeOop | @@ -768,13 +766,13 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ self assert: parentNodeOop equals: newRoot ] -{ #category : 'tests-1-startup' } +{ #category : #'tests-1-startup' } VMSpurOldSpaceTest >> testNewMemoryShouldHaveSingleFreeObject [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ | oop | @@ -783,19 +781,19 @@ VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ self assert: (memory getMemoryMap isOldObject: oop) ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectIsNotAnArray [ self deny: (memory isArray: memory nilObject). ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectObjectFormatIsZero [ self assert: (memory formatOf: memory nilObject) equals: 0. ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFreeList [ | secondAddress freeChunksBefore | @@ -808,7 +806,7 @@ VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFr self assert: memory allFreeObjects size equals: freeChunksBefore. ] -{ #category : 'tests-2-allocation-basic' } +{ #category : #'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ | secondAddress | @@ -819,7 +817,7 @@ VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -831,7 +829,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ self assert: (self nextNodeOf: freeListHead) equals: 0 ] -{ #category : 'tests-3-free-lists' } +{ #category : #'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -843,7 +841,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ self assert: (self previousNodeOf: freeListHead) equals: 0 ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ | smallerChild freeTreeRoot parentNode smallerSize rootSize | @@ -860,7 +858,7 @@ VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ self assert: parentNode equals: freeTreeRoot ] -{ #category : 'tests-5-allocation-strategy' } +{ #category : #'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testTrueObjectIsNotAnArray [ self deny: (memory isArray: memory trueObject). diff --git a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st index dd5b734300..674b31f591 100644 --- a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurRememberedSetTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurRememberedSetTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests - from old to new' } +{ #category : #'tests - from old to new' } VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ | oldObjectAddress rememberedObjectAddress | @@ -24,7 +22,7 @@ VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ ] -{ #category : 'tests - from old to perm' } +{ #category : #'tests - from old to perm' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNewRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -42,7 +40,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNew ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress referencedOldObjectAddress | @@ -65,7 +63,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberP ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOldRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -84,7 +82,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOld ] -{ #category : 'tests - from perm to new' } +{ #category : #'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRememberedToo [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -101,7 +99,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRemembered ] -{ #category : 'tests - from perm to new' } +{ #category : #'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRememberedSet [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -119,7 +117,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRem ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ | oldObjectAddress | @@ -128,7 +126,7 @@ VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ | oldObjectRootAddress originalLimit youngObjectAddress | @@ -158,7 +156,7 @@ VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ self assert: memory getFromOldSpaceRememberedSet rememberedSetLimit equals: originalLimit * 2 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone [ | oldObjectAddress storedOldObjectAddress | @@ -172,7 +170,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: storedOldObjectAddress). ] -{ #category : 'tests - from perm to old' } +{ #category : #'tests - from perm to old' } VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress | @@ -188,7 +186,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObjec self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyone [ | oldObjectAddress youngObjectAddress | @@ -202,7 +200,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyon self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests - from old to perm' } +{ #category : #'tests - from old to perm' } VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone [ | permObjectAddress oldObjectAddress | @@ -216,7 +214,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : 'tests - from perm to perm' } +{ #category : #'tests - from perm to perm' } VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyone [ | permObjectAddress referencedPermObjectAddress | @@ -230,7 +228,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyon self deny: (memory isRemembered: referencedPermObjectAddress). ] -{ #category : 'tests - from new to perm' } +{ #category : #'tests - from new to perm' } VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyone [ | permObjectAddress youngObjectAddress | @@ -244,7 +242,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyo self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress youngObjectAddress | @@ -269,7 +267,7 @@ VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberP ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObject [ | oldObjectAddress youngObjectAddress | @@ -283,7 +281,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObjec self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObject [ | permObjectAddress youngObjectAddress | @@ -297,7 +295,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObj self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAnyone [ | youngObjectAddress storedYoungObjectAddress | @@ -311,7 +309,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAny self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : 'tests' } +{ #category : #tests } VMSpurRememberedSetTest >> testYoungObjectIsNotRemembered [ | newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st index 2d78990862..d4b6cbe80f 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurScavengeEphemeronTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengeEphemeronTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> pushRoot: anObject [ | link | @@ -22,7 +20,7 @@ VMSpurScavengeEphemeronTest >> pushRoot: anObject [ self keepObjectInVMVariable1: link. ] -{ #category : 'initialization' } +{ #category : #initialization } VMSpurScavengeEphemeronTest >> setUp [ super setUp. @@ -30,7 +28,7 @@ VMSpurScavengeEphemeronTest >> setUp [ self createEphemeronClass ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmptyMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -50,7 +48,7 @@ VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmpty self assert: memory dequeueMourner equals: nil ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredDuringEphemeronListIteration [ | ephemeronObjectOop1 ephemeronObjectOop2 dicoveredEphemeron nonSurvivingKey key1 key2 | @@ -98,7 +96,7 @@ VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredDuringEphemeronListIterati memory runLeakCheckerFor: GCModeIncremental ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredTwiceInRememberedSet [ | ephemeronObjectOop oldEphemeronObjectOop1 oldEphemeronObjectOop2 | @@ -120,7 +118,7 @@ VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredTwiceInRememberedSet [ memory runLeakCheckerFor: GCModeIncremental ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ | numberOfEphemerons ephemeronKey | @@ -156,7 +154,7 @@ VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ withValue: memory nilObject ] ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeronClass [ | ephemeronObjectOop | @@ -167,7 +165,7 @@ VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeron equals: ourEphemeronClass ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -190,7 +188,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalO equals: memory nonIndexablePointerFormat ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -211,7 +209,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -238,7 +236,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -267,7 +265,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSu equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -288,7 +286,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAft equals: memory nonIndexablePointerFormat ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -307,7 +305,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -329,7 +327,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -353,7 +351,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorSho equals: nonEphemeronObjectHash ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInEden [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -384,7 +382,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInPastSpace [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -426,7 +424,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlyOneEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -458,7 +456,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: nil ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlySecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -488,7 +486,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldBeQueuedAfterConsumingMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -526,7 +524,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldLeaveFirstOneAsEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -556,7 +554,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: (memory isEphemeron: ephemeronObjectOop) ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldScavengeKeyOfSecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -588,7 +586,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi equals: (memory remapObj: nonEphemeronObjectOop) ] -{ #category : 'tests-ephemerons-globals' } +{ #category : #'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeZeroSizedEphemeronShouldTreatItAsNormalObject [ | ephemeronObjectOop zeroSizedEphemeronClass hashBefore addressBefore | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st index 56c08746b3..ae428a6af8 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMSpurScavengeWeakTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengeWeakTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'test-format' } +{ #category : #'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ | weakObjectOop | @@ -16,7 +14,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ self assert: (memory fetchClassOfNonImm: weakObjectOop) equals: ourWeakClass ] -{ #category : 'test-format' } +{ #category : #'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ | weakObjectOop classIndex | @@ -28,7 +26,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ self assert: classIndex equals: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash nilHash | @@ -52,7 +50,7 @@ VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldB equals: nilHash ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nilHash | @@ -72,7 +70,7 @@ VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNi equals: nilHash ] -{ #category : 'tests' } +{ #category : #tests } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingSurvivorShouldLeaveWeakObjectAsIs [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st index 08ac1152d9..94f56ee281 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st @@ -1,19 +1,17 @@ Class { - #name : 'VMSpurScavengerTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurScavengerTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'asserting' } +{ #category : #asserting } VMSpurScavengerTest >> assertPastSpaceIsEmpty [ self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurScavengerTest >> fullNewSpace [ | rootObjectAddress referencedObjectAddress freeStartAtBeginning | @@ -39,7 +37,7 @@ VMSpurScavengerTest >> fullNewSpace [ self error: 'New space is not full!' ] -{ #category : 'helpers' } +{ #category : #helpers } VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop receiver: aReceiverOop args: argsOops andStack: stackOops [ | page pointer | @@ -87,7 +85,7 @@ VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop withValue: (memory coInterpreter withSmallIntegerTags: page baseFP) ] ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScavenge [ | times | @@ -99,7 +97,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScaveng self deny: memory needGCFlag ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ | times anObjectOop | @@ -110,7 +108,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ self assert: (memory getMemoryMap isYoungObject: anObjectOop) ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ | times anObject | @@ -128,7 +126,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ self assert: (memory getMemoryMap isOldObject: anObject) ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge [ | times | @@ -146,7 +144,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge self assert: memory needGCFlag ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -167,7 +165,7 @@ VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ | rootObjectAddress | @@ -183,7 +181,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0 "Past space keep not full -> Not tenure next pass" ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ | rootObjectAddress | @@ -198,7 +196,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0.1 "Past space is full -> Tenure next pass" ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -221,7 +219,7 @@ VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -240,7 +238,7 @@ VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -259,7 +257,7 @@ VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -278,7 +276,7 @@ VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -297,7 +295,7 @@ VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-5-scavenge-specialObjects' } +{ #category : #'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -316,7 +314,7 @@ VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -338,7 +336,7 @@ VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ | rootObjectAddress newRootObjectAddress referencedObjectAddress referencedObjectHash | @@ -361,7 +359,7 @@ VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ equals: referencedObjectHash ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -381,7 +379,7 @@ VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress maybeMappedReferenceToYoungObject | @@ -401,7 +399,7 @@ VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterS self assert: maybeMappedReferenceToYoungObject equals: newRememberedObjectAddress ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferencedObjectIsInTheOldSpace [ | permObjectAddress youngObject otherOldObjectAddress | @@ -428,7 +426,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferenced ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceWhenMutatedToPointAPermObject [ | permObjectAddress youngObject otherPermObjectAddress | @@ -452,7 +450,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceW ] -{ #category : 'tests-4-scavenge-stack' } +{ #category : #'tests-4-scavenge-stack' } VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -472,7 +470,7 @@ VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ | rootObjectAddress rootObjectHash newRootObjectAddress referencedObjectAddress referencedObjectHash newReferencedObjectAddress | @@ -495,7 +493,7 @@ VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ self assert: (memory hashBitsOf: newReferencedObjectAddress) equals: referencedObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ | youngObjectAddress oneOldObjectAddress otherOldObjectAddress | @@ -520,7 +518,7 @@ VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces [ | oldPastSpaceStart oldFutureSpaceStart | @@ -533,7 +531,7 @@ VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces self assert: memory scavenger futureSpace start equals: oldPastSpaceStart. ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ "Nil should survive." "A new object not referenced should not survive." @@ -544,7 +542,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPastSpace [ "Only Nil should survive." @@ -556,7 +554,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPast self assertPastSpaceIsEmpty ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -581,7 +579,7 @@ VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBefo self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -606,7 +604,7 @@ VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInS self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -623,7 +621,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVar self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -640,7 +638,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObject self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ "Nil should survive. It is referenced by the roots because many of their slots are nilled." @@ -649,7 +647,7 @@ VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ memory doScavenge: 1 "TenureByAge". @@ -657,7 +655,7 @@ VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAndForth [ | oldPastSpaceStart oldFutureSpaceStart | @@ -670,7 +668,7 @@ VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAnd self assert: memory scavenger futureSpace start equals: oldFutureSpaceStart. ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder [ | rootObjectAddress objectThatShouldGoSecond objectThatShouldGoFirst | @@ -688,7 +686,7 @@ VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder self assert: (memory remapObj: objectThatShouldGoFirst) < (memory remapObj: objectThatShouldGoSecond) ] -{ #category : 'tests-7-scavenge-order' } +{ #category : #'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects [ | firstRootObjectAddress nonRootObjectAddress secondRootObjectAddress | @@ -706,7 +704,7 @@ VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects self assert: (memory remapObj: secondRootObjectAddress) < (memory remapObj: nonRootObjectAddress) ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ | firstObjectAddress secondObjectAddress | @@ -738,7 +736,7 @@ VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ ] -{ #category : 'tests-8-scavenge-tenuring' } +{ #category : #'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ | rootObjectAddress newRootObjectAddress | @@ -762,7 +760,7 @@ VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ self assert: (memory isInOldSpace: newRootObjectAddress) ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ | objectA objectB | objectA := self newObjectWithSlots: 1. @@ -781,7 +779,7 @@ VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ | unreferencedRootObjectAddress referencedObjectAddress | unreferencedRootObjectAddress := self newObjectWithSlots: 1. @@ -796,7 +794,7 @@ VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -814,7 +812,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanve self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : 'tests-6-scavenge-rememberedset' } +{ #category : #'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurviveScanvenge [ | permObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -832,7 +830,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurvive self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : 'tests-3-scavenge-basic' } +{ #category : #'tests-3-scavenge-basic' } VMSpurScavengerTest >> testYoungObjectsFromPermanentSpaceAreRemapped [ | newObjectOop newObjectHash permObject newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st index 6c7bc93c59..3b597fa124 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st @@ -1,18 +1,16 @@ Class { - #name : 'VMSpurTreeAllocationStrategyForLargeTreeTest', - #superclass : 'VMSpurTreeAllocationStrategyForSmallTreeTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMSpurTreeAllocationStrategyForLargeTreeTest, + #superclass : #VMSpurTreeAllocationStrategyForSmallTreeTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ " 1120 @@ -54,7 +52,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -62,7 +60,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWit self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -70,7 +68,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -78,7 +76,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWithChildrenShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -86,7 +84,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWit self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -94,7 +92,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTree self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -104,7 +102,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTree self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -112,7 +110,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTree self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -120,7 +118,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeN self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -130,7 +128,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeN self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -138,7 +136,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeN self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -146,7 +144,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSm self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -156,7 +154,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSm self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -164,7 +162,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSm self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -172,7 +170,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSma self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -181,7 +179,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSma self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSmallerLeafTreeNodeShouldShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -189,7 +187,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSma self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -197,7 +195,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLa self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -207,7 +205,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLa self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -215,7 +213,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLa self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. @@ -223,7 +221,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLar self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -233,7 +231,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLar self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-10-bestfit-liliputian-leftovers' } +{ #category : #'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test37AllocateBestFitLargerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st index 4340d04dd7..8fe74cb50a 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st @@ -1,29 +1,27 @@ Class { - #name : 'VMSpurTreeAllocationStrategyForSmallTreeTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurTreeAllocationStrategyForSmallTreeTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationStrategyForSmallTreeTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUp [ super setUp. self setUpTree. ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ " 560 @@ -63,13 +61,13 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationStrategyForSmallTreeTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -77,7 +75,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithC self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 8. @@ -86,7 +84,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliput self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -94,7 +92,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -105,7 +103,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1152 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -113,7 +111,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRootAddress [ | desiredAddress allocatedAddress | @@ -123,7 +121,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2). @@ -131,7 +129,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNo self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseLargestSmallerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 8. @@ -140,7 +138,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -150,7 +148,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNo self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -161,7 +159,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1088 - allocatedSize) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3). @@ -169,7 +167,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNod self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseSmallerThanRootAddress [ | desiredAddress allocatedAddress | @@ -179,7 +177,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -189,7 +187,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNod self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldUseIntermediateNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -199,7 +197,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4). @@ -207,7 +205,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmal self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | allocatedSize := (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -217,7 +215,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1056 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -227,7 +225,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmal self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldUseRootNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 8. @@ -237,7 +235,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanL self assert: (memory bytesInObject: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 3) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5). @@ -245,7 +243,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmall self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -256,7 +254,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanL self denyFreeListEmpty: (self freeListForSize: 1120 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -265,7 +263,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmall self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldUseLargestLeafNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 8. @@ -274,7 +272,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6). @@ -282,7 +280,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLarg self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -294,7 +292,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1216 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -304,7 +302,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLarg self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldUseIntermediateLargerNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 8. @@ -313,7 +311,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7). @@ -321,7 +319,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLarge self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -333,7 +331,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1184 - allocatedSize). ] -{ #category : 'tests-09-exact-fit' } +{ #category : #'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -343,7 +341,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLarge self assert: allocatedAddress equals: desiredAddress ] -{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateSmallerThanLiliputianDiffFromLargestLeaShouldFindNoMemory [ self assert: (memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 8) equals: nil diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st index 09933d96de..de185856c6 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st @@ -1,22 +1,20 @@ Class { - #name : 'VMSpurTreeAllocationWithBigNodesTest', - #superclass : 'VMSpurInitializedOldSpaceTest', + #name : #VMSpurTreeAllocationWithBigNodesTest, + #superclass : #VMSpurInitializedOldSpaceTest, #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationWithBigNodesTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : 'running' } +{ #category : #running } VMSpurTreeAllocationWithBigNodesTest >> setUp [ " Allocate a tree that has a large child large enough so a remainder could still be larger than the root @@ -47,13 +45,13 @@ VMSpurTreeAllocationWithBigNodesTest >> setUp [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : 'accessing' } +{ #category : #accessing } VMSpurTreeAllocationWithBigNodesTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: 16. @@ -62,7 +60,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShould self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: 1008 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShouldBeInsertedInLarger [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) + 16. @@ -71,7 +69,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShou self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: 4080 ] -{ #category : 'tests' } +{ #category : #tests } VMSpurTreeAllocationWithBigNodesTest >> test03LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) * 2 + 16. diff --git a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st index bd476b58e7..03868c02d3 100644 --- a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st @@ -27,25 +27,23 @@ Types are not the exact types used. " Class { - #name : 'VMStackBuilder', - #superclass : 'VMAbstractBuilder', + #name : #VMStackBuilder, + #superclass : #VMAbstractBuilder, #instVars : [ 'page', 'frames', 'args', 'methodBuilder' ], - #category : 'VMMakerTests-Builders', - #package : 'VMMakerTests', - #tag : 'Builders' + #category : #'VMMakerTests-Builders' } -{ #category : 'frames' } +{ #category : #frames } VMStackBuilder >> addFrame: aFrame [ frames add: aFrame ] -{ #category : 'frames' } +{ #category : #frames } VMStackBuilder >> addNewFrame [ | frame | "'add' a new frame in the sense of an OrderedCollection, which will be iterated with #do: @@ -55,17 +53,17 @@ VMStackBuilder >> addNewFrame [ ^ frame "the frame is then configured by the caller" ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> args [ ^ args ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> args: anObject [ args := anObject ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> buildStack [ self createStackPage. self preparePage. @@ -74,7 +72,7 @@ VMStackBuilder >> buildStack [ ^ frames last ] -{ #category : 'stack' } +{ #category : #stack } VMStackBuilder >> createStackPage [ | sp | frames ifEmpty:[ self error ]. @@ -85,17 +83,17 @@ VMStackBuilder >> createStackPage [ interpreter stackPointer: sp. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> frames [ ^ frames ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> frames: anObject [ frames := anObject ] -{ #category : 'initialization' } +{ #category : #initialization } VMStackBuilder >> initialize [ super initialize. frames := OrderedCollection new. "will be treated in reverse" @@ -105,35 +103,35 @@ VMStackBuilder >> initialize [ page := nil. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> lastFrame [ ^ frames last ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> methodBuilder [ ^ methodBuilder ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> methodBuilder: anObject [ methodBuilder := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> page [ ^ page ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> page: anObject [ page := anObject ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> preparePage [ "Page setup before the base frame" interpreter push: memory nilObject. "receiver" @@ -144,7 +142,7 @@ VMStackBuilder >> preparePage [ ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushAllButFirstFrames [ 2 to: frames size do: [ :anIndex | | aFrame | aFrame := frames at: anIndex. @@ -158,19 +156,19 @@ VMStackBuilder >> pushAllButFirstFrames [ ] ] -{ #category : 'initialization' } +{ #category : #initialization } VMStackBuilder >> pushArgs [ args do: [ :anArg | interpreter push: anArg ] ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushBaseFrame [ frames first previousFrameArgsSize: args size. self pushFrame: frames first. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushFrame: aFrame [ interpreter framePointer: interpreter stackPointer. @@ -180,18 +178,18 @@ VMStackBuilder >> pushFrame: aFrame [ page headSP: interpreter stackPointer. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> pushFrames [ self pushBaseFrame. self pushAllButFirstFrames. ] -{ #category : 'as yet unclassified' } +{ #category : #'as yet unclassified' } VMStackBuilder >> reset [ self initialize. ] -{ #category : 'build' } +{ #category : #build } VMStackBuilder >> setInterpreterVariables [ | lastFrame | interpreter setStackPageAndLimit: page. @@ -206,7 +204,7 @@ VMStackBuilder >> setInterpreterVariables [ ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackBuilder >> topFrame [ ^ frames last ] diff --git a/smalltalksrc/VMMakerTests/VMStackFrame.class.st b/smalltalksrc/VMMakerTests/VMStackFrame.class.st index 81b9be1e5e..ec06607f85 100644 --- a/smalltalksrc/VMMakerTests/VMStackFrame.class.st +++ b/smalltalksrc/VMMakerTests/VMStackFrame.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMStackFrame', - #superclass : 'Object', + #name : #VMStackFrame, + #superclass : #Object, #instVars : [ 'framePointer', 'interpreter' @@ -8,12 +8,10 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : 'VMMakerTests-Visualisation', - #package : 'VMMakerTests', - #tag : 'Visualisation' + #category : #'VMMakerTests-Visualisation' } -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^self new framePointer: anInteger; @@ -21,19 +19,19 @@ VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpre yourself ] -{ #category : 'instance creation' } +{ #category : #'instance creation' } VMStackFrame class >> virtualMachine: aVirtualMachine fp: anInteger [ ^ self newFramePointer: anInteger withInterpreter: aVirtualMachine ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> bytecodeMethod [ ^ VMBytecodeMethod newOnInterpreter: interpreter methodOop: self method ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> caller [ | callerContext | @@ -67,41 +65,41 @@ VMStackFrame >> caller [ ^ VMContext newOnContext: callerContext withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> callerContext [ ^ interpreter frameCallerContext: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> callerFP [ ^ interpreter frameCallerFP: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> context [ ^VMContext newOnContext: (interpreter frameContext: framePointer) withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> description [ | selector | selector := interpreter findSelectorOfMethod: self methodOop. ^ interpreter stringOf: selector ] -{ #category : 'accesing' } +{ #category : #accesing } VMStackFrame >> framePointer: anInteger [ framePointer := anInteger ] -{ #category : 'testing' } +{ #category : #testing } VMStackFrame >> hasContext [ ^interpreter frameHasContext: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> instructionPointer [ ^ interpreter framePointer = framePointer @@ -109,50 +107,50 @@ VMStackFrame >> instructionPointer [ ifFalse: [ interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : 'acccessing' } +{ #category : #acccessing } VMStackFrame >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : 'testing' } +{ #category : #testing } VMStackFrame >> isMachineCodeFrame [ ^ interpreter isMachineCodeFrame: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> machineCodeMethod [ | methodSurrogate | methodSurrogate := interpreter cogMethodZone methodFor: self method. ^ VMMachineCodeMethod newOnInterpreter: interpreter cogMethodSurrogate: methodSurrogate ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> method [ ^ interpreter iframeMethod: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> methodOop [ ^ interpreter frameMethodObject: framePointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> receiver [ ^ interpreter framePointer = framePointer ifTrue: [ interpreter receiver ] ifFalse: [ self halt. interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> sender [ ^ VMStackFrame newFramePointer:(interpreter frameCallerFP: framePointer) withInterpreter: interpreter ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> sourceCode [ ^ self isMachineCodeFrame @@ -160,7 +158,7 @@ VMStackFrame >> sourceCode [ ifFalse: [ self bytecodeMethod disassemble ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> stack [ | stack currentFrame | stack := OrderedCollection new. @@ -171,7 +169,7 @@ VMStackFrame >> stack [ ^ stack ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackFrame >> stackPage [ ^interpreter stackPages stackPageFor: framePointer. ] diff --git a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st index 2e9960b95e..4a73d7c65e 100644 --- a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st @@ -1,34 +1,32 @@ Class { - #name : 'VMStackInterpreterTest', - #superclass : 'TestCase', + #name : #VMStackInterpreterTest, + #superclass : #TestCase, #instVars : [ 'stackInterpreterClass' ], - #category : 'VMMakerTests-StackInterpreter', - #package : 'VMMakerTests', - #tag : 'StackInterpreter' + #category : #'VMMakerTests-StackInterpreter' } -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> setUp [ super setUp. stackInterpreterClass := StackInterpreter. ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackInterpreterTest >> stackInterpreterClass [ ^ stackInterpreterClass ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackInterpreterTest >> stackInterpreterClass: anObject [ stackInterpreterClass := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> testIsObjectAccessor [ self @@ -37,7 +35,7 @@ VMStackInterpreterTest >> testIsObjectAccessor [ assert: (self stackInterpreterClass isObjectAccessor: #fetchClassOf:) ] -{ #category : 'running' } +{ #category : #running } VMStackInterpreterTest >> testIsStackAccessor [ self diff --git a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st index c643d5e0b8..e36709438e 100644 --- a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMStackMappingTest', - #superclass : 'VMSpurInitializedOldSpaceTest', - #category : 'VMMakerTests-MemoryTests', - #package : 'VMMakerTests', - #tag : 'MemoryTests' + #name : #VMStackMappingTest, + #superclass : #VMSpurInitializedOldSpaceTest, + #category : #'VMMakerTests-MemoryTests' } -{ #category : 'helpers' } +{ #category : #helpers } VMStackMappingTest >> buildStackFromFrames [ 3 timesRepeat: [ @@ -19,7 +17,7 @@ VMStackMappingTest >> buildStackFromFrames [ stackBuilder buildStack ] -{ #category : 'helpers' } +{ #category : #helpers } VMStackMappingTest >> newContext [ | method | @@ -32,13 +30,13 @@ VMStackMappingTest >> newContext [ ip: 10 ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testCreatingNewContextByHandShouldbeSingle [ self assert: (interpreter isSingleContext: self newContext) ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ | context fp | context := self newContext. @@ -48,7 +46,7 @@ VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ self assert: (interpreter isSingleContext: context) ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testDivorceFramesInPage [ | page | self buildStackFromFrames. @@ -69,7 +67,7 @@ VMStackMappingTest >> testDivorceFramesInPage [ ] -{ #category : 'tests' } +{ #category : #tests } VMStackMappingTest >> testMarryNewContextIsMarried [ | context | context := self newContext. @@ -77,7 +75,7 @@ VMStackMappingTest >> testMarryNewContextIsMarried [ self assert: (interpreter isStillMarriedContext: context) ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ | aContext framePointerToMarry stackPointerToMarry oldPage | self buildStackFromFrames. @@ -91,7 +89,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ self assert: oldPage isFree ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext | self buildStackFromFrames. @@ -105,7 +103,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSen self assert: expectedDivorcedContext equals: aContext. ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry oldPage newPage | self buildStackFromFrames. @@ -119,7 +117,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ self deny: oldPage equals: newPage ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -131,7 +129,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext oldBaseFramePointer callerContext | self buildStackFromFrames. @@ -151,7 +149,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsS ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -165,7 +163,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ self assert: initialiNumberOfusedPages + 1 equals: newNumberOfUsedPages ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -177,7 +175,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ | aContext initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -189,7 +187,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ self assert: initialiNumberOfusedPages equals: newNumberOfUsedPages ] -{ #category : 'test-context-tomove' } +{ #category : #'test-context-tomove' } VMStackMappingTest >> testMarryTopFrame [ | aContext | self buildStackFromFrames. diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st index fd296015d6..076488f560 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMStackToRegisterMappingCogitTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMStackToRegisterMappingCogitTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'methodReceiver', 'receiverOperationBlock', @@ -15,23 +15,21 @@ Class { 'expectedResult', 'expectedReflexiveResult' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> argumentOperation: aFullBlockClosure [ argumentOperation := aFullBlockClosure ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> arguments: aCollection [ arguments := aCollection ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> buildStackFrame [ "Let's prepare the trampoline in case of non-optimized path" self createSpecialSelectorArray. @@ -51,7 +49,7 @@ VMStackToRegisterMappingCogitTest >> buildStackFrame [ ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> compileMethod [ codeAddress := self compile: [ @@ -63,54 +61,54 @@ VMStackToRegisterMappingCogitTest >> compileMethod [ cogit genReturnTopFromMethod ] ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult [ ^ expectedReflexiveResult ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult: anObject [ expectedReflexiveResult := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedResult [ ^ expectedResult ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> expectedResult: anObject [ expectedResult := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingCogitTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> methodReceiver: anOop [ methodReceiver := anOop ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> receiverOperation: aFullBlockClosure [ receiverOperationBlock := aFullBlockClosure ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> sendBytecode [ ^ sendBytecode ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> sendBytecode: anObject [ sendBytecode := anObject ] -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingCogitTest >> setUp [ super setUp. @@ -118,7 +116,7 @@ VMStackToRegisterMappingCogitTest >> setUp [ arguments := #(). ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperation and: argumentOfOperation [ self buildStackFrame. @@ -128,7 +126,7 @@ VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperati self assertSpecialSendTo: receiverOfOperation value withArg: argumentOfOperation value ] -{ #category : 'builder' } +{ #category : #builder } VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self buildStackFrame. @@ -138,22 +136,22 @@ VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: aValue). ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value1 [ ^ value1 ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value1: anObject [ value1 := anObject ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value2 [ ^ value2 ] -{ #category : 'accessing' } +{ #category : #accessing } VMStackToRegisterMappingCogitTest >> value2: anObject [ value2 := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st index f67ef4a755..1033cc50ad 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMStackToRegisterMappingTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMStackToRegisterMappingTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMStackToRegisterMappingTest >> setUp [ super setUp. @@ -31,7 +29,7 @@ VMStackToRegisterMappingTest >> setUp [ cogit needsFrame: true ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testFlushBelowTop [ | stop stackPointerBefore framePointer | @@ -59,7 +57,7 @@ VMStackToRegisterMappingTest >> testFlushBelowTop [ self assert: self popAddress equals: (memory integerObjectOf: 17) ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopConstant [ cogit ssPushConstant: 1. @@ -69,7 +67,7 @@ VMStackToRegisterMappingTest >> testPopConstant [ self assert: cogit ssTop equals: cogit simSelf. ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -96,7 +94,7 @@ VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopRegister [ cogit ssPushRegister: TempReg. @@ -106,7 +104,7 @@ VMStackToRegisterMappingTest >> testPopRegister [ self assert: cogit ssTop equals: cogit simSelf ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ | stop stackPointerBefore framePointer | @@ -132,7 +130,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ self assert: self machineSimulator smalltalkStackPointerRegisterValue equals: stackPointerBefore ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPopFromStack [ | stop stackPointerBefore framePointer | @@ -159,7 +157,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPop self assert: self popAddress equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -186,7 +184,7 @@ VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPushConstant [ cogit ssPushConstant: 1. @@ -197,7 +195,7 @@ VMStackToRegisterMappingTest >> testPushConstant [ self deny: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testPushRegister [ cogit ssPushRegister: TempReg. @@ -208,7 +206,7 @@ VMStackToRegisterMappingTest >> testPushRegister [ self deny: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testSpillConstant [ cogit ssPushConstant: 1. @@ -225,7 +223,7 @@ VMStackToRegisterMappingTest >> testSpillConstant [ self assert: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testSpillRegister [ cogit ssPushRegister: TempReg. @@ -244,7 +242,7 @@ VMStackToRegisterMappingTest >> testSpillRegister [ self assert: cogit ssTop spilled ] -{ #category : 'tests' } +{ #category : #tests } VMStackToRegisterMappingTest >> testTopOfEmptyIsSimSelf [ self assert: cogit ssSize equals: 1. diff --git a/smalltalksrc/VMMakerTests/VMStorePopTest.class.st b/smalltalksrc/VMMakerTests/VMStorePopTest.class.st index 663d96f508..d5e7c8c90f 100644 --- a/smalltalksrc/VMMakerTests/VMStorePopTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStorePopTest.class.st @@ -1,12 +1,10 @@ Class { - #name : 'VMStorePopTest', - #superclass : 'VMStackToRegisterMappingCogitTest', - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #name : #VMStorePopTest, + #superclass : #VMStackToRegisterMappingCogitTest, + #category : #'VMMakerTests-JitTests' } -{ #category : 'running' } +{ #category : #running } VMStorePopTest >> jitOptions [ ^ super jitOptions @@ -14,7 +12,7 @@ VMStorePopTest >> jitOptions [ yourself ] -{ #category : 'tests' } +{ #category : #tests } VMStorePopTest >> testExtendedStoreAndPopIV1ImmutableObjectCallingConvention [ | instanceVariableToWrite stopAddress methodWithStoreCheck storeTrampoline | @@ -59,7 +57,7 @@ VMStorePopTest >> testExtendedStoreAndPopIV1ImmutableObjectCallingConvention [ self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : 'tests' } +{ #category : #tests } VMStorePopTest >> testStoreAndPopIV1ImmutableObjectCallingConvention [ | instanceVariableToWrite stopAddress methodWithStoreCheck | diff --git a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st index e1964ec1c5..267fd1873e 100644 --- a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st @@ -1,15 +1,14 @@ Class { - #name : 'VMTestMockInterpreter', - #superclass : 'StackInterpreterSimulatorLSB', + #name : #VMTestMockInterpreter, + #superclass : #StackInterpreterSimulatorLSB, #instVars : [ 'interpreteBlock', 'allocatedElements' ], - #category : 'VMMakerTests', - #package : 'VMMakerTests' + #category : #VMMakerTests } -{ #category : 'memory testing' } +{ #category : #'memory testing' } VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ | allocated | @@ -20,43 +19,43 @@ VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ ^ allocated ] -{ #category : 'memory testing' } +{ #category : #'memory testing' } VMTestMockInterpreter >> allocatedElements [ ^ allocatedElements ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> basicInitialize [ super basicInitialize. allocatedElements := Set new ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> enterSmalltalkExecutiveImplementation [ interpreteBlock value ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> free: aPointer [ allocatedElements remove: aPointer. ^ super free: aPointer ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> interpreteBlock [ ^ interpreteBlock ] -{ #category : 'accessing' } +{ #category : #accessing } VMTestMockInterpreter >> interpreteBlock: anObject [ interpreteBlock := anObject ] -{ #category : 'initialization' } +{ #category : #initialization } VMTestMockInterpreter >> malloc: aSize [ ^ allocatedElements add: (super malloc: aSize) diff --git a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st index 22b52f0abb..dd1e43a5cc 100644 --- a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st @@ -1,6 +1,6 @@ Class { - #name : 'VMTrampolineTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMTrampolineTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #instVars : [ 'registerMask', 'isAligned', @@ -10,12 +10,10 @@ Class { 'CogAbstractRegisters', 'VMClassIndices' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMTrampolineTest class >> testParameters [ ^ super testParameters * { @@ -24,25 +22,25 @@ VMTrampolineTest class >> testParameters [ } ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> isAligned [ ^ isAligned ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> isAligned: aBoolean [ isAligned := aBoolean ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> setUp [ super setUp. @@ -62,7 +60,7 @@ VMTrampolineTest >> setUp [ ] ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ | inc baseMethod baseMethodIP ctx page | @@ -125,7 +123,7 @@ VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ equals: (memory integerObjectOf: 3) ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testDetectFrameNotPointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -140,7 +138,7 @@ VMTrampolineTest >> testDetectFrameNotPointerInUse [ self deny: cogit isCFramePointerInUse ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testDetectFramePointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -155,7 +153,7 @@ VMTrampolineTest >> testDetectFramePointerInUse [ self assert: cogit isCFramePointerInUse ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -173,7 +171,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self assert: self framePointerRegisterValue equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -191,7 +189,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self assert: machineSimulator smalltalkStackPointerRegisterValue equals: 17 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ | initialStackPointer | @@ -209,7 +207,7 @@ VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue equals: initialStackPointer ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDereferenceSelectorRoutine [ | dereferenceRoutine previousLinkRegister trampoline | @@ -240,7 +238,7 @@ VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDeref self assert: self interpreter stackTop equals: previousLinkRegister ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -254,7 +252,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self assert: machineSimulator framePointerRegisterValue equals: 888 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -268,7 +266,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self assert: machineSimulator stackPointerRegisterValue equals: 777 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ cogit backend hasLinkRegister ifFalse: [ ^ self skip ]. @@ -284,7 +282,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ self assert: self interpreter stackTop equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -301,7 +299,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePoint self assert: self interpreter framePointer equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -318,7 +316,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPoint self assert: self interpreter stackPointer equals: 42 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ "Some architectures such as ARMv8 require that the SP is always aligned to some value even in between calls. @@ -331,7 +329,7 @@ VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue \\ cogit stackPointerAlignment equals: 0 ] -{ #category : 'tests' } +{ #category : #tests } VMTrampolineTest >> testStoreRegistersPushesValuesToStack [ | initialStackPointer actualPushedBytes | diff --git a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st index 1951d51644..9827cf8874 100644 --- a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st @@ -1,15 +1,13 @@ Class { - #name : 'VMX64InstructionTest', - #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #name : #VMX64InstructionTest, + #superclass : #VMSimpleStackBasedCogitAbstractTest, #pools : [ 'CogRTLOpcodes' ], - #category : 'VMMakerTests-JitTests', - #package : 'VMMakerTests', - #tag : 'JitTests' + #category : #'VMMakerTests-JitTests' } -{ #category : 'building suites' } +{ #category : #'building suites' } VMX64InstructionTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -17,13 +15,13 @@ VMX64InstructionTest class >> wordSizeParameters [ yourself ] -{ #category : 'configuration' } +{ #category : #configuration } VMX64InstructionTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ | mem | @@ -47,7 +45,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ | mem | @@ -72,7 +70,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testDupSRVr [ @@ -88,7 +86,7 @@ VMX64InstructionTest >> testDupSRVr [ ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFaddSRvRvRv [ | result | @@ -107,7 +105,7 @@ VMX64InstructionTest >> testFaddSRvRvRv [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ | result | @@ -126,7 +124,7 @@ VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFsubSRvRvRv [ | result | @@ -145,7 +143,7 @@ VMX64InstructionTest >> testFsubSRvRvRv [ self assert: (result doubleAt: 9) equals: -1.0. ] -{ #category : 'tests' } +{ #category : #tests } VMX64InstructionTest >> testFsubSRvRvRvWithThreeDifferentRegisters [ | result | diff --git a/smalltalksrc/VMMakerTests/package.st b/smalltalksrc/VMMakerTests/package.st index 285bf148e9..328d153d5f 100644 --- a/smalltalksrc/VMMakerTests/package.st +++ b/smalltalksrc/VMMakerTests/package.st @@ -1 +1 @@ -Package { #name : 'VMMakerTests' } +Package { #name : #VMMakerTests } From 0f4b7baed71d0ed31c332349e56aab0d1cec79a9 Mon Sep 17 00:00:00 2001 From: jordanmontt Date: Tue, 24 Sep 2024 16:06:20 +0200 Subject: [PATCH 11/11] Revert "Added comment to see if the vm builds" This reverts commit f4a5ab727d419f4b343631181149819febd765bf. --- smalltalksrc/VMMakerTests/Array.extension.st | 6 +- .../VMMakerTests/ByteSymbol.extension.st | 6 +- .../VMMakerTests/Character.extension.st | 6 +- smalltalksrc/VMMakerTests/Cogit.extension.st | 12 +- .../VMMakerTests/CompiledBlock.extension.st | 4 +- .../VMMakerTests/DummyProcessor.class.st | 56 +- .../VMMakerTests/ExitInterpreter.class.st | 9 +- .../VMMakerTests/LiteralVariable.extension.st | 4 +- .../ManifestVMMakerTests.class.st | 14 +- .../VMMakerTests/MethodBuilderTest.class.st | 30 +- .../MockVMStructWithReservedWords.class.st | 13 +- ...ckVMStructWithoutTypeDeclarations.class.st | 9 +- .../ParametrizedTestMatrix.extension.st | 4 +- .../VMMakerTests/ProcessorSimulator.class.st | 258 +++--- .../VMMakerTests/RegisterDescriptor.class.st | 33 +- .../VMMakerTests/SmallInteger.extension.st | 4 +- .../SpurMemoryManager.extension.st | 4 +- .../VMMakerTests/StackBuilderTest.class.st | 76 +- .../StackToRegisterMappingCogit.extension.st | 4 +- .../VMMakerTests/UndefinedObject.extension.st | 4 +- .../UnicornARMv5Simulator.class.st | 136 ++-- .../UnicornARMv8Simulator.class.st | 212 ++--- .../UnicornI386Simulator.class.st | 106 +-- .../UnicornInvalidMemoryAccess.class.st | 28 +- .../VMMakerTests/UnicornProcessor.class.st | 160 ++-- .../UnicornRISCVSimulator.class.st | 264 +++---- .../UnicornRegisterDescriptor.class.st | 30 +- .../UnicornSimulationTrap.class.st | 26 +- .../VMMakerTests/UnicornSimulator.class.st | 28 +- .../VMMakerTests/UnicornTimeout.class.st | 12 +- .../VMMakerTests/UnicornX64Simulator.class.st | 162 ++-- .../VMARMStackAlignmentTest.class.st | 24 +- .../VMARMV8SIMDEncodingTest.class.st | 38 +- .../VMARMV8SpecificEncodingTest.class.st | 72 +- .../VMMakerTests/VMAbstractBuilder.class.st | 18 +- .../VMMakerTests/VMAbstractFFITest.class.st | 23 +- .../VMAbstractImageFormatTest.class.st | 22 +- .../VMAbstractPrimitiveTest.class.st | 19 +- .../VMMakerTests/VMBlockTest.class.st | 40 +- .../VMMakerTests/VMByteCodesTest.class.st | 136 ++-- .../VMMakerTests/VMBytecodeMethod.class.st | 32 +- .../VMCodeCompactionTest.class.st | 38 +- .../VMMakerTests/VMCogitHelpersTest.class.st | 28 +- .../VMCompiledCodeBuilder.class.st | 72 +- smalltalksrc/VMMakerTests/VMContext.class.st | 28 +- .../VMMakerTests/VMContextAccessTest.class.st | 22 +- .../VMDivisionInstructionTest.class.st | 28 +- .../VMFFIArgumentMarshallingTest.class.st | 95 +-- .../VMMakerTests/VMFFICallbacksTest.class.st | 17 +- .../VMMakerTests/VMFFIHelpersTest.class.st | 31 +- .../VMFFIReturnMarshallingTest.class.st | 47 +- ...SameThreadArgumentMarshallingTest.class.st | 13 +- .../VMFFISameThreadCalloutTest.class.st | 11 +- ...FISameThreadReturnMarshallingTest.class.st | 11 +- ...MFFIWorkerArgumentMarshallingTest.class.st | 19 +- .../VMFFIWorkerCalloutTest.class.st | 27 +- .../VMFFIWorkerReturnMarshallingTest.class.st | 13 +- ...ForwardLiteralInMachineMethodTest.class.st | 14 +- .../VMMakerTests/VMFrameBuilder.class.st | 92 +-- .../VMImageHeaderWritingTest.class.st | 50 +- .../VMMakerTests/VMImageReadingTest.class.st | 32 +- .../VMMakerTests/VMInterpreterTests.class.st | 14 +- .../VMJITPrimitiveCallingTest.class.st | 82 +- .../VMJITVMPrimitiveTest.class.st | 20 +- .../VMJistMethodTestObject.class.st | 10 +- .../VMMakerTests/VMJitMethodTest.class.st | 32 +- .../VMJitMethodWithImmutabilityTest.class.st | 16 +- .../VMMakerTests/VMJitSimdBytecode.class.st | 26 +- .../VMJittedBoxFloatPrimitivesTest.class.st | 14 +- ...ittedByteArrayAccessPrimitiveTest.class.st | 112 +-- ...xternalAddressAccessPrimitiveTest.class.st | 12 +- .../VMJittedGeneralPrimitiveTest.class.st | 312 ++++---- .../VMMakerTests/VMJittedLookupTest.class.st | 22 +- .../VMJittedPrimitiveAtPutTest.class.st | 14 +- .../VMJittedPrimitiveAtTest.class.st | 74 +- .../VMJittedPrimitiveSizeTest.class.st | 32 +- .../VMJittedPrimitivesTest.class.st | 20 +- .../VMJittedSmallFloatPrimitiveTest.class.st | 52 +- .../VMMakerTests/VMLiterRulesTest.class.st | 13 +- .../VMMakerTests/VMLookUpTest.class.st | 62 +- .../VMMASTTranslationTest.class.st | 87 ++- .../VMMachineCodeFrameBuilderForTest.class.st | 41 +- .../VMMakerTests/VMMachineCodeMethod.class.st | 20 +- .../VMMachineSimulatorTest.class.st | 42 +- .../VMMakerTests/VMMockCodeGenerator.class.st | 26 +- ...MObjectAccessorIdentificationTest.class.st | 10 +- .../VMMakerTests/VMObjectLayoutTests.class.st | 60 +- .../VMMakerTests/VMObjectStackTest.class.st | 38 +- .../VMPermanentSpaceImageReadingTest.class.st | 14 +- .../VMPermanentSpaceMemoryTest.class.st | 90 +-- .../VMPermanentSpacePrimitiveTest.class.st | 30 +- .../VMMakerTests/VMPinnedObjectTest.class.st | 36 +- .../VMPrimitiveCallAbstractTest.class.st | 44 +- .../VMPrimitiveCallingTest.class.st | 16 +- .../VMMakerTests/VMPrimitiveTest.class.st | 738 +++++++++--------- .../VMPushThisContextRoutineTest.class.st | 32 +- .../VMSegmentsImageFormatTest.class.st | 18 +- ...lectorIndexDereferenceRoutineTest.class.st | 16 +- .../VMMakerTests/VMSessionIdTest.class.st | 10 +- ...SimpleStackBasedCogitAbstractTest.class.st | 164 ++-- ...SimpleStackBasedCogitBytecodeTest.class.st | 312 ++++---- ...impleStackBasedCogitCoggedMethods.class.st | 16 +- ...StackBasedCogitMegamorphicPICTest.class.st | 40 +- ...StackBasedCogitMonomorphicPICTest.class.st | 14 +- ...StackBasedCogitPolymorphicPICTest.class.st | 52 +- ...eStackBasedCogitRememberedSetTest.class.st | 20 +- .../VMSimulatedEnvironmentBuilder.class.st | 50 +- .../VMMakerTests/VMSimulationTest.class.st | 12 +- .../VMSistaSuperSendsTest.class.st | 12 +- .../VMSistaTrampolineTest.class.st | 12 +- .../VMSnapshotPrimitiveTest.class.st | 20 +- .../VMSpecialSendArithmethicTest.class.st | 80 +- .../VMSpurInitializedOldSpaceTest.class.st | 48 +- .../VMSpurMemoryManagerTest.class.st | 150 ++-- .../VMSpurNewSpaceStructureTest.class.st | 46 +- .../VMSpurObjectAllocationTest.class.st | 12 +- .../VMSpurOldSpaceBootstrapTest.class.st | 20 +- ...MSpurOldSpaceGarbageCollectorTest.class.st | 88 ++- .../VMSpurOldSpaceStructureTest.class.st | 14 +- .../VMMakerTests/VMSpurOldSpaceTest.class.st | 140 ++-- .../VMSpurRememberedSetTest.class.st | 46 +- .../VMSpurScavengeEphemeronTest.class.st | 54 +- .../VMSpurScavengeWeakTest.class.st | 18 +- .../VMMakerTests/VMSpurScavengerTest.class.st | 96 +-- ...llocationStrategyForLargeTreeTest.class.st | 56 +- ...llocationStrategyForSmallTreeTest.class.st | 76 +- ...purTreeAllocationWithBigNodesTest.class.st | 20 +- .../VMMakerTests/VMStackBuilder.class.st | 54 +- .../VMMakerTests/VMStackFrame.class.st | 50 +- .../VMStackInterpreterTest.class.st | 18 +- .../VMMakerTests/VMStackMappingTest.class.st | 38 +- ...VMStackToRegisterMappingCogitTest.class.st | 48 +- .../VMStackToRegisterMappingTest.class.st | 34 +- .../VMMakerTests/VMStorePopTest.class.st | 14 +- .../VMTestMockInterpreter.class.st | 23 +- .../VMMakerTests/VMTrampolineTest.class.st | 46 +- .../VMX64InstructionTest.class.st | 26 +- smalltalksrc/VMMakerTests/package.st | 2 +- 138 files changed, 3706 insertions(+), 3474 deletions(-) diff --git a/smalltalksrc/VMMakerTests/Array.extension.st b/smalltalksrc/VMMakerTests/Array.extension.st index ef74d1b24b..a4a387884a 100644 --- a/smalltalksrc/VMMakerTests/Array.extension.st +++ b/smalltalksrc/VMMakerTests/Array.extension.st @@ -1,13 +1,13 @@ -Extension { #name : #Array } +Extension { #name : 'Array' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Array >> forMemory: aMemory inMethod: anObject [ ^ aMemory newArrayWith: (self collect: [ :anElement | anElement forMemory: aMemory inMethod: nil ]) ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Array >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st index e9a6595a9d..3fde704597 100644 --- a/smalltalksrc/VMMakerTests/ByteSymbol.extension.st +++ b/smalltalksrc/VMMakerTests/ByteSymbol.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ByteSymbol } +Extension { #name : 'ByteSymbol' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ByteSymbol >> forMemory: aMemory inMethod: anObject [ | vmString instSpec numSlots | @@ -27,7 +27,7 @@ ByteSymbol >> forMemory: aMemory inMethod: anObject [ ^ vmString ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ByteSymbol >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Character.extension.st b/smalltalksrc/VMMakerTests/Character.extension.st index 26f22ec3fe..79a30d41b3 100644 --- a/smalltalksrc/VMMakerTests/Character.extension.st +++ b/smalltalksrc/VMMakerTests/Character.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #Character } +Extension { #name : 'Character' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Character >> forMemory: memory [ ^ memory characterObjectOf: self codePoint ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Character >> forMethodBuilder: aBuilder [ ^ self forMemory: aBuilder memory diff --git a/smalltalksrc/VMMakerTests/Cogit.extension.st b/smalltalksrc/VMMakerTests/Cogit.extension.st index 3b587c4699..c8d411581d 100644 --- a/smalltalksrc/VMMakerTests/Cogit.extension.st +++ b/smalltalksrc/VMMakerTests/Cogit.extension.st @@ -1,28 +1,28 @@ -Extension { #name : #Cogit } +Extension { #name : 'Cogit' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> byte0: anInteger [ byte0 := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> inBlock: anInteger [ inBlock := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> methodOrBlockNumArgs: anInteger [ methodOrBlockNumArgs := anInteger ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> needsFrame [ ^ true ] -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } Cogit >> needsFrame: aFalse [ needsFrame := aFalse ] diff --git a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st index 436740ae7f..87094e4db8 100644 --- a/smalltalksrc/VMMakerTests/CompiledBlock.extension.st +++ b/smalltalksrc/VMMakerTests/CompiledBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #CompiledBlock } +Extension { #name : 'CompiledBlock' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } CompiledBlock >> forMemory: memory inMethod: aMethodBuilder [ | methodBuilder | diff --git a/smalltalksrc/VMMakerTests/DummyProcessor.class.st b/smalltalksrc/VMMakerTests/DummyProcessor.class.st index 7779177d07..3c4e14ea5a 100644 --- a/smalltalksrc/VMMakerTests/DummyProcessor.class.st +++ b/smalltalksrc/VMMakerTests/DummyProcessor.class.st @@ -1,6 +1,6 @@ Class { - #name : #DummyProcessor, - #superclass : #Object, + #name : 'DummyProcessor', + #superclass : 'Object', #instVars : [ 'stackPointer', 'framePointer', @@ -10,149 +10,151 @@ Class { 'linkRegisterValue', 'receiverRegisterValue' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> baseRegisterValue: anInteger [ baseRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> cResultRegister [ ^ nil ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> disassembler [ ^ LLVMDisassembler aarch64 ] -{ #category : #operations } +{ #category : 'operations' } DummyProcessor >> flushICacheFrom: anInteger to: anInteger2 [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> fp [ ^ framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> fp: anInteger [ framePointer := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> framePointerRegisterValue: anInteger [ framePointer := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> hasLinkRegister [ ^ true ] -{ #category : #initialization } +{ #category : 'initialization' } DummyProcessor >> initializeStackFor: aSimpleStackBasedCogit [ "We are dummy...." ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> instructionPointerRegisterValue [ ^ programCounter ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> integerRegisterState [ ^ #() ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> linkRegisterValue: anInteger [ linkRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> machineSimulator [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> memoryAt: anInteger write: aCollection size: anInteger3 [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> pc [ ^ programCounter ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> pc: anInteger [ programCounter := anInteger ] -{ #category : #operations } +{ #category : 'operations' } DummyProcessor >> pushWord: anInteger [ stackPointer := stackPointer - 8 ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> receiverRegisterValue: anInteger [ receiverRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> runUntil: anInteger [ programCounter := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> setFramePointer: aFPValue stackPointer: aSPValue [ stackPointer := aSPValue. framePointer := aFPValue ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> simulateLeafCallOf: anInteger nextpc: anInteger2 memory: anUndefinedObject [ ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> smalltalkStackPointerRegisterValue [ ^ smalltalkStackPointerRegisterValue ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> smalltalkStackPointerRegisterValue: anInteger [ smalltalkStackPointerRegisterValue := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } DummyProcessor >> sp [ ^ stackPointer diff --git a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st index 86c280b059..4aff38ec53 100644 --- a/smalltalksrc/VMMakerTests/ExitInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/ExitInterpreter.class.st @@ -1,13 +1,14 @@ Class { - #name : #ExitInterpreter, - #superclass : #Error, + #name : 'ExitInterpreter', + #superclass : 'Error', #instVars : [ 'returnValue' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } ExitInterpreter >> returnValue: anInteger [ returnValue := anInteger diff --git a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st index 6579fb7e3b..02d3f47f5a 100644 --- a/smalltalksrc/VMMakerTests/LiteralVariable.extension.st +++ b/smalltalksrc/VMMakerTests/LiteralVariable.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #LiteralVariable } +Extension { #name : 'LiteralVariable' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } LiteralVariable >> forMemory: aMemory inMethod: anObject [ | aVariable | diff --git a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st index 84a27ad5d5..267b338feb 100644 --- a/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st +++ b/smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st @@ -2,26 +2,28 @@ I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser " Class { - #name : #ManifestVMMakerTests, - #superclass : #PackageManifest, - #category : #'VMMakerTests-Manifest' + #name : 'ManifestVMMakerTests', + #superclass : 'PackageManifest', + #category : 'VMMakerTests-Manifest', + #package : 'VMMakerTests', + #tag : 'Manifest' } -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> ruleBadMessageRule2V1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#UnicornARMv8Simulator #smashCallerSavedRegistersWithValuesFrom:by:in: #false)) #'2023-05-12T09:19:16.384586+02:00') #(#(#RGMethodDefinition #(#UnicornARMv8Simulator #postCallArgumentsNumArgs:in: #false)) #'2023-05-12T09:20:41.357283+02:00') #(#(#RGMethodDefinition #(#ProcessorSimulator #smashRegistersWithValuesFrom:by: #false)) #'2023-05-12T09:25:17.137958+02:00') ) ] -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> rulePrecedenceRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2023-05-12T09:19:42.605517+02:00') ) ] -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestVMMakerTests class >> ruleUncommonMessageSendRuleV1FalsePositive [ ^ #(#(#(#RGPackageDefinition #(#VMMakerTests)) #'2020-07-24T12:05:44.86595+02:00') ) ] diff --git a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st index fada9181db..882ae1c75a 100644 --- a/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/MethodBuilderTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #MethodBuilderTest, - #superclass : #VMInterpreterTests, + #name : 'MethodBuilderTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'literals', 'numberOfArguments', @@ -11,17 +11,19 @@ Class { 'methodHeader', 'method' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testAddingBytecodesDoesntOverrideHeader [ method := methodBuilder newMethod buildMethod. self assert: methodBuilder buildMethodHeader equals: (memory integerValueOf: (memory fetchPointer: 0 ofObject: method)). ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ method := methodBuilder newMethod; buildMethod. @@ -33,14 +35,14 @@ MethodBuilderTest >> testAllocatingMethodDoesntOverflows [ self shouldnt:[ methodBuilder newMethod; buildMethod ] raise: AssertionFailure ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBuildEmptyMethodIsCompiledMethod [ "checking the format" method := methodBuilder newMethod; buildMethod. self assert: (memory isCompiledMethod: method) ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ | bytecodeAddress | literals := { }. @@ -54,7 +56,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithNoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | @@ -69,7 +71,7 @@ MethodBuilderTest >> testBytecodeAtForMethodWithOneLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ | bytecodeAddress | @@ -84,13 +86,13 @@ MethodBuilderTest >> testBytecodeAtForMethodWithTwoLiteral [ self assert: (memory byteAt: bytecodeAddress) equals: 1 ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testClassOfCompiledMethodIsCompiledMethod [ self assert: (memory fetchClassOf: methodBuilder newMethod buildMethod) equals: (memory splObj: 16). ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testGeneratingCompiledMethod [ method := methodBuilder newMethod @@ -99,7 +101,7 @@ MethodBuilderTest >> testGeneratingCompiledMethod [ self assert: (memory isCompiledMethod: method) ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ | numberOfByteCode | @@ -114,7 +116,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeOneSlotForEightBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ | numberOfByteCode | @@ -129,7 +131,7 @@ MethodBuilderTest >> testInstanciateMethodShouldTakeTwoSlotForNineBytecodes [ equals: 1 + (numberOfByteCode / wordSize) ceiling ] -{ #category : #running } +{ #category : 'running' } MethodBuilderTest >> testSecondBytecodeAtForMethodWithOneLiteral [ | bytecodeAddress | diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st index 92814927f5..1ffa0754bb 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithReservedWords.class.st @@ -1,27 +1,28 @@ Class { - #name : #MockVMStructWithReservedWords, - #superclass : #VMStructType, + #name : 'MockVMStructWithReservedWords', + #superclass : 'VMStructType', #instVars : [ 'foo', 'case' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #enumerating } +{ #category : 'enumerating' } MockVMStructWithReservedWords class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ aBinaryBlock value: 'foo' value: 'char *'. aBinaryBlock value: 'case' value: 'char *' ] -{ #category : #accessing } +{ #category : 'accessing' } MockVMStructWithReservedWords >> case [ ^ case ] -{ #category : #accessing } +{ #category : 'accessing' } MockVMStructWithReservedWords >> case: anObject [ case := anObject diff --git a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st index 15627d4255..077e789b01 100644 --- a/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st +++ b/smalltalksrc/VMMakerTests/MockVMStructWithoutTypeDeclarations.class.st @@ -1,14 +1,15 @@ Class { - #name : #MockVMStructWithoutTypeDeclarations, - #superclass : #VMStructType, + #name : 'MockVMStructWithoutTypeDeclarations', + #superclass : 'VMStructType', #instVars : [ 'foo', 'bar' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #enumerating } +{ #category : 'enumerating' } MockVMStructWithoutTypeDeclarations class >> instVarNamesAndTypesForTranslationDo: aBinaryBlock [ "Missing the bar type declaration" diff --git a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st index f5910338a6..b9250409cb 100644 --- a/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st +++ b/smalltalksrc/VMMakerTests/ParametrizedTestMatrix.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ParametrizedTestMatrix } +Extension { #name : 'ParametrizedTestMatrix' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } ParametrizedTestMatrix >> + aParametrizedTestMatrix [ | newMatrix | diff --git a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st index 37e4e7c26c..a61f9c0b74 100644 --- a/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st +++ b/smalltalksrc/VMMakerTests/ProcessorSimulator.class.st @@ -1,46 +1,48 @@ Class { - #name : #ProcessorSimulator, - #superclass : #Object, + #name : 'ProcessorSimulator', + #superclass : 'Object', #instVars : [ 'simulator', 'registerAliases', 'registerSmalltalkAliases', 'memory' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> ARMv5 [ ^ UnicornARMv5Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> ARMv8 [ ^ UnicornARMv8Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> IA32 [ ^ UnicornI386Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> X64 [ ^ UnicornX64Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> aarch64 [ ^ UnicornARMv8Simulator new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> riscv64 [ "TODO: Add riscv32 and possibly two subclasses for the RISCV simulator" @@ -48,203 +50,203 @@ ProcessorSimulator class >> riscv64 [ "^ SpikeRISCVSimulator new" ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } ProcessorSimulator class >> simulatorFor: isa [ ^ (self subclasses detect: [ :each | each supportsISA: isa ]) perform: isa asSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> aliasForRegister: aRegisterName [ ^ registerAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> aliasSmalltalkForRegister: aRegisterName [ ^ registerSmalltalkAliases at: aRegisterName ifAbsent: [ '' ] ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0Register [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue [ ^ self readRegister: self arg0Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg0RegisterValue: aValue [ ^ self writeRegister: self arg0Register value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1Register [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue [ ^ self readRegister: self arg1Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> arg1RegisterValue: aValue [ ^ self writeRegister: self arg1Register value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue [ ^ self readRegister: self baseRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> baseRegisterValue: aValue [ ^ self writeRegister: self baseRegister value: aValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegister [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegisterValue [ ^ self readRegister: self cResultRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> cResultRegisterValue: aValue [ self writeRegister: self cResultRegister value: aValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg0RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg0RegisterValue [ ^ self readRegister: self carg0Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg1RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg1RegisterValue [ ^ self readRegister: self carg1Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg2RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg2RegisterValue [ ^ self readRegister: self carg2Register ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3 [ "By default fetch values from registers, override in platforms that don't (e.g. IA32)" ^ self carg3RegisterValue ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3Register [ ^ self subclassResponsibility ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } ProcessorSimulator >> carg3RegisterValue [ ^ self readRegister: self carg3Register ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue [ ^ self readRegister: self classRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> classRegisterValue: aValue [ ^ self writeRegister: self classRegister value: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> cogit [ ^ memory interpreter cogit ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleCurrentInstruction [ ^ (self disassembleFrom: self instructionPointerRegisterValue opcodes: 1) first ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ self disassembler @@ -255,7 +257,7 @@ ProcessorSimulator >> disassembleFrom: anIndex opcodes: numberOfInstructions [ pc: self instructionPointerRegisterValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembleFrom: start to: stop [ ^ self disassembler @@ -266,114 +268,114 @@ ProcessorSimulator >> disassembleFrom: start to: stop [ pc: self instructionPointerRegisterValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> disassembler [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister0Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister0 value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister1Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister1 value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2 [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value [ ^ self readFloat64Register: self doublePrecisionFloatingPointRegister2 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> doublePrecisionFloatingPointRegister2Value: aValue [ ^ self writeFloat64Register: self doublePrecisionFloatingPointRegister2 value: aValue ] -{ #category : #disassembling } +{ #category : 'disassembling' } ProcessorSimulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ ^ self subclassResponsibility ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> finishMappingMemory [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> flushICacheFrom: startAddress to: endAddress [ simulator removeInstructionCacheFrom: startAddress to: endAddress ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> fp [ ^ self framePointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> fp: aValue [ ^ self framePointerRegisterValue: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue [ ^ self readRegister: self framePointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> framePointerRegisterValue: aValue [ self writeRegister: self framePointerRegister value: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> getLastAddress: abstractInstructions [ | last | @@ -381,13 +383,13 @@ ProcessorSimulator >> getLastAddress: abstractInstructions [ ^ last address + last machineCodeSize ] -{ #category : #testing } +{ #category : 'testing' } ProcessorSimulator >> hasLinkRegister [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initialize [ super initialize. @@ -397,91 +399,91 @@ ProcessorSimulator >> initialize [ self initializeRegisterSmalltalkAliases. ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initializeRegisterAliases [ "Hook for subclasses" ] -{ #category : #initialization } +{ #category : 'initialization' } ProcessorSimulator >> initializeRegisterSmalltalkAliases [ "Hook for subclasses" ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue [ ^ self readRegister: self instructionPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> instructionPointerRegisterValue: aValue [ ^ self writeRegister: self instructionPointerRegister value: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> integerRegisterState [ ^ { } ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastExecutedInstructionAddress [ ^ simulator lastExecutedInstructionAddress ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastExecutedInstructionSize [ ^ simulator lastExecutedInstructionSize ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> lastInstructionCount [ ^ simulator lastInstructionCount ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue [ ^ self readRegister: self linkRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> linkRegisterValue: aValue [ ^ self writeRegister: self linkRegister value: aValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> lr [ ^ self linkRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> lr: aValue [ ^ self linkRegisterValue: aValue ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> mapMemory: aMemory at: anAddress [ simulator @@ -490,7 +492,7 @@ ProcessorSimulator >> mapMemory: aMemory at: anAddress [ withPermissions: UnicornConstants permissionAll. ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ aSlangMemoryManager regionsDo: [ :startAddress :region | @@ -500,42 +502,42 @@ ProcessorSimulator >> mapMemoryInManager: aSlangMemoryManager [ self finishMappingMemory. ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> memory [ ^ memory ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> memory: aSpur64BitMMLECoSimulator [ memory := aSpur64BitMMLECoSimulator ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> memoryAt: address readNext: byteSize [ ^ simulator memoryAt: address readNext: byteSize ] -{ #category : #memory } +{ #category : 'memory' } ProcessorSimulator >> memoryAt: address write: bytes size: size [ simulator memoryAt: address write: bytes size: size ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> pc [ ^ self instructionPointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> pc: aValue [ ^ self instructionPointerRegisterValue: aValue ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> peek [ | stackAddressIntegerValue peekedByteArray | @@ -549,13 +551,13 @@ ProcessorSimulator >> peek [ ^ peekedByteArray ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> peekAddress [ ^ self peek integerAt: 1 size: self wordSize signed: false ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> popBytes [ | stackAddressIntegerValue aByteArray | @@ -572,7 +574,7 @@ ProcessorSimulator >> popBytes [ ^ aByteArray ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> popWord [ | aByteArray | @@ -580,7 +582,7 @@ ProcessorSimulator >> popWord [ ^ aByteArray integerAt: 1 size: self wordSize signed: false. ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> pushBytes: aByteArray [ | stackAddressIntegerValue | @@ -601,7 +603,7 @@ ProcessorSimulator >> pushBytes: aByteArray [ ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> pushWord: anInteger [ | aByteArray | @@ -610,7 +612,7 @@ ProcessorSimulator >> pushWord: anInteger [ self pushBytes: aByteArray ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readFloat64Register: aRegisterID [ | registerValue | @@ -620,7 +622,7 @@ ProcessorSimulator >> readFloat64Register: aRegisterID [ ^ registerValue doubleAt: 1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ | registerValue | @@ -629,7 +631,7 @@ ProcessorSimulator >> readRawRegister: aRegisterID size: aSize [ ^ registerValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> readRegister: aRegisterID [ | registerValue size | @@ -638,37 +640,37 @@ ProcessorSimulator >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: size signed: false ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue [ ^ self readRegister: self receiverRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> receiverRegisterValue: anInteger [ self writeRegister: self receiverRegister value: anInteger ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> register: anIndex readInto: aByteArray [ simulator register: anIndex readInto: aByteArray ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerAliases [ ^ registerAliases ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerDescriptors [ ^ self registerList collect: [ :reg | @@ -680,98 +682,98 @@ ProcessorSimulator >> registerDescriptors [ yourself ] ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> registerList [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue [ ^ self readRegister: self sendNumberOfArgumentsRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> sendNumberOfArgumentsRegisterValue: aValue [ ^ self writeRegister: self sendNumberOfArgumentsRegister value: aValue ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegister [ "By default they are the same" ^ self stackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue [ ^ self readRegister: self smalltalkStackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smalltalkStackPointerRegisterValue: aValue [ self writeRegister: self smalltalkStackPointerRegister value: aValue ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> smashRegisterAccessors [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> smashRegistersWithValuesFrom: base by: step [ self smashRegisterAccessors withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> sp [ ^ self stackPointerRegisterValue ] -{ #category : #'accessing-registers-shortcuts' } +{ #category : 'accessing-registers-shortcuts' } ProcessorSimulator >> sp: aValue [ ^ self stackPointerRegisterValue: aValue ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegister [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue [ ^ self readRegister: self stackPointerRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> stackPointerRegisterValue: aValue [ self writeRegister: self stackPointerRegister value: aValue ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> stackValueAt: anInteger [ "Get a value from the stack at a 0-base position" @@ -780,7 +782,7 @@ ProcessorSimulator >> stackValueAt: anInteger [ ^ aByteArray integerAt: 1 size: self wordSize signed: false ] -{ #category : #'accessing-stack' } +{ #category : 'accessing-stack' } ProcessorSimulator >> stackValueBytesAt: position [ "Get the bytes from the stack at a 0-base position" @@ -798,7 +800,7 @@ ProcessorSimulator >> stackValueBytesAt: position [ ^ aByteArray ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> stackValues [ | initialValue | @@ -809,14 +811,14 @@ ProcessorSimulator >> stackValues [ ] ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> startAt: begin until: until timeout: timeout count: count [ self subclassResponsibility ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } ProcessorSimulator >> step [ self @@ -826,36 +828,36 @@ ProcessorSimulator >> step [ count: 1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegister [ ^ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue [ ^ self readRegister: self temporaryRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> temporaryRegisterValue: anInteger [ ^ self writeRegister: self temporaryRegister value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> wordAt: anInteger [ ^ memory longAt: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } ProcessorSimulator >> wordSize [ self subclassResponsibility ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ | value | @@ -865,7 +867,7 @@ ProcessorSimulator >> writeFloat64Register: aRegister value: aDouble [ ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } ProcessorSimulator >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st index 7f3419228e..f4b6a25c2b 100644 --- a/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/RegisterDescriptor.class.st @@ -1,49 +1,50 @@ Class { - #name : #RegisterDescriptor, - #superclass : #Object, + #name : 'RegisterDescriptor', + #superclass : 'Object', #instVars : [ 'simulator', 'name', 'alias', 'smalltalkAlias' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> alias [ ^ alias ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -53,35 +54,35 @@ RegisterDescriptor >> printOn: aStream [ ] -{ #category : #actions } +{ #category : 'actions' } RegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> smalltalkAlias [ ^ smalltalkAlias ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> smalltalkAlias: aString [ smalltalkAlias := aString ] -{ #category : #accessing } +{ #category : 'accessing' } RegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/SmallInteger.extension.st b/smalltalksrc/VMMakerTests/SmallInteger.extension.st index f6dcb4fca2..d5f6ef6f2a 100644 --- a/smalltalksrc/VMMakerTests/SmallInteger.extension.st +++ b/smalltalksrc/VMMakerTests/SmallInteger.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SmallInteger } +Extension { #name : 'SmallInteger' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } SmallInteger >> forMemory: aMemory inMethod: anObject [ (self > aMemory maxSmallInteger or: [ self < aMemory minSmallInteger ]) ifTrue: [ self halt ]. diff --git a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st index e75c5e91a4..b5d4de558f 100644 --- a/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st +++ b/smalltalksrc/VMMakerTests/SpurMemoryManager.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SpurMemoryManager } +Extension { #name : 'SpurMemoryManager' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } SpurMemoryManager >> hiddenRootsObject: anInteger [ hiddenRootsObj := anInteger diff --git a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st index 8fce0dcfbe..aec69a0f71 100644 --- a/smalltalksrc/VMMakerTests/StackBuilderTest.class.st +++ b/smalltalksrc/VMMakerTests/StackBuilderTest.class.st @@ -15,8 +15,8 @@ temp2 method " Class { - #name : #StackBuilderTest, - #superclass : #VMInterpreterTests, + #name : 'StackBuilderTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'stackElement1', 'stackElement2', @@ -32,10 +32,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> addFullFrame [ | frame | @@ -69,78 +71,78 @@ StackBuilderTest >> addFullFrame [ ^ frame ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument1 [ ^ self offsetArgument2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument1FromBaseFP [ ^ self offsetArgument2FromBaseFP + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument2 [ "we skip the frame pointer" ^ self offsetMethod + 2 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetArgument2FromBaseFP [ ^ 2 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetCallerFP [ ^ self offsetMethod + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetContext [ ^ self offsetFlags + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetFlags [ ^ self offsetReceiver + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetInstructionPointer [ ^ 0 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetMethod [ ^ self offsetContext + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetReceiver [ ^ self offsetTemp1 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetStackElement1 [ ^ self offsetStackElement2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetStackElement2 [ ^ self offsetInstructionPointer + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetTemp1 [ ^ self offsetTemp2 + 1 ] -{ #category : #offset } +{ #category : 'offset' } StackBuilderTest >> offsetTemp2 [ ^ self offsetStackElement1 + 1 ] -{ #category : #running } +{ #category : 'running' } StackBuilderTest >> setUp [ super setUp. @@ -155,14 +157,14 @@ StackBuilderTest >> setUp [ ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testCallerFrameOfTopFrameShouldBeSecondFrameBuilderObject [ "For debug purpose, we added a link to the caller frame in the current frame." self assert: (stackBuilder topFrame callerFrame) equals: (stackBuilder frames nextToLast) ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -170,7 +172,7 @@ StackBuilderTest >> testCallerInstructionPointerIsPushedInStack [ equals: stackBuilder frames second instructionPointer. ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ | frame | @@ -185,7 +187,7 @@ StackBuilderTest >> testFrameHasMoreArgumentsThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ | frame | @@ -200,7 +202,7 @@ StackBuilderTest >> testFrameHasMoreTemporariesThanMethodShouldFail [ self should: [ stackBuilder buildStack ] raise: Error ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ "We have 3 frames. The caller of the caller of the top frame is the first one, which is the base" @@ -208,7 +210,7 @@ StackBuilderTest >> testHeadFramePointerCallerCallerIsBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ "We have 3 frames. The caller of the top frame should be the middle one" @@ -216,7 +218,7 @@ StackBuilderTest >> testHeadFramePointerCallerIsNotBaseFramePointer [ equals: stackBuilder page baseFP ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPushed [ method := methodBuilder newMethod buildMethod. @@ -228,7 +230,7 @@ StackBuilderTest >> testInstructionPointerIsSetBeforeFirstBytecodeOfLastMethodPu equals: (methodBuilder bytecodeAt: 0 forMethod: method) ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ | frame argNum | @@ -247,7 +249,7 @@ StackBuilderTest >> testMethodHasMoreArgumentsThanFrameShouldUpdateFrame [ self assert: frame argumentSize equals: argNum ] -{ #category : #'test-setFromMethod' } +{ #category : 'test-setFromMethod' } StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ | frame tempNum | @@ -268,37 +270,37 @@ StackBuilderTest >> testMethodHasMoreTemporariesThanFrameShouldUpdateFrame [ equals: (OrderedCollection new: tempNum withAll: memory nilObject) ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderArgument1InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument1FromBaseFP * memory bytesPerOop)) equals: argument1 ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderArgument2InBaseFrame [ self assert: (interpreter stackPages unsignedLongAt: interpreter stackPage baseFP + (self offsetArgument2FromBaseFP * memory bytesPerOop)) equals: argument2 ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderContext [ self assert: (interpreter stackValue: self offsetContext) equals: context ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderMethod [ self assert: (interpreter stackValue: self offsetMethod) equals: method ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderReceiver [ self assert: (interpreter stackValue: self offsetReceiver) equals: receiver ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderStackElementIsReversed [ self assert: (interpreter stackValue: self offsetStackElement1) equals: stackElement1. @@ -306,7 +308,7 @@ StackBuilderTest >> testOrderStackElementIsReversed [ equals: stackElement2. ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ "When a process is suspended, the Instruction Pointer is pushed on the stack of the frame. It should be the last thing pushed, and therefore, be at the top. " @@ -314,7 +316,7 @@ StackBuilderTest >> testOrderStackTopOfSuspendedProcessIsInstructionPointer [ equals: instructionPointer. ] -{ #category : #'test-order' } +{ #category : 'test-order' } StackBuilderTest >> testOrderTempIsReversed [ self assert: (interpreter stackValue: self offsetTemp1) equals: temp1. @@ -322,7 +324,7 @@ StackBuilderTest >> testOrderTempIsReversed [ equals: temp2. ] -{ #category : #'test-VMstate' } +{ #category : 'test-VMstate' } StackBuilderTest >> testPageHeadFPIsLastFrameFP [ "The FramePointer of the interpreter should be the FramePointer of the current process last pushed frame." self assert: interpreter framePointer diff --git a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st index 1ad516b356..f2768e954f 100644 --- a/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st +++ b/smalltalksrc/VMMakerTests/StackToRegisterMappingCogit.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #StackToRegisterMappingCogit } +Extension { #name : 'StackToRegisterMappingCogit' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } StackToRegisterMappingCogit >> methodOrBlockNumTemps: anInteger [ methodOrBlockNumTemps := anInteger diff --git a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st index bbe289597b..6d460c8943 100644 --- a/smalltalksrc/VMMakerTests/UndefinedObject.extension.st +++ b/smalltalksrc/VMMakerTests/UndefinedObject.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #UndefinedObject } +Extension { #name : 'UndefinedObject' } -{ #category : #'*VMMakerTests' } +{ #category : '*VMMakerTests' } UndefinedObject >> forMemory: aMemory inMethod: anObject [ ^ aMemory nilObject diff --git a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st index f2ff996e16..386b5360a0 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv5Simulator.class.st @@ -1,64 +1,66 @@ Class { - #name : #UnicornARMv5Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornARMv5Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> arg0Register [ ^ UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> arg1Register [ ^ UcARMRegisters r4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> baseRegister [ ^ UcARMRegisters r10 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> cResultRegister [ ^ UcARMRegisters r0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg0Register [ ^ UcARMRegisters r0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg1Register [ ^ UcARMRegisters r1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg2Register [ ^ UcARMRegisters r2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv5Simulator >> carg3Register [ ^ UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> classRegister [ ^ UcARMRegisters r8 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ anInteger < 0 ifFalse: [ ^ anInteger ]. @@ -66,7 +68,7 @@ UnicornARMv5Simulator >> convertIntegerToInternal: anInteger [ ^ 16rFFFFFFFF - anInteger abs + 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ (aTwoComplementNumber bitAnd: 1 << 31) = 0 ifTrue: [ @@ -75,7 +77,7 @@ UnicornARMv5Simulator >> convertInternalToInteger: aTwoComplementNumber [ ^ aTwoComplementNumber - 16rFFFFFFFF - 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> createUnicorn [ "Enable Floating Point... @@ -112,13 +114,13 @@ UnicornARMv5Simulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv5Simulator >> disassembler [ ^ LLVMARMDisassembler armv7 ] -{ #category : #executing } +{ #category : 'executing' } UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | actualCount result error startTime remainingTimeout currentTime | @@ -174,25 +176,25 @@ UnicornARMv5Simulator >> doStartAt: startAddress until: until timeout: timeout c self instructionPointerRegisterValue = until ifTrue: [ ^ result ]] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARMRegisters d0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARMRegisters d1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARMRegisters d2 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -203,42 +205,42 @@ UnicornARMv5Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> framePointerRegister [ ^ UcARMRegisters fp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornARMv5Simulator >> hasLinkRegister [ ^ true ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> instructionPointerRegister [ ^ UcARMRegisters pc ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> integerRegisterState [ ^ #() ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> linkRegister [ ^ UcARMRegisters lr ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -253,177 +255,177 @@ UnicornARMv5Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r0 [ ^ self readRegister: UcARMRegisters r0 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r0: anInteger [ ^ self writeRegister: UcARMRegisters r0 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r1 [ ^ self readRegister: UcARMRegisters r1 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r10 [ ^ self readRegister: UcARMRegisters r10 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r10: anInteger [ ^ self writeRegister: UcARMRegisters r10 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r11: anInteger [ ^ self writeRegister: UcARMRegisters r11 value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> r12 [ ^ self readRegister: UcARMRegisters r12 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r12: anInteger [ self writeRegister: UcARMRegisters r12 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r1: anInteger [ ^ self writeRegister: UcARMRegisters r1 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r2 [ ^ self readRegister: UcARMRegisters r2 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r2: anInteger [ ^ self writeRegister: UcARMRegisters r2 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r3 [ ^ self readRegister: UcARMRegisters r3 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r3: anInteger [ ^ self writeRegister: UcARMRegisters r3 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r4 [ ^ self readRegister: UcARMRegisters r4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r4: anInteger [ ^ self writeRegister: UcARMRegisters r4 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r5 [ ^ self readRegister: UcARMRegisters r5 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r5: anInteger [ ^ self writeRegister: UcARMRegisters r5 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r6 [ ^ self readRegister: UcARMRegisters r6 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r6: anInteger [ ^ self writeRegister: UcARMRegisters r6 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r7 [ ^ self readRegister: UcARMRegisters r7 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r7: anInteger [ ^ self writeRegister: UcARMRegisters r7 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r8 [ ^ self readRegister: UcARMRegisters r8 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r8: anInteger [ ^ self writeRegister: UcARMRegisters r8 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r9 [ ^ self readRegister: UcARMRegisters r9 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> r9: anInteger [ ^ self writeRegister: UcARMRegisters r9 value: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> receiverRegister [ ^ UcARMRegisters r5 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> registerList [ ^ #(lr pc sp fp r0 r1 r2 r3 r4 r5 r6 r7 r8 r9) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> registerStateGetters [ ^#(r0 r1 r2 r3 r4) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> retpcIn: aMemory [ "The return address is on the stack, having been pushed by either simulateCallOf:nextpc:memory: or simulateJumpCallOf:memory:" ^memory longAt: self fp + 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> sendNumberOfArgumentsRegister [ ^ UcARMRegisters r6 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -438,40 +440,40 @@ UnicornARMv5Simulator >> simulateJumpCallOf: address memory: aMemory [ self pc: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self fp: self popWord. self pc: self popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornARMv5Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(r0: r1: r2: r3: r9: r12: lr:) withIndexDo: [:accessor :index| self perform: accessor with: index - 1 * step + base] ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> smashRegisterAccessors [ ^ #(r0: r1: r2: r3:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> stackPointerRegister [ ^ UcARMRegisters sp ] -{ #category : #executing } +{ #category : 'executing' } UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: count [ begin == until ifTrue: [ ^ self ]. @@ -479,13 +481,13 @@ UnicornARMv5Simulator >> startAt: begin until: until timeout: timeout count: cou ] -{ #category : #registers } +{ #category : 'registers' } UnicornARMv5Simulator >> temporaryRegister [ ^ UcARMRegisters r2 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv5Simulator >> wordSize [ ^ 4 ] diff --git a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st index bdda0e9ccd..50b83cf1f2 100644 --- a/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornARMv8Simulator.class.st @@ -1,94 +1,96 @@ Class { - #name : #UnicornARMv8Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornARMv8Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg0Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg1Register [ ^ UcARM64Registers x1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg2Register [ ^ UcARM64Registers x2 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> arg3Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> baseRegister [ ^ UcARM64Registers x24 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> cResultRegister [ ^ UcARM64Registers x0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg0Register [ ^ UcARM64Registers x0 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg1Register [ ^ UcARM64Registers x1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg2Register [ ^ UcARM64Registers x2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornARMv8Simulator >> carg3Register [ ^ UcARM64Registers x3 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> carry [ ^ (self nzcv bitAnd: (1<<29))~= 0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> classRegister [ ^ UcARM64Registers x22 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1 [ ^ self readRegister: UcARM64Registers cpacr_el1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> cpacr_el1: anInteger [ self writeRegister: UcARM64Registers cpacr_el1 value: anInteger ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornARMv8Simulator >> createUnicorn [ simulator := Unicorn arm64. @@ -97,31 +99,31 @@ UnicornARMv8Simulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv8Simulator >> disassembler [ ^ LLVMARMDisassembler aarch64 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcARM64Registers d0 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcARM64Registers d1 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcARM64Registers d2 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ "In ARM, instructions are usually encoded asSpotterCandidateLink @@ -132,24 +134,24 @@ UnicornARMv8Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstructio ^ (aLLVMInstruction assemblyCodeString substrings: String tab, ',') second trimBoth. ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> framePointerRegister [ ^ UcARM64Registers fp ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornARMv8Simulator >> hasLinkRegister [ ^ true ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornARMv8Simulator >> initializeRegisterAliases [ registerAliases @@ -162,37 +164,37 @@ UnicornARMv8Simulator >> initializeRegisterAliases [ at: #x30 put: #linkRegister ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> instructionPointerRegister [ ^ UcARM64Registers pc ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> linkRegister [ ^ UcARM64Registers x30 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> negative [ ^ (self nzcv bitAnd: (1<<31))~= 0 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> nzcv [ ^ self readRegister: UcARM64Registers nzcv ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> overflow [ ^ (self nzcv bitAnd: (1<<28)) ~= 0 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemory [ "" "Answer an argument vector of the requested size after a vanilla ABI call. For ARM the Procedure Calling Specification can be found in IHI0042D_aapcs.pdf. @@ -206,37 +208,37 @@ UnicornARMv8Simulator >> postCallArgumentsNumArgs: numArgs "" in: aMemo ifFalse: [memory unsignedLongAt: self sp + (i-5)*4 bigEndian: false]]. ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> receiverRegister [ ^ UcARM64Registers x23 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv8Simulator >> registerList [ ^ #(lr pc sp fp x28 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x16 x19 x20 x22 x23 x24 x25 zero negative carry overflow v0 v1 v2) ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> registerStateGetters [ ^#( x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x12 sp lr pc) ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> retpcIn: aMemory [ ^ memory longAt: self fp + 8 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> sendNumberOfArgumentsRegister [ ^ UcARM64Registers x25 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump of address. Build a frame since a) this is used for calls into the run-time which are unlikely to be leaf-calls" @@ -253,14 +255,14 @@ UnicornARMv8Simulator >> simulateJumpCallOf: address memory: aMemory [ self instructionPointerRegisterValue: address ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self lr: nextpc. self pc: address ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ self framePointerRegisterValue: self popWord. @@ -270,13 +272,13 @@ UnicornARMv8Simulator >> simulateReturnIn: aSpurSimulatedMemory [ ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> smalltalkStackPointerRegister [ "Internally to execute Smalltalk code we use X28 as the stack pointer register" ^ UcARM64Registers x28 ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(x0: x1: x2: x3: x4: x5: lr:) withIndexDo: @@ -284,373 +286,373 @@ UnicornARMv8Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step self perform: accessor with: index - 1 * step + base] ] -{ #category : #'simulation-support' } +{ #category : 'simulation-support' } UnicornARMv8Simulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x0: x1: x2: x3: x4: x5: x6: x7: x8: x9: x10: x11: x12: ) ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> stackPointerRegister [ ^ UcARM64Registers sp ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> temporaryRegister [ ^ UcARM64Registers x1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v0 [ ^ self readRawRegister: UcARM64Registers v0 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v1 [ ^ self readRawRegister: UcARM64Registers v1 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> v2 [ ^ self readRawRegister: UcARM64Registers v2 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcARM64Registers v0 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister1Value [ ^ simulator readRegisterId: UcARM64Registers v1 size: 16 ] -{ #category : #'accessing-registers-abstract' } +{ #category : 'accessing-registers-abstract' } UnicornARMv8Simulator >> vectorRegister2Value [ ^ simulator readRegisterId: UcARM64Registers v2 size: 16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> w25: anInteger [ self writeRegister: UcARM64Registers w25 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> w6: anInteger [ self writeRegister: UcARM64Registers w6 value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornARMv8Simulator >> wordSize [ ^ 8 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x0 [ ^ self readRegister: UcARM64Registers x0 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x0: anInteger [ self writeRegister: UcARM64Registers x0 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x1 [ ^ self readRegister: UcARM64Registers x1 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x10 [ ^ self readRegister: UcARM64Registers x10 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x10: anInteger [ ^ self writeRegister: UcARM64Registers x10 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x11 [ ^ self readRegister: UcARM64Registers x11 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x11: anInteger [ ^ self writeRegister: UcARM64Registers x11 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x12 [ ^ self readRegister: UcARM64Registers x12 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x12: anInteger [ ^ self writeRegister: UcARM64Registers x12 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x13: anInteger [ self writeRegister: UcARM64Registers x13 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x14: anInteger [ self writeRegister: UcARM64Registers x14 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x15: anInteger [ self writeRegister: UcARM64Registers x15 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x16 [ ^ self readRegister: UcARM64Registers x16 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x16: anInteger [ self writeRegister: UcARM64Registers x16 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x17: anInteger [ self writeRegister: UcARM64Registers x17 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x18: anInteger [ self writeRegister: UcARM64Registers x18 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x19 [ ^ self readRegister: UcARM64Registers x19 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x19: anInteger [ self writeRegister: UcARM64Registers x19 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x1: anInteger [ ^ self writeRegister: UcARM64Registers x1 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x2 [ ^ self readRegister: UcARM64Registers x2 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x20 [ ^ self readRegister: UcARM64Registers x20 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x22 [ ^ self readRegister: UcARM64Registers x22 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x23 [ ^ self readRegister: UcARM64Registers x23 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x23: anInteger [ self writeRegister: UcARM64Registers x23 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x24 [ ^ self readRegister: UcARM64Registers x24 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x24: anInteger [ self writeRegister: UcARM64Registers x24 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x25 [ ^ self readRegister: UcARM64Registers x25 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x25: anInteger [ self writeRegister: UcARM64Registers x25 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x28 [ ^ self readRegister: UcARM64Registers x28 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x28: anInteger [ self writeRegister: UcARM64Registers x28 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x29: anInteger [ ^ self writeRegister: UcARM64Registers x29 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x2: anInteger [ ^ self writeRegister: UcARM64Registers x2 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x3 [ ^ self readRegister: UcARM64Registers x3 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x30: anInteger [ self writeRegister: UcARM64Registers x30 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x3: anInteger [ ^ self writeRegister: UcARM64Registers x3 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x4 [ ^ self readRegister: UcARM64Registers x4 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x4: anInteger [ ^ self writeRegister: UcARM64Registers x4 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x5 [ ^ self readRegister: UcARM64Registers x5 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x5: anInteger [ ^ self writeRegister: UcARM64Registers x5 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x6 [ ^ self readRegister: UcARM64Registers x6 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x6: anInteger [ ^ self writeRegister: UcARM64Registers x6 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x7 [ ^ self readRegister: UcARM64Registers x7 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x7: anInteger [ ^ self writeRegister: UcARM64Registers x7 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x8 [ ^ self readRegister: UcARM64Registers x8 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x8: anInteger [ ^ self writeRegister: UcARM64Registers x8 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x9 [ ^ self readRegister: UcARM64Registers x9 ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> x9: anInteger [ ^ self writeRegister: UcARM64Registers x9 value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> xzr [ ^ self readRegister: UcARM64Registers xzr ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> xzr: anInteger [ ^ self writeRegister: UcARM64Registers xzr value: anInteger ] -{ #category : #'accessing-registers-physical' } +{ #category : 'accessing-registers-physical' } UnicornARMv8Simulator >> zero [ ^ (self nzcv bitAnd: (1<<30)) ~= 0 diff --git a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st index 3130e440a5..539e97b80e 100644 --- a/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornI386Simulator.class.st @@ -1,191 +1,193 @@ Class { - #name : #UnicornI386Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornI386Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> arg0Register [ ^ UcX86Registers esi ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> baseRegister [ ^ UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> cResultRegister [ ^ UcX86Registers eax ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg0 [ "Stack value 0 is return address" ^ self stackValueAt: 1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg1 [ "Stack value 0 is return address" ^ self stackValueAt: 2 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg2 [ "Stack value 0 is return address" ^ self stackValueAt: 3 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornI386Simulator >> carg3 [ "Stack value 0 is return address" ^ self stackValueAt: 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> classRegister [ ^ UcX86Registers ecx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> createUnicorn [ ^ Unicorn x86 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornI386Simulator >> disassembler [ ^ LLVMDisassembler i386 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> eax [ ^ self readRegister: UcX86Registers eax ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eax: anInteger [ self writeRegister: UcX86Registers eax value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ebp [ ^ self readRegister: UcX86Registers ebp ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ebp: anInteger [ self framePointerRegisterValue: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ebx [ ^ self readRegister: UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ebx: anInteger [ self writeRegister: UcX86Registers ebx value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> ecx [ ^ self readRegister: UcX86Registers ecx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> ecx: anInteger [ self writeRegister: UcX86Registers ecx value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> edi [ ^ self readRegister: UcX86Registers edi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> edi: anInteger [ self writeRegister: UcX86Registers edi value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> edx [ ^ self readRegister: UcX86Registers edx ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> edx: anInteger [ ^ self writeRegister: UcX86Registers edx value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eflags [ ^ self readRegister: UcX86Registers eflags ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> eip [ ^ self readRegister: UcX86Registers eip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> eip: anInteger [ self writeRegister: UcX86Registers eip value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> esi [ ^ self readRegister: UcX86Registers esi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> esi: anInteger [ self writeRegister: UcX86Registers esi value: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> esp [ ^ self readRegister: UcX86Registers esp ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> esp: anInteger [ self stackPointerRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -195,38 +197,38 @@ UnicornI386Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> framePointerRegister [ ^ UcX86Registers ebp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> hasLinkRegister [ ^ false ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> instructionPointerRegister [ ^ UcX86Registers eip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> integerRegisterState [ ^{ self eax. self ebx. self ecx. self edx. self esp. self ebp. self esi. self edi. self eip. self eflags } ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a vanilla ABI call. On IA32 this typically means accessing stacked arguments @@ -237,31 +239,31 @@ UnicornI386Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ memory longAt: self ebp + i ] ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> receiverRegister [ ^ UcX86Registers edx ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> registerList [ ^ #(eip eax ebx ecx edx esp ebp esi edi) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> retpcIn: aMemory [ ^ memory longAt: self ebp + 4 ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers ebx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -273,21 +275,21 @@ UnicornI386Simulator >> simulateJumpCallOf: address memory: aMemory [ self eip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self eip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> simulateReturnIn: aMemory [ self ebp: self popWord. self eip: self popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ #(eax: ecx: edx:) withIndexDo: @@ -295,26 +297,26 @@ UnicornI386Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step i self perform: accessor with: index - 1 * step + base] ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> smashRegisterAccessors [ ^#(eax: ebx: ecx: edx: esi: edi:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> stackPointerRegister [ ^ UcX86Registers esp ] -{ #category : #registers } +{ #category : 'registers' } UnicornI386Simulator >> temporaryRegister [ "Assume SysV" ^ UcX86Registers eax ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornI386Simulator >> wordSize [ ^ 4 diff --git a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st index 8931a8e659..be91859d3a 100644 --- a/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st +++ b/smalltalksrc/VMMakerTests/UnicornInvalidMemoryAccess.class.st @@ -1,63 +1,65 @@ Class { - #name : #UnicornInvalidMemoryAccess, - #superclass : #Error, + #name : 'UnicornInvalidMemoryAccess', + #superclass : 'Error', #instVars : [ 'type', 'address', 'size', 'value' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> address [ ^ address ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> address: anObject [ address := anObject ] -{ #category : #testing } +{ #category : 'testing' } UnicornInvalidMemoryAccess >> isFetch [ ^ self type value anyMask: UcMemoryAccessType UC_MEM_FETCH value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> messageText [ ^ type item asString, ' at ', address hex ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> size [ ^ size ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> size: anObject [ size := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> type [ ^ type ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> type: anObject [ type := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> value [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornInvalidMemoryAccess >> value: anObject [ value := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st index 474a23f736..43e7716bc9 100644 --- a/smalltalksrc/VMMakerTests/UnicornProcessor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornProcessor.class.st @@ -1,104 +1,106 @@ Class { - #name : #UnicornProcessor, - #superclass : #Object, + #name : 'UnicornProcessor', + #superclass : 'Object', #instVars : [ 'machineSimulator' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> cResultRegister [ ^ machineSimulator cResultRegisterValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> cResultRegister: anInteger [ machineSimulator cResultRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> convertIntegerToInternal: anInteger [ ^ machineSimulator convertIntegerToInternal: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> convertInternalToInteger: anInteger [ ^ machineSimulator convertInternalToInteger: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> eax: anInteger [ machineSimulator eax: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ebp: anInteger [ machineSimulator ebp: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ebx: anInteger [ machineSimulator ebx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> ecx: anInteger [ machineSimulator ecx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> edi: anInteger [ machineSimulator edi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> edx: anInteger [ ^ machineSimulator edx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> esp: anInteger [ machineSimulator esp: anInteger ] -{ #category : #caching } +{ #category : 'caching' } UnicornProcessor >> flushICacheFrom: startAddress to: endAddress [ "Do nothing for now..." machineSimulator flushICacheFrom: startAddress to: endAddress ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> fp [ ^ machineSimulator framePointerRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> fp: aValue [ ^ machineSimulator framePointerRegisterValue: aValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> hasLinkRegister [ ^ machineSimulator hasLinkRegister ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> initializeStackFor: aCompiler [ "Initialize the machine code simulator" @@ -109,192 +111,192 @@ UnicornProcessor >> initializeStackFor: aCompiler [ aCompiler backend configureStackAlignment ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> integerRegisterState [ ^ machineSimulator integerRegisterState ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> linkRegisterValue [ ^ machineSimulator linkRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> lr: anInteger [ machineSimulator lr: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> machineSimulator [ ^ machineSimulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> machineSimulator: aMachineSimulator [ machineSimulator := aMachineSimulator ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> pc [ ^ machineSimulator instructionPointerRegisterValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> pc: anInteger [ ^ machineSimulator instructionPointerRegisterValue: anInteger ] -{ #category : #'stack-management' } +{ #category : 'stack-management' } UnicornProcessor >> popWord [ ^ machineSimulator popWord ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory [ ^ machineSimulator postCallArgumentsNumArgs: anInteger in: aSpurSimulatedMemory ] -{ #category : #'stack-management' } +{ #category : 'stack-management' } UnicornProcessor >> pushWord: anInteger [ machineSimulator pushWord: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r0: anInteger [ ^ machineSimulator r0: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r10: anInteger [ machineSimulator r10: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r11: anInteger [ machineSimulator r11: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r1: anInteger [ ^ machineSimulator r1: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r2: anInteger [ machineSimulator r2: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r3: anInteger [ machineSimulator r3: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r4: anInteger [ machineSimulator r4: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r5: anInteger [ machineSimulator r5: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r6: anInteger [ machineSimulator r6: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r8 [ ^ machineSimulator r8 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> r8: anInteger [ machineSimulator r8: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r9: anInteger [ machineSimulator r9: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> r9b: anInteger [ machineSimulator r9b: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rax: anInteger [ machineSimulator rax: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rbp: anInteger [ machineSimulator rbp: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rcx: anInteger [ machineSimulator rcx: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> rdi: anInteger [ machineSimulator rdi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rdx: anInteger [ machineSimulator rdx: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> retpcIn: aSpurSimulatedMemory [ ^ machineSimulator retpcIn: aSpurSimulatedMemory ] -{ #category : #'accessing registers' } +{ #category : 'accessing registers' } UnicornProcessor >> rsi: anInteger [ ^ machineSimulator rsi: anInteger ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> rsp: anInteger [ machineSimulator rsp: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnlyBelow: minimumWritableAddress [ @@ -304,7 +306,7 @@ UnicornProcessor >> runInMemory: aMemory minimumAddress: minimumAddress readOnly count: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> runUntil: anAddress [ ^ machineSimulator startAt: machineSimulator instructionPointerRegisterValue @@ -313,165 +315,165 @@ UnicornProcessor >> runUntil: anAddress [ count: 0 ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornProcessor >> setFramePointer: framePointer stackPointer: stackPointer [ machineSimulator framePointerRegisterValue: framePointer. machineSimulator stackPointerRegisterValue: stackPointer ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory [ machineSimulator simulateJumpCallOf: anInteger memory: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ machineSimulator simulateLeafCallOf: address nextpc: nextpc memory: aMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> simulateReturnIn: aSpurSimulatedMemory [ ^ machineSimulator simulateReturnIn: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory [ machineSimulator smashCallerSavedRegistersWithValuesFrom: anInteger by: anInteger2 in: aSpurSimulatedMemory ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> smashRegistersWithValuesFrom: base by: step [ machineSimulator smashRegistersWithValuesFrom: base by: step ] -{ #category : #registers } +{ #category : 'registers' } UnicornProcessor >> sp [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> sp: anInteger [ machineSimulator stackPointerRegisterValue: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> w25: anInteger [ machineSimulator w25: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> w6: anInteger [ machineSimulator w6: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x12: anInteger [ machineSimulator x12: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x16: anInteger [ machineSimulator x16: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x19: anInteger [ machineSimulator x19: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x1: anInteger [ machineSimulator x1: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x23: anInteger [ machineSimulator x23: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x24: anInteger [ machineSimulator x24: anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornProcessor >> x25: anInteger [ machineSimulator x25: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x28: anInteger [ machineSimulator x28: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x29: anInteger [ machineSimulator x29: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x30: anInteger [ machineSimulator x30: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x3: anInteger [ machineSimulator x3: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x4: anInteger [ machineSimulator x4: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x5: anInteger [ machineSimulator x5: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x6: anInteger [ machineSimulator x6: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> x7: anInteger [ machineSimulator x7: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> xzr [ ^ machineSimulator xzr ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornProcessor >> xzr: anInteger [ machineSimulator xzr: anInteger diff --git a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st index c65b477cae..2895ec60c8 100644 --- a/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRISCVSimulator.class.st @@ -1,64 +1,66 @@ Class { - #name : #UnicornRISCVSimulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornRISCVSimulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> arg0Register [ ^ UcRISCVRegisters x10 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> arg1Register [ ^ UcRISCVRegisters x11 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> baseRegister [ ^ UcRISCVRegisters x26 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> cResultRegister [ ^ UcRISCVRegisters x12 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg0Register [ ^ UcRISCVRegisters x12 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg1Register [ ^ UcRISCVRegisters x13 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg2Register [ ^ UcRISCVRegisters x14 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> carg3Register [ ^ UcRISCVRegisters x15 ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> classRegister [ ^ UcRISCVRegisters x23 ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornRISCVSimulator >> createUnicorn [ simulator := Unicorn riscv64. @@ -67,290 +69,290 @@ UnicornRISCVSimulator >> createUnicorn [ ^ simulator ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> disassembler [ ^ LLVMRV64Disassembler riscv64 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister0 [ ^ UcRISCVRegisters f0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister1 [ ^ UcRISCVRegisters f1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> doublePrecisionFloatingPointRegister2 [ ^ UcRISCVRegisters f2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f0 [ ^ self readRegister: UcRISCVRegisters f0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f1 [ ^ self readRegister: UcRISCVRegisters f1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f10 [ ^ self readRegister: UcRISCVRegisters f10 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f11 [ ^ self readRegister: UcRISCVRegisters f11 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f12 [ ^ self readRegister: UcRISCVRegisters f12 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f13 [ ^ self readRegister: UcRISCVRegisters f13 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f14 [ ^ self readRegister: UcRISCVRegisters f14 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f15 [ ^ self readRegister: UcRISCVRegisters f15 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f16 [ ^ self readRegister: UcRISCVRegisters f16 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f17 [ ^ self readRegister: UcRISCVRegisters f17 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f18 [ ^ self readRegister: UcRISCVRegisters f18 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f19 [ ^ self readRegister: UcRISCVRegisters f19 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f2 [ ^ self readRegister: UcRISCVRegisters f2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f20 [ ^ self readRegister: UcRISCVRegisters f20 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f21 [ ^ self readRegister: UcRISCVRegisters f21 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f22 [ ^ self readRegister: UcRISCVRegisters f22 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f23 [ ^ self readRegister: UcRISCVRegisters f23 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f24 [ ^ self readRegister: UcRISCVRegisters f24 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f25 [ ^ self readRegister: UcRISCVRegisters f25 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f26 [ ^ self readRegister: UcRISCVRegisters f26 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f27 [ ^ self readRegister: UcRISCVRegisters f27 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f28 [ ^ self readRegister: UcRISCVRegisters f28 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f29 [ ^ self readRegister: UcRISCVRegisters f29 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f3 [ ^ self readRegister: UcRISCVRegisters f3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f30 [ ^ self readRegister: UcRISCVRegisters f30 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f31 [ ^ self readRegister: UcRISCVRegisters f31 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f4 [ ^ self readRegister: UcRISCVRegisters f4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f5 [ ^ self readRegister: UcRISCVRegisters f5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f6 [ ^ self readRegister: UcRISCVRegisters f6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f7 [ ^ self readRegister: UcRISCVRegisters f7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f8 [ ^ self readRegister: UcRISCVRegisters f8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> f9 [ ^ self readRegister: UcRISCVRegisters f9 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagCarryRegister [ ^ UcRISCVRegisters x31 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagCarryRegisterValue [ ^ self readRegister: self flagCarryRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegister [ ^ UcRISCVRegisters x30 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagOverflowRegisterValue [ ^ self readRegister: self flagOverflowRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagSignRegister [ ^ UcRISCVRegisters x29 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagSignRegisterValue [ ^ self readRegister: self flagSignRegister ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagZeroRegister [ ^ UcRISCVRegisters x28 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> flagZeroRegisterValue [ ^ self readRegister: self flagZeroRegister ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> framePointerRegister [ "Frame Pointer" ^ UcRISCVRegisters x8 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> getReturnAddress [ ^ self linkRegisterValue ] -{ #category : #testing } +{ #category : 'testing' } UnicornRISCVSimulator >> hasLinkRegister [ ^ true ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> initializeRegisterAliases [ registerAliases @@ -396,7 +398,7 @@ UnicornRISCVSimulator >> initializeRegisterAliases [ at: #f7 put: #ft7 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ registerSmalltalkAliases @@ -425,43 +427,43 @@ UnicornRISCVSimulator >> initializeRegisterSmalltalkAliases [ at: #x31 put: #carry ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> instructionPointerRegister [ ^ UcRISCVRegisters pc ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornRISCVSimulator >> linkRegister [ ^ UcRISCVRegisters x1 ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatus [ ^ UcRISCVRegisters mstatus ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue [ ^ self readRegister: self mstatus ] -{ #category : #'c calling convention' } +{ #category : 'c calling convention' } UnicornRISCVSimulator >> mstatusRegisterValue: aValue [ ^ self writeRegister: self mstatus value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> receiverRegister [ ^ UcRISCVRegisters x24 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRISCVSimulator >> registerList [ ^ #(lr pc sp fp @@ -470,375 +472,375 @@ UnicornRISCVSimulator >> registerList [ f0 f1 f2 f3 f4 f5 f6 f7) ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s0 [ ^ self readRegister: UcRISCVRegisters s0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s0: aValue [ ^ self writeRegister: UcRISCVRegisters s0 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s2 [ ^ self readRegister: UcRISCVRegisters s2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s2: aValue [ ^ self writeRegister: UcRISCVRegisters s2 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s7 [ ^ self readRegister: UcRISCVRegisters s7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s7: aValue [ ^ self writeRegister: UcRISCVRegisters s7 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s8 [ ^ self readRegister: UcRISCVRegisters s8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s8: aValue [ ^ self writeRegister: UcRISCVRegisters s8 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s9 [ ^ self readRegister: UcRISCVRegisters s9 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> s9: aValue [ ^ self writeRegister: UcRISCVRegisters s9 value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> sendNumberOfArgumentsRegister [ ^ UcRISCVRegisters x25 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornRISCVSimulator >> simulateLeafCallOf: destinationAddress nextpc: returnAddress memory: anUndefinedObject [ self linkRegisterValue: returnAddress. self instructionPointerRegisterValue: destinationAddress ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> smashRegisterAccessors [ "Caller saved registers to smash" ^#( x1: x5: x6: x7: x10: x11: x12: x13: x14: x15: x16: x17: x28: x29: x30: x31:) ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> stackPointerRegister [ ^ UcRISCVRegisters x2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t0 [ ^ self readRegister: UcRISCVRegisters t0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t0: aValue [ ^ self writeRegister: UcRISCVRegisters t0 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t1 [ ^ self readRegister: UcRISCVRegisters t1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t1: aValue [ ^ self writeRegister: UcRISCVRegisters t1 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t2 [ ^ self readRegister: UcRISCVRegisters t2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t2: aValue [ ^ self writeRegister: UcRISCVRegisters t2 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t3 [ ^ self readRegister: UcRISCVRegisters t3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t3: aValue [ ^ self writeRegister: UcRISCVRegisters t3 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t4 [ ^ self readRegister: UcRISCVRegisters t4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t4: aValue [ ^ self writeRegister: UcRISCVRegisters t4 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t5 [ ^ self readRegister: UcRISCVRegisters t5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t5: aValue [ ^ self writeRegister: UcRISCVRegisters t5 value: aValue ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t6 [ ^ self readRegister: UcRISCVRegisters t6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> t6: aValue [ ^ self writeRegister: UcRISCVRegisters t6 value: aValue ] -{ #category : #registers } +{ #category : 'registers' } UnicornRISCVSimulator >> temporaryRegister [ ^ UcRISCVRegisters x22 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRISCVSimulator >> wordSize [ ^ 8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x0 [ ^ self readRegister: UcRISCVRegisters x0 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x1 [ ^ self readRegister: UcRISCVRegisters x1 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x10 [ ^ self readRegister: UcRISCVRegisters x10 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x11 [ ^ self readRegister: UcRISCVRegisters x11 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x12 [ ^ self readRegister: UcRISCVRegisters x12 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x13 [ ^ self readRegister: UcRISCVRegisters x13 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x14 [ ^ self readRegister: UcRISCVRegisters x14 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x15 [ ^ self readRegister: UcRISCVRegisters x15 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x16 [ ^ self readRegister: UcRISCVRegisters x16 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x17 [ ^ self readRegister: UcRISCVRegisters x17 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x18 [ ^ self readRegister: UcRISCVRegisters x18 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x19 [ ^ self readRegister: UcRISCVRegisters x19 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x2 [ ^ self readRegister: UcRISCVRegisters x2 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x20 [ ^ self readRegister: UcRISCVRegisters x20 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x21 [ ^ self readRegister: UcRISCVRegisters x21 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x22 [ ^ self readRegister: UcRISCVRegisters x22 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x23 [ ^ self readRegister: UcRISCVRegisters x23 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x24 [ ^ self readRegister: UcRISCVRegisters x24 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x25 [ ^ self readRegister: UcRISCVRegisters x25 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x26 [ ^ self readRegister: UcRISCVRegisters x26 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x27 [ ^ self readRegister: UcRISCVRegisters x27 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x28 [ ^ self readRegister: UcRISCVRegisters x28 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x29 [ ^ self readRegister: UcRISCVRegisters x29 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x3 [ ^ self readRegister: UcRISCVRegisters x3 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x30 [ ^ self readRegister: UcRISCVRegisters x30 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x31 [ ^ self readRegister: UcRISCVRegisters x31 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x4 [ ^ self readRegister: UcRISCVRegisters x4 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x5 [ ^ self readRegister: UcRISCVRegisters x5 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x6 [ ^ self readRegister: UcRISCVRegisters x6 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x7 [ ^ self readRegister: UcRISCVRegisters x7 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x8 [ ^ self readRegister: UcRISCVRegisters x8 ] -{ #category : #'machine registers' } +{ #category : 'machine registers' } UnicornRISCVSimulator >> x9 [ ^ self readRegister: UcRISCVRegisters x9 diff --git a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st index 4302fb7c83..401ef8c3e9 100644 --- a/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st +++ b/smalltalksrc/VMMakerTests/UnicornRegisterDescriptor.class.st @@ -1,48 +1,50 @@ Class { - #name : #UnicornRegisterDescriptor, - #superclass : #Object, + #name : 'UnicornRegisterDescriptor', + #superclass : 'Object', #instVars : [ 'simulator', 'name', 'alias' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> alias [ ^ alias ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> alias: aString [ alias := aString ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> copyValueToClipboard [ Clipboard clipboardText: self value hex ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> inspectValue [ self value inspect ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> name [ ^ name ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> name: anObject [ name := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> printOn: aStream [ (self value isKindOf: Boolean ) @@ -52,23 +54,23 @@ UnicornRegisterDescriptor >> printOn: aStream [ ] -{ #category : #actions } +{ #category : 'actions' } UnicornRegisterDescriptor >> printValue [ simulator memory interpreter longPrintOop: self value ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornRegisterDescriptor >> value [ ^ simulator perform: name diff --git a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st index 0b5790d901..cd421437e1 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulationTrap.class.st @@ -1,14 +1,16 @@ Class { - #name : #UnicornSimulationTrap, - #superclass : #Object, + #name : 'UnicornSimulationTrap', + #superclass : 'Object', #instVars : [ 'unicornInvalidAccess', 'simulator' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemoryAccess [ ^ self new @@ -17,13 +19,13 @@ UnicornSimulationTrap class >> simulator: simulator error: anUnicornInvalidMemor yourself ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> address [ ^ unicornInvalidAccess address ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> nextpc [ | instruction | @@ -31,7 +33,7 @@ UnicornSimulationTrap >> nextpc [ ^ self simulator instructionPointerRegisterValue + instruction size ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> registerAccessor [ "Assume this is a read of a value into a register" @@ -44,18 +46,18 @@ UnicornSimulationTrap >> registerAccessor [ ^ (registerName , ':') asSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> simulator [ ^ simulator ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> simulator: anObject [ simulator := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> type [ unicornInvalidAccess type = UcMemoryAccessType UC_MEM_WRITE_UNMAPPED @@ -68,12 +70,12 @@ UnicornSimulationTrap >> type [ self halt ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> unicornInvalidAccess: anUnicornInvalidMemoryAccess [ unicornInvalidAccess := anUnicornInvalidMemoryAccess ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornSimulationTrap >> writtenValue [ "This is the value that was tried to be written but failed (if this is a failed write)" ^ unicornInvalidAccess value diff --git a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st index c8194d7391..fc5d4a2eff 100644 --- a/smalltalksrc/VMMakerTests/UnicornSimulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornSimulator.class.st @@ -1,26 +1,28 @@ Class { - #name : #UnicornSimulator, - #superclass : #ProcessorSimulator, + #name : 'UnicornSimulator', + #superclass : 'ProcessorSimulator', #instVars : [ 'stopReason', 'invalidAccessHandler' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } UnicornSimulator class >> supportsISA: isa [ ^ #( #ARMv5 #ARMv8 #IA32 #X64 #aarch64 #riscv64 ) includes: isa ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> createUnicorn [ self subclassResponsibility ] -{ #category : #executing } +{ #category : 'executing' } UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: count [ | result error startTime currentTime remainingTimeout remainingCount | @@ -71,13 +73,13 @@ UnicornSimulator >> doStartAt: startAddress until: until timeout: timeout count: ifTrue: [ ^ result ]] ] -{ #category : #'stack-access' } +{ #category : 'stack-access' } UnicornSimulator >> finishMappingMemory [ "Do nothing in the case of Unicorn, is useful if the simulator used has to map memory by hand" ] -{ #category : #'handling invalid accesses' } +{ #category : 'handling invalid accesses' } UnicornSimulator >> handleInvalidAccess: invalidAccess [ | previousInstructionPointer hasToContinue | @@ -95,7 +97,7 @@ UnicornSimulator >> handleInvalidAccess: invalidAccess [ ^ hasToContinue ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> initialize [ super initialize. @@ -110,7 +112,7 @@ UnicornSimulator >> initialize [ true] ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> initializeUnicorn [ simulator @@ -126,12 +128,12 @@ UnicornSimulator >> initializeUnicorn [ false ] ] -{ #category : #'handling invalid accesses' } +{ #category : 'handling invalid accesses' } UnicornSimulator >> invalidAccessHandler: aFullBlockClosure [ invalidAccessHandler := aFullBlockClosure ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ simulator @@ -140,7 +142,7 @@ UnicornSimulator >> registerHook: aBlock atAddress: anAddress [ address = anAddress ifTrue: [ aBlock value ] ] ] -{ #category : #executing } +{ #category : 'executing' } UnicornSimulator >> startAt: begin until: until timeout: timeout count: count [ ^ self doStartAt: begin until: until timeout: timeout count: count. diff --git a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st index 12be3bf4bf..e070ae5e0a 100644 --- a/smalltalksrc/VMMakerTests/UnicornTimeout.class.st +++ b/smalltalksrc/VMMakerTests/UnicornTimeout.class.st @@ -1,18 +1,20 @@ Class { - #name : #UnicornTimeout, - #superclass : #Error, + #name : 'UnicornTimeout', + #superclass : 'Error', #instVars : [ 'target' ], - #category : #'VMMakerTests-Unicorn' + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #accessing } +{ #category : 'accessing' } UnicornTimeout >> target [ ^ target ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornTimeout >> target: anObject [ target := anObject ] diff --git a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st index d7176e7d9a..4dfd2f5b9d 100644 --- a/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st +++ b/smalltalksrc/VMMakerTests/UnicornX64Simulator.class.st @@ -1,98 +1,100 @@ Class { - #name : #UnicornX64Simulator, - #superclass : #UnicornSimulator, - #category : #'VMMakerTests-Unicorn' + #name : 'UnicornX64Simulator', + #superclass : 'UnicornSimulator', + #category : 'VMMakerTests-Unicorn', + #package : 'VMMakerTests', + #tag : 'Unicorn' } -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> arg0Register [ ^ UcX86Registers rdi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> arg1Register [ ^ UcX86Registers rsi ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> baseRegister [ ^ UcX86Registers rbx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> cResultRegister [ ^ UcX86Registers rax ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg0Register [ "Assume SysV" ^ UcX86Registers rdi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg1Register [ "Assume SysV" ^ UcX86Registers rsi ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg2Register [ "Assume SysV" ^ UcX86Registers rdx ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> carg3Register [ "Assume SysV" ^ UcX86Registers rcx ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> classRegister [ ^ UcX86Registers rcx ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> createUnicorn [ ^ Unicorn x8664 ] -{ #category : #disassembling } +{ #category : 'disassembling' } UnicornX64Simulator >> disassembler [ ^ LLVMDisassembler amd64 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister0 [ ^ UcX86Registers xmm0 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister1 [ ^ UcX86Registers xmm1 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> doublePrecisionFloatingPointRegister2 [ ^ UcX86Registers xmm2 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction [ | registerName | @@ -102,25 +104,25 @@ UnicornX64Simulator >> extractDestinationRegisterFromAssembly: aLLVMInstruction ^ registerName ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> framePointerRegister [ ^ UcX86Registers rbp ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> getReturnAddress [ ^ self peekAddress ] -{ #category : #testing } +{ #category : 'testing' } UnicornX64Simulator >> hasLinkRegister [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } UnicornX64Simulator >> initializeRegisterAliases [ registerAliases @@ -131,19 +133,19 @@ UnicornX64Simulator >> initializeRegisterAliases [ at: #rbp put: #framePointerRegister ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> instructionPointerRegister [ ^ UcX86Registers rip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> integerRegisterState [ ^ #() ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ "Answer an argument vector of the requested size after a Win64 or SysV ABI call. On X64 this simply means accessing register arguments. @@ -158,266 +160,266 @@ UnicornX64Simulator >> postCallArgumentsNumArgs: numArgs in: aMemory [ self perform: getter] ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r10 [ ^ self readRegister: UcX86Registers r10 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r10: anInteger [ ^ self writeRegister: UcX86Registers r10 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r11 [ ^ self readRegister: UcX86Registers r11 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r11: anInteger [ ^ self writeRegister: UcX86Registers r11 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r12 [ ^ self readRegister: UcX86Registers r12 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r12: anInteger [ ^ self writeRegister: UcX86Registers r12 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r13: anInteger [ self writeRegister: UcX86Registers r13 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r14: anInteger [ self writeRegister: UcX86Registers r14 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r15: anInteger [ self writeRegister: UcX86Registers r15 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r1: anInteger [ ^ self writeRegister: UcX86Registers r1 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r2: anInteger [ ^ self writeRegister: UcX86Registers r2 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r3: anInteger [ ^ self writeRegister: UcX86Registers r3 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r4: anInteger [ ^ self writeRegister: UcX86Registers r4 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r5: anInteger [ ^ self writeRegister: UcX86Registers r5 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r6: anInteger [ ^ self writeRegister: UcX86Registers r6 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r7: anInteger [ ^ self writeRegister: UcX86Registers r7 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r8 [ ^ self readRegister: UcX86Registers r8 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r8: anInteger [ ^ self writeRegister: UcX86Registers r8 value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> r9 [ ^ self readRegister: UcX86Registers r9 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r9: anInteger [ ^ self writeRegister: UcX86Registers r9 value: anInteger ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> r9b: anInteger [ self writeRegister: UcX86Registers r9b value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rax [ ^ self readRegister: UcX86Registers rax ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rax: anInteger [ self writeRegister: UcX86Registers rax value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbp [ ^ self readRegister: UcX86Registers rbp ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbp: anInteger [ ^ self writeRegister: UcX86Registers rbp value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbx [ ^ self readRegister: UcX86Registers rbx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rbx: aValue [ ^ self writeRegister: UcX86Registers rbx value: aValue ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rcx [ ^ self readRegister: UcX86Registers rcx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rcx: anInteger [ ^ self writeRegister: UcX86Registers rcx value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdi [ ^ self readRegister: UcX86Registers rdi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rdi: anInteger [ self writeRegister: UcX86Registers rdi value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdx [ ^ self readRegister: UcX86Registers rdx ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rdx: anInteger [ ^ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> receiverRegister [ ^ UcX86Registers rdx ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> registerList [ ^ #(rip rax rbx rcx rdx rsp rbp r8 r9 r10 r11 r12 rsi rdi) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> retpcIn: aSpurSimulatedMemory [ ^ memory long64At: self rbp + 8 ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rip [ ^ self readRegister: UcX86Registers rip ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rip: anInteger [ self writeRegister: UcX86Registers rip value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsi [ ^ self readRegister: UcX86Registers rsi ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> rsi: anInteger [ self writeRegister: UcX86Registers rsi value: anInteger ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsp [ ^ self readRegister: UcX86Registers rsp ] -{ #category : #'phisical-registers' } +{ #category : 'phisical-registers' } UnicornX64Simulator >> rsp: anInteger [ ^ self writeRegister: UcX86Registers rsp value: anInteger ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> sendNumberOfArgumentsRegister [ ^ UcX86Registers r9 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ "Simulate a frame-building jump call of address (i.e. do not push the return pc as this has already been done). Build a frame since @@ -437,21 +439,21 @@ UnicornX64Simulator >> simulateJumpCallOf: address memory: aMemory [ self rip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateLeafCallOf: address nextpc: nextpc memory: aMemory [ self pushWord: nextpc. self rip: address ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> simulateReturnIn: aMemory [ self rbp: (self popWord). self rip: (self popWord) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in: aMemory [ | volatileRegisters | CogX64Compiler isSysV @@ -469,50 +471,50 @@ UnicornX64Simulator >> smashCallerSavedRegistersWithValuesFrom: base by: step in self perform: setter with: index - 1 * step + base] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } UnicornX64Simulator >> smashRegisterAccessors [ ^#(rax: rbx: rcx: rdx: rsi: rdi: r8: r9: r10: r11: r12: r13: r14: r15:) ] -{ #category : #'virtual-registers' } +{ #category : 'virtual-registers' } UnicornX64Simulator >> stackPointerRegister [ ^ UcX86Registers rsp ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> temporaryRegister [ "Both in System V and Windows" ^ UcX86Registers rax ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> vectorRegister0Value [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> wordSize [ ^ 8 ] -{ #category : #'accessing - registers' } +{ #category : 'accessing - registers' } UnicornX64Simulator >> xmm0 [ ^ simulator readRegisterId: UcX86Registers xmm0 size: 16 ] -{ #category : #accessing } +{ #category : 'accessing' } UnicornX64Simulator >> xmm1 [ ^ simulator readRegisterId: UcX86Registers xmm1 size: 16 ] -{ #category : #registers } +{ #category : 'registers' } UnicornX64Simulator >> xmm2 [ ^ simulator readRegisterId: UcX86Registers xmm2 size: 16 diff --git a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st index a4cd67ccdf..386f10c484 100644 --- a/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMStackAlignmentTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMARMStackAlignmentTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMARMStackAlignmentTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'instructions' ], #pools : [ 'CogAbstractRegisters' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMStackAlignmentTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -18,25 +20,25 @@ VMARMStackAlignmentTest class >> wordSizeParameters [ yourself ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> addInstruction: anInstruction [ instructions add: anInstruction ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> disassembleInstructions [ ^ self disassembleFrom: cogInitialAddress opcodes: instructions size ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> runInstructions [ ^ self runFrom: cogInitialAddress until: cogInitialAddress + (instructions size * 4) ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> setUp [ super setUp. @@ -45,7 +47,7 @@ VMARMStackAlignmentTest >> setUp [ machineSimulator stackPointerRegisterValue: interpreter rumpCStackAddress ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ "To start the stack pointer should be aligned" @@ -96,7 +98,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldGenerateError [ equals: 'Unhandled CPU exception (UC_ERR_EXCEPTION)' ] ] -{ #category : #tests } +{ #category : 'tests' } VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ "To start the stack pointer should be aligned" @@ -135,7 +137,7 @@ VMARMStackAlignmentTest >> testUnAlignedStackWriteShouldPass [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMARMStackAlignmentTest >> writeInstructions [ cogInitialAddress := cogit methodZone allocate: instructions size * 4 . diff --git a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st index 82faa50100..522508bad7 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SIMDEncodingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMARMV8SIMDEncodingTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMARMV8SIMDEncodingTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMV8SIMDEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -12,7 +14,7 @@ VMARMV8SIMDEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> armInstructionAt: index [ | addr inst | @@ -22,20 +24,20 @@ VMARMV8SIMDEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : #configuration } +{ #category : 'configuration' } VMARMV8SIMDEncodingTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } VMARMV8SIMDEncodingTest >> initializationOptions [ ^ super initializationOptions , { #ProcessorClass . DummyProcessor } ] -{ #category : #accessing } +{ #category : 'accessing' } VMARMV8SIMDEncodingTest >> jitOptions [ ^ super jitOptions @@ -44,7 +46,7 @@ VMARMV8SIMDEncodingTest >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ self compile: [ cogit DupS: 64 R: 3 Vr: 0 ]. @@ -54,7 +56,7 @@ VMARMV8SIMDEncodingTest >> testEncodeDupWith64BitLanes [ equals: 'dup v0.2d, x3' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ self compile: [ cogit FaddS: 32 Rv: 0 Rv: 1 Rv: 2 ]. @@ -64,7 +66,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith32BitLanes [ equals: 'fadd v2.4s, v0.4s, v1.4s' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ self compile: [ cogit FaddS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -74,7 +76,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFaddWith64BitLanes [ equals: 'fadd v2.2d, v0.2d, v1.2d' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ self compile: [ cogit FsubS: 64 Rv: 0 Rv: 1 Rv: 2 ]. @@ -84,7 +86,7 @@ VMARMV8SIMDEncodingTest >> testEncodeFsubWith64BitLanes [ equals: 'fsub v2.2d, v0.2d, v1.2d' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -94,7 +96,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne32BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.4s }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -104,7 +106,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndImmediateOffs equals: 'ld1 { v0.2d }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit Ld1S: 64 Vr: 0 R: 1 Mw: 0 ]. @@ -114,7 +116,7 @@ VMARMV8SIMDEncodingTest >> testEncodeLd1WithOne64BitLaneRegisterAndNoOffset [ equals: 'ld1 { v0.2d }, [x1]' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 32 Vr: 0 R: 1 Mw: 16 ]. @@ -124,7 +126,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne32BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.4s }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 16 ]. @@ -134,7 +136,7 @@ VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndImmediateOffs equals: 'st1 { v0.2d }, [x1], #16' ] -{ #category : #tests } +{ #category : 'tests' } VMARMV8SIMDEncodingTest >> testEncodeSt1WithOne64BitLaneRegisterAndNoOffset [ self compile: [ cogit St1S: 64 Vr: 0 R: 1 Mw: 0 ]. diff --git a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st index ff35f32f94..50b7051a80 100644 --- a/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMARMV8SpecificEncodingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMARMV8SpecificEncodingTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMARMV8SpecificEncodingTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMARMV8SpecificEncodingTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -12,7 +14,7 @@ VMARMV8SpecificEncodingTest class >> wordSizeParameters [ yourself ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> armInstructionAt: index [ | addr inst | @@ -22,7 +24,7 @@ VMARMV8SpecificEncodingTest >> armInstructionAt: index [ ^ inst aarch64Disassembled ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ | expectedAddress expectedValue | @@ -46,7 +48,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMbrR: constant [ ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ | expectedAddress expectedValue | @@ -70,7 +72,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveMwrR: constant [ ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ | expectedAddress expectedValue | @@ -92,7 +94,7 @@ VMARMV8SpecificEncodingTest >> doTestEncodeMoveRMwr: constant [ ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ | constant | @@ -108,7 +110,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRNonEncodeable12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ | negativeConstant12Bits | @@ -123,7 +125,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstant [ | negativeConstant12Bits | @@ -138,7 +140,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative12ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstant [ | negativeConstant12Bits | @@ -153,7 +155,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegative13ShiftableBitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ | negativeConstant12Bits | @@ -168,7 +170,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithNegativeConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ | positiveConstant12Bits | @@ -183,7 +185,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositive12BitConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ | positiveConstant12Bits | @@ -198,7 +200,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveBigConstant [ self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstant [ | positiveConstant12Bits | @@ -213,7 +215,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable12BitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstant [ | positiveConstant12Bits | @@ -228,7 +230,7 @@ VMARMV8SpecificEncodingTest >> testEncodeCmpCqRWithPositiveShiftable13BitConstan self assert: machineSimulator zero ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ @@ -243,7 +245,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithEncodeableLargeNumber [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ @@ -258,7 +260,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithLargeConstant [ self assert: machineSimulator x24 equals: constantValue ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ @@ -275,7 +277,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveCqRWithNegativeLargeConstant [ self assert: machineSimulator x24 hex equals: completementValue hex ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ self doTestEncodeMoveMbrR: -256. @@ -283,7 +285,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegative9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMbrR: -1024. @@ -291,7 +293,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithNegativeNon9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ self doTestEncodeMoveMbrR: 255. @@ -299,7 +301,7 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositive9BitConstant [ ] -{ #category : #'tests - MoveMbrR' } +{ #category : 'tests - MoveMbrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMbrR: 1024. @@ -307,35 +309,35 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveMbrRWithPositiveNon9BitConstant [ ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegative9BitConstant [ self doTestEncodeMoveMwrR: -256 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithNegativeNon9BitConstant [ self doTestEncodeMoveMwrR: -20056 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositive12BitConstant [ self doTestEncodeMoveMwrR: 16r100 ] -{ #category : #'tests - MoveMwrR' } +{ #category : 'tests - MoveMwrR' } VMARMV8SpecificEncodingTest >> testEncodeMoveMwrRWithPositiveNon9BitConstant [ self doTestEncodeMoveMwrR: 20056 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ self doTestEncodeMoveRMwr: -256. @@ -346,28 +348,28 @@ VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNegative9BitConstant [ equals: 'stur x23, [x3, #-256]' ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitButShiftableConstant [ self doTestEncodeMoveRMwr: 512 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithNon9BitNegativeConstant [ self doTestEncodeMoveRMwr: -61440 ] -{ #category : #'tests - MoveRMwr' } +{ #category : 'tests - MoveRMwr' } VMARMV8SpecificEncodingTest >> testEncodeMoveRMwrWithPositive9BitConstant [ self doTestEncodeMoveRMwr: 256 ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self compile: [ @@ -379,7 +381,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithEncodableConstant [ self assert: machineSimulator receiverRegisterValue equals: 16r1FF ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self compile: [ @@ -391,7 +393,7 @@ VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithLargeConstant [ self assert: machineSimulator receiverRegisterValue equals: (67108865 bitOr: 16r100) ] -{ #category : #'tests - cmpCqR' } +{ #category : 'tests - cmpCqR' } VMARMV8SpecificEncodingTest >> testEncodeOrCqRWithNonEncodableConstant [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st index e712546ea2..c7defd272a 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractBuilder.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMAbstractBuilder, - #superclass : #Object, + #name : 'VMAbstractBuilder', + #superclass : 'Object', #instVars : [ 'interpreter', 'memory' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ "convinience method to put an oop at a specific place No need to take care of the size of the collection, I'm taking care of it!" @@ -20,22 +22,22 @@ VMAbstractBuilder >> collection: aCollection at: anIndex put: anOop [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> interpreter [ ^ interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> interpreter: anObject [ interpreter := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> memory [ ^ memory ] -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractBuilder >> memory: anObject [ memory := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st index 4b0874a231..afe2f98aa3 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractFFITest.class.st @@ -1,13 +1,14 @@ Class { - #name : #VMAbstractFFITest, - #superclass : #VMAbstractPrimitiveTest, + #name : 'VMAbstractFFITest', + #superclass : 'VMAbstractPrimitiveTest', #pools : [ 'LibFFIConstants' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argumentTypes withReturnType: returnType [ | functionAddress tfExternalFunction functionExternalAddress tfFunctionDefinition cif cifExternalAddress | @@ -31,7 +32,7 @@ VMAbstractFFITest >> createExternalFunctionFor: aBlock withArgumentTypes: argume ^ tfExternalFunction ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ ^ self @@ -40,7 +41,7 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock [ withReturnType: interpreter libFFI float ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTypes: argumentTypes [ ^ self @@ -49,20 +50,20 @@ VMAbstractFFITest >> createReturnFloatExternalFunctionFor: aBlock withArgumentTy withReturnType: interpreter libFFI float ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_FFI . true } ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> interpreterClass [ ^ VMTestMockInterpreter ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> newExternalAddress: anInteger [ | anExternalAddress | @@ -75,7 +76,7 @@ VMAbstractFFITest >> newExternalAddress: anInteger [ ^ anExternalAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMAbstractFFITest >> readyProcesses [ | collection | @@ -84,7 +85,7 @@ VMAbstractFFITest >> readyProcesses [ ^ collection ] -{ #category : #initialization } +{ #category : 'initialization' } VMAbstractFFITest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st index 68609896f2..f1fa371973 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractImageFormatTest.class.st @@ -1,40 +1,42 @@ Class { - #name : #VMAbstractImageFormatTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMAbstractImageFormatTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'imageReader', 'imageReaderClass', 'imageWriterClass' ], - #category : #'VMMakerTests-ImageFormat' + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #accessing } +{ #category : 'accessing' } VMAbstractImageFormatTest >> defaultTimeLimit [ ^ 30 seconds ] -{ #category : #tests } +{ #category : 'tests' } VMAbstractImageFormatTest >> imageFileName [ ^ 'lala.image' ] -{ #category : #tests } +{ #category : 'tests' } VMAbstractImageFormatTest >> readHeader [ ^ imageReader readHeaderFromImage: self imageFileName ] -{ #category : #actions } +{ #category : 'actions' } VMAbstractImageFormatTest >> saveImage [ interpreter writeImageFileIO. ] -{ #category : #running } +{ #category : 'running' } VMAbstractImageFormatTest >> setUp [ super setUp. @@ -60,7 +62,7 @@ VMAbstractImageFormatTest >> setUp [ ] -{ #category : #ston } +{ #category : 'ston' } VMAbstractImageFormatTest >> stonPretty: anObject [ ^ String streamContents: [ :s | @@ -71,7 +73,7 @@ VMAbstractImageFormatTest >> stonPretty: anObject [ ] ] -{ #category : #running } +{ #category : 'running' } VMAbstractImageFormatTest >> tearDown [ self imageFileName asFileReference ensureDeleteAll. diff --git a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st index 11812a06b3..9657b0b0bd 100644 --- a/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMAbstractPrimitiveTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #VMAbstractPrimitiveTest, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMAbstractPrimitiveTest', + #superclass : 'VMSpurMemoryManagerTest', #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMClassIndices', 'VMObjectIndices' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ | aProcess | @@ -23,7 +24,7 @@ VMAbstractPrimitiveTest >> createProcessFor: newMethod priority: aPriority [ ^ aProcess ] -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPriority [ | suspendedContext aProcess | @@ -45,7 +46,7 @@ VMAbstractPrimitiveTest >> createSuspendedProcessFor: newMethod priority: aPrior ^ aProcess ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMAbstractPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -56,7 +57,7 @@ VMAbstractPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ ^ methodBuilder @@ -65,7 +66,7 @@ VMAbstractPrimitiveTest >> newMethodWithBytecodes: aCollection [ buildMethod ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -114,7 +115,7 @@ VMAbstractPrimitiveTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : #running } +{ #category : 'running' } VMAbstractPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" diff --git a/smalltalksrc/VMMakerTests/VMBlockTest.class.st b/smalltalksrc/VMMakerTests/VMBlockTest.class.st index b257001c87..8481eab72c 100644 --- a/smalltalksrc/VMMakerTests/VMBlockTest.class.st +++ b/smalltalksrc/VMMakerTests/VMBlockTest.class.st @@ -1,24 +1,26 @@ Class { - #name : #VMBlockTest, - #superclass : #VMInterpreterTests, + #name : 'VMBlockTest', + #superclass : 'VMInterpreterTests', #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> anEmptyMethod [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> evaluatingABlock [ [^1] value ] -{ #category : #helpers } +{ #category : 'helpers' } VMBlockTest >> installFullBlockClosureClass [ | aClass | aClass := self @@ -32,14 +34,14 @@ VMBlockTest >> installFullBlockClosureClass [ withValue: aClass ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodReturningABlock [ ^ [] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ true ifTrue: [ @@ -48,14 +50,14 @@ VMBlockTest >> methodReturningABlockInsideABlockWithLocal [ ^ [ anArgument ] ] ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodReturningABlockWithTwoArguments [ ^ [:a :b] ] -{ #category : #supports } +{ #category : 'supports' } VMBlockTest >> methodWithLocalReturningABlock [ | a | @@ -63,14 +65,14 @@ VMBlockTest >> methodWithLocalReturningABlock [ ^ [ a ] ] -{ #category : #running } +{ #category : 'running' } VMBlockTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testCreatingABlockCapturesReceiver [ | methodReturning initialMethod | @@ -95,7 +97,7 @@ VMBlockTest >> testCreatingABlockCapturesReceiver [ self assert: (memory fetchPointer: FullClosureReceiverIndex ofObject: interpreter stackTop) equals: memory trueObject ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ | methodReturning initialMethod placeTakenByLiterals closure blockInitialPC compiledBlock | @@ -132,7 +134,7 @@ VMBlockTest >> testCreatingABlockClosureKnowsCompiledBlock [ ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ | methodReturning initialMethod | @@ -159,7 +161,7 @@ VMBlockTest >> testCreatingABlockClosureShouldCopyUsedMethodVariable [ assert: (memory fetchPointer: FullClosureFirstCopiedValueIndex ofObject: interpreter stackTop) equals: (memory integerObjectOf: 2) ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ | methodReturning initialMethod | @@ -188,7 +190,7 @@ VMBlockTest >> testCreatingABlockClosureShouldHaveOuterContextObject [ self assert: (interpreter isWidowedContext: (memory outerContextOf: interpreter stackTop)) ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable [ | methodReturning initialMethod | @@ -215,7 +217,7 @@ VMBlockTest >> testCreatingABlockInsideABlockClosureShouldCopyUsedBlockVariable ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ | methodReturning initialMethod | @@ -242,7 +244,7 @@ VMBlockTest >> testCreatingABlockWithoutArgumentsClosureShouldHaveNoArgument [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMBlockTest >> testEvaluatingABlock [ | methodReturning initialMethod | @@ -274,7 +276,7 @@ VMBlockTest >> testEvaluatingABlock [ equals: (memory classAtIndex: ClassFullBlockClosureCompactIndex) ] -{ #category : #testing } +{ #category : 'testing' } VMBlockTest >> testPushClosureBytecodePushesClosure [ | methodReturning initialMethod | diff --git a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st index 1fea546beb..459f61526b 100644 --- a/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMByteCodesTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMByteCodesTest, - #superclass : #VMInterpreterTests, + #name : 'VMByteCodesTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'contextOop', 'context', 'callingFrame', 'topFrame' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -21,7 +23,7 @@ VMByteCodesTest >> assert: aBlock pop: anOop intoTemporary: anIndex [ self assert: (interpreter temporary: anIndex in: interpreter framePointer) equals: anOop ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock pushed: anOop [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -33,7 +35,7 @@ VMByteCodesTest >> assert: aBlock pushed: anOop [ ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assert: aBlock returned: anOop [ | callerSP | callerSP := interpreter frameCallerSP: interpreter framePointer. @@ -45,7 +47,7 @@ VMByteCodesTest >> assert: aBlock returned: anOop [ ] -{ #category : #'helper-assertions' } +{ #category : 'helper-assertions' } VMByteCodesTest >> assertPopped: aBlock [ | oldStackSize | oldStackSize := interpreter stackPointer. @@ -56,24 +58,24 @@ VMByteCodesTest >> assertPopped: aBlock [ ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> firstPushTemporaryVariableBytecode [ "in v3 bytecode table" ^ 16 ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> firstStoreAndPopTemporaryVariableBytecode [ ^ 104 ] -{ #category : #'helper-interpret' } +{ #category : 'helper-interpret' } VMByteCodesTest >> interpret: aBlock [ aBlock value ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> interpretNextBytecode [ | count | @@ -83,7 +85,7 @@ VMByteCodesTest >> interpretNextBytecode [ count = 1 ] ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> interpretWithFrame: aBlock [ callingFrame := stackBuilder addNewFrame method: @@ -95,7 +97,7 @@ VMByteCodesTest >> interpretWithFrame: aBlock [ self interpret: aBlock ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> pushTempTest: index [ stackBuilder addNewFrame tempAt: index put: (memory integerObjectOf: 42). @@ -109,13 +111,13 @@ VMByteCodesTest >> pushTempTest: index [ ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> pushTemporaryVariableBytecodeAt: offset [ ^ self firstPushTemporaryVariableBytecode + offset. ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> pushThisContextTopFrame [ self interpretWithFrame: [ interpreter pushActiveContextBytecode ]. @@ -126,14 +128,14 @@ VMByteCodesTest >> pushThisContextTopFrame [ withInterpreter: interpreter ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> setUp [ super setUp. self installFloat64RegisterClass ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ stackBuilder addNewFrame @@ -149,12 +151,12 @@ VMByteCodesTest >> storeAndPopTemporaryIntoTempTest: index [ intoTemporary: index ] -{ #category : #'helpers-bytecode-table' } +{ #category : 'helpers-bytecode-table' } VMByteCodesTest >> storeAndPopTemporaryVariableBytecodeAt: anInteger [ ^ self firstStoreAndPopTemporaryVariableBytecode + anInteger ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ | oldMaybeSenderContext newMaybeSenderContext | self interpretWithFrame: [ interpreter pushActiveContextBytecode. ]. @@ -164,7 +166,7 @@ VMByteCodesTest >> testAccessingSenderOfContextShouldReturnContextOfSender [ self assert: oldMaybeSenderContext equals: newMaybeSenderContext ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testAddVectorBytecode [ | index v0 v1 result firstTerm size | @@ -191,7 +193,7 @@ VMByteCodesTest >> testAddVectorBytecode [ ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testArraySumUsingVectorBytecode [ | cm x y result simulatedMethod z | @@ -233,7 +235,7 @@ VMByteCodesTest >> testArraySumUsingVectorBytecode [ ] -{ #category : #'tests-complex' } +{ #category : 'tests-complex' } VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMethod [ | class object objectToPutInSlot attemptToAssignMethod attemptToAssignSelector aMethodDictionary | @@ -277,7 +279,7 @@ VMByteCodesTest >> testBytecodePopIntoReceiverWithReadOnlySendsAttemptToAssignMe self assert: topFrame method equals: attemptToAssignMethod ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ | v0 v1 result method | @@ -304,7 +306,7 @@ VMByteCodesTest >> testCallMappedInlinedPrimitiveBytecode [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 6.0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testDuplicateStackTop [ stackBuilder addNewFrame ; buildStack. @@ -321,7 +323,7 @@ VMByteCodesTest >> testDuplicateStackTop [ ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPopStackTopBytecode [ stackBuilder addNewFrame ; buildStack. @@ -337,7 +339,7 @@ VMByteCodesTest >> testPopStackTopBytecode [ ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testPushArrayToRegisterBytecode [ | array index result | @@ -362,7 +364,7 @@ VMByteCodesTest >> testPushArrayToRegisterBytecode [ ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantFalseBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -370,7 +372,7 @@ VMByteCodesTest >> testPushConstantFalseBytecode [ pushed: memory falseObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantMinusOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -378,7 +380,7 @@ VMByteCodesTest >> testPushConstantMinusOneBytecode [ pushed: (memory integerObjectOf: -1) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantNilBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -386,7 +388,7 @@ VMByteCodesTest >> testPushConstantNilBytecode [ pushed: memory nilObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantOneBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -394,7 +396,7 @@ VMByteCodesTest >> testPushConstantOneBytecode [ pushed: (memory integerObjectOf: 1) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantReceiverBytecode [ | intReceiver | intReceiver := memory integerObjectOf: 42. @@ -407,7 +409,7 @@ VMByteCodesTest >> testPushConstantReceiverBytecode [ pushed: intReceiver ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantTrueBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -415,7 +417,7 @@ VMByteCodesTest >> testPushConstantTrueBytecode [ pushed: memory trueObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantTwoBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -423,7 +425,7 @@ VMByteCodesTest >> testPushConstantTwoBytecode [ pushed: (memory integerObjectOf: 2) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushConstantZeroBytecode [ stackBuilder addNewFrame ; buildStack. self @@ -431,74 +433,74 @@ VMByteCodesTest >> testPushConstantZeroBytecode [ pushed: (memory integerObjectOf: 0) ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp0 [ self pushTempTest: 0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp1 [ self pushTempTest: 1 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp10 [ self pushTempTest: 10 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp11 [ self pushTempTest: 11 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp2 [ self pushTempTest: 2 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp3 [ self pushTempTest: 3 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp4 [ self pushTempTest: 4 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp5 [ self pushTempTest: 5 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp6 [ self pushTempTest: 6 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp7 [ self pushTempTest: 7 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp8 [ self pushTempTest: 8 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testPushTemp9 [ self pushTempTest: 9 ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextIsContext [ self pushThisContextTopFrame. self assert: (memory isContext: interpreter stackTop). ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ self pushThisContextTopFrame. @@ -508,7 +510,7 @@ VMByteCodesTest >> testPushThisContextPushesValidInstructionPointer [ equals: (interpreter frameCallerFP: interpreter framePointer) ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ self pushThisContextTopFrame. @@ -519,28 +521,28 @@ VMByteCodesTest >> testPushThisContextPushesValidPointerToTheFramePointer [ equals: interpreter framePointer ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextPushesValidReceiver [ self pushThisContextTopFrame. self assert: topFrame receiver equals: context receiver ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameContext: interpreter framePointer) equals: interpreter stackTop. ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextSetFlagContextToFrame [ self pushThisContextTopFrame. self assert: (interpreter frameHasContext: interpreter framePointer). ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ | previousTop newTop | self interpretWithFrame: [ @@ -552,7 +554,7 @@ VMByteCodesTest >> testPushThisContextTwiceMarriesOnce [ self assert: newTop equals: previousTop. ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testReturnFalse [ "We need to return to a method. @@ -568,7 +570,7 @@ VMByteCodesTest >> testReturnFalse [ returned: memory falseObject ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testReturnTrue [ "We need to return to a method. @@ -584,7 +586,7 @@ VMByteCodesTest >> testReturnTrue [ returned: memory trueObject ] -{ #category : #'tests-pushThisContext' } +{ #category : 'tests-pushThisContext' } VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ | topFrameContext | self interpretWithFrame: [ @@ -598,7 +600,7 @@ VMByteCodesTest >> testReturnsMarriedFrameWidowsContext [ self assert: (interpreter isWidowedContext: topFrameContext) ] -{ #category : #'tests-send' } +{ #category : 'tests-send' } VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ | selectorOop aMethod aMethodToActivate receiver receiverClass aMethodDictionary arg1 arg2 | @@ -645,47 +647,47 @@ VMByteCodesTest >> testSendMessageWithTwoArgumentsMakeAFrame [ self assert: interpreter stackTop equals: receiver ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary0 [ self storeAndPopTemporaryIntoTempTest: 0 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary1 [ self storeAndPopTemporaryIntoTempTest: 1 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary2 [ self storeAndPopTemporaryIntoTempTest: 2 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary3 [ self storeAndPopTemporaryIntoTempTest: 3 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary4 [ self storeAndPopTemporaryIntoTempTest: 4 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary5 [ self storeAndPopTemporaryIntoTempTest: 5 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary6 [ self storeAndPopTemporaryIntoTempTest: 6 ] -{ #category : #'tests-push-simple' } +{ #category : 'tests-push-simple' } VMByteCodesTest >> testStoreAndPopTemporary7 [ self storeAndPopTemporaryIntoTempTest: 7 ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ | register index array result | @@ -716,7 +718,7 @@ VMByteCodesTest >> testStoreRegisterIntoArrayBytecode [ self assert: (memory fetchFloat64: 3 ofObject: array) equals: 6.0. ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMByteCodesTest >> testSubVectorBytecode [ | index vector0 vector1 result | diff --git a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st index 517ef6edc4..1abed9f7a5 100644 --- a/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMBytecodeMethod.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMBytecodeMethod, - #superclass : #Object, + #name : 'VMBytecodeMethod', + #superclass : 'Object', #instVars : [ 'virtualMachine', 'methodOop' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop [ ^ self new @@ -17,13 +19,13 @@ VMBytecodeMethod class >> newOnInterpreter: virtualMachine methodOop: methodOop yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> at: index [ ^ virtualMachine objectMemory fetchByte: index - 1 "0 based" ofObject: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> disassemble [ | symbolicBytecodes | symbolicBytecodes := SymbolicBytecodeBuilder decode: self. @@ -31,52 +33,52 @@ VMBytecodeMethod >> disassemble [ ' join: (symbolicBytecodes collect: [ :sbc | sbc description ]) ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> encoderClass [ ^ EncoderForSistaV1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> endPC [ ^ virtualMachine objectMemory bytesInObject: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> initialPC [ "Answer the program counter for the receiver's first bytecode." ^ (self numLiterals + 1) * virtualMachine objectMemory wordSize + 1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> literalAt: anInteger [ ^ 'literal key' -> 'literal?' ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> methodOop [ ^ methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> methodOop: anObject [ methodOop := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> numLiterals [ ^ virtualMachine objectMemory literalCountOf: methodOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMBytecodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st index 05a1565127..800da59986 100644 --- a/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCodeCompactionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMCodeCompactionTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMCodeCompactionTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod [ "Create the root context with a valid method" @@ -32,7 +34,7 @@ VMCodeCompactionTest >> createBaseFrameWithMachineCodeMethod: aMachineCodeMethod ] -{ #category : #utils } +{ #category : 'utils' } VMCodeCompactionTest >> createFillingMethods: anInteger [ | firstMethod | @@ -45,7 +47,7 @@ VMCodeCompactionTest >> createFillingMethods: anInteger [ ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> fillCodeZone [ | aMethod | @@ -61,13 +63,13 @@ VMCodeCompactionTest >> fillCodeZone [ ] -{ #category : #running } +{ #category : 'running' } VMCodeCompactionTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -110,7 +112,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMethodWhenUsingPrimCallMayCallBackShouldNotCrashFromMachineCodeMethod [ | firstMethod compactMethod callerMethod | @@ -149,7 +151,7 @@ VMCodeCompactionTest >> testCompactDuringInterpreterPrimitiveThatMovesCurrentMet ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToTheBeginning [ | firstMethod compactMethod methodOop | @@ -172,7 +174,7 @@ VMCodeCompactionTest >> testCompactingAnUnusedMethodCompactsRemainingMethodToThe ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ | firstMethod cogMethod methodOop | @@ -206,7 +208,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateInSendsLiterals [ equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ | firstMethod cogMethod methodOop | @@ -239,7 +241,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateLiterals [ equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ | firstMethod cogMethod methodOop | @@ -272,7 +274,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMethodReference [ equals: (interpreter cogMethodOf: methodOop) ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ | firstMethod callerMethodOop calleeCogMethod selector callerCogMethod calleeMethodOop | @@ -322,7 +324,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocateMonomorphicCallsite [ equals: (interpreter cogMethodOf: calleeMethodOop) asInteger + cogit entryOffset ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -419,7 +421,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICCallsite [ equals: cogit ceCPICMissTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -509,7 +511,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICInterpreterAbo equals: cogit cePICAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsite [ "This method sets up a method A that is linked to a polymorphic PIC linked to B and C. @@ -583,7 +585,7 @@ VMCodeCompactionTest >> testCompactingShouldRelocatePolymorphicPICMNUAbortCallsi equals: cogit cePICAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMCodeCompactionTest >> testRelocatingAMethodDoesNotAffectTheFrameCreationPushes [ | firstMethod compactMethod methodOop readOnlyObject | diff --git a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st index 8f8e44af1f..1ba5d89ee9 100644 --- a/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMCogitHelpersTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMCogitHelpersTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMCogitHelpersTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'checkIsSmallInteger', 'checkNotSmallInteger' @@ -9,10 +9,12 @@ Class { 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -22,7 +24,7 @@ VMCogitHelpersTest >> assertIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -32,7 +34,7 @@ VMCogitHelpersTest >> assertNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 0 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -42,7 +44,7 @@ VMCogitHelpersTest >> denyIsInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ machineSimulator classRegisterValue: anInteger. @@ -52,14 +54,14 @@ VMCogitHelpersTest >> denyIsNotInSmallIntegerRange: anInteger [ self assert: machineSimulator classRegisterValue equals: 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> runUntilReturnFrom: anAddress [ self prepareCall. super runUntilReturnFrom: anAddress ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> setUp [ super setUp. @@ -90,7 +92,7 @@ VMCogitHelpersTest >> setUp [ ]. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ self assertNotInSmallIntegerRange: memory maxSmallInteger + 1. @@ -101,14 +103,14 @@ VMCogitHelpersTest >> testCheckNotSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckNotSmallIntegerWithValidSmallIntegers [ self denyIsNotInSmallIntegerRange: 0. self denyIsNotInSmallIntegerRange: memory maxSmallInteger. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ self denyIsInSmallIntegerRange: memory maxSmallInteger + 1. @@ -119,7 +121,7 @@ VMCogitHelpersTest >> testCheckSmallIntegerWithNonValidSmallIntegers [ ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMCogitHelpersTest >> testCheckSmallIntegerWithValidSmallIntegers [ self assertIsInSmallIntegerRange: 0. diff --git a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st index 0daae71c73..a12f0e88c7 100644 --- a/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMCompiledCodeBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMCompiledCodeBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMCompiledCodeBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'slotSize', 'numberOfTemporaries', @@ -15,16 +15,18 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> address [ ^ method ] -{ #category : #deprecated } +{ #category : 'deprecated' } VMCompiledCodeBuilder >> build [ self @@ -34,14 +36,14 @@ VMCompiledCodeBuilder >> build [ ^ self buildMethod ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> buildMethod [ self instantiateMethod. self fillMethod. ^ method ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> buildMethodHeader [ ^ (numberOfArguments bitShift: 24) @@ -51,7 +53,7 @@ VMCompiledCodeBuilder >> buildMethodHeader [ + (isPrimitive asBit << 16) ] -{ #category : #helper } +{ #category : 'helper' } VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ | methodHeader | "1 based" @@ -61,17 +63,17 @@ VMCompiledCodeBuilder >> bytecodeAt: anIndex forMethod: aMethodOop [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> bytecodes [ ^ bytecodes ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> bytecodes: anObject [ bytecodes := anObject ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> classIndexToUse [ | newClass | memory nilObject = (memory splObj: 16) ifTrue: [ @@ -88,7 +90,7 @@ VMCompiledCodeBuilder >> classIndexToUse [ ^ memory classTagForClass: (memory splObj: 16) ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self newMethod. @@ -99,7 +101,7 @@ VMCompiledCodeBuilder >> fillFromPharoMethod: aCompiledMethod [ self fillLiteralsFromPharo: aCompiledMethod allLiterals ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ originalLiterals := pharoLiterals copy. @@ -107,14 +109,14 @@ VMCompiledCodeBuilder >> fillLiteralsFromPharo: pharoLiterals [ ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> fillMethod [ self putHeaderInMethod. self putLiteralInMethod. self putBytecodesInMethod. ] -{ #category : #initialization } +{ #category : 'initialization' } VMCompiledCodeBuilder >> initialize [ bytecodes := #[1 2 3 4 5 6 7 8 9 0]. literals := OrderedCollection new. @@ -129,7 +131,7 @@ VMCompiledCodeBuilder >> initialize [ slotSize := nil. ] -{ #category : #inspecting } +{ #category : 'inspecting' } VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ @@ -157,7 +159,7 @@ VMCompiledCodeBuilder >> inspectMethodIn: aBuilder [ yourself ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> instantiateMethod [ slotSize := literals size + (bytecodes size / memory wordSize) ceiling @@ -170,73 +172,73 @@ VMCompiledCodeBuilder >> instantiateMethod [ method ifNotNil: [ memory fillObj: method numSlots: slotSize with: memory nilObject ]. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isPrimitive [ ^ isPrimitive ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isPrimitive: anObject [ isPrimitive := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isSmall [ ^ isSmall ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> isSmall: anObject [ isSmall := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literalAt: anIndex put: anOop [ self collection: literals at: anIndex put: anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literals [ ^ literals ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> literals: anObject [ literals := anObject. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> method [ ^ method ] -{ #category : #building } +{ #category : 'building' } VMCompiledCodeBuilder >> newMethod [ self initialize. ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfArguments [ ^ numberOfArguments ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfArguments: anObject [ numberOfArguments := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfTemporaries [ ^ numberOfTemporaries ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> numberOfTemporaries: anObject [ numberOfTemporaries := anObject ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putBytecodesInMethod [ bytecodes doWithIndex:[ :aBytecode :anIndex | memory storeByte: @@ -249,7 +251,7 @@ VMCompiledCodeBuilder >> putBytecodesInMethod [ ] ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putHeaderInMethod [ memory storePointer: 0 ofObject: method @@ -257,7 +259,7 @@ VMCompiledCodeBuilder >> putHeaderInMethod [ ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> putLiteralInMethod [ originalLiterals doWithIndex: [ :aLiteral :anIndex | @@ -275,7 +277,7 @@ VMCompiledCodeBuilder >> putLiteralInMethod [ memory storePointer: anIndex ofObject: method withValue: aLiteral ] ] -{ #category : #filling } +{ #category : 'filling' } VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ "In the case of CompiledBlocks we need to put the outerCode object (the last literal). @@ -284,7 +286,7 @@ VMCompiledCodeBuilder >> setOuterCode: aVMCompiledCodeBuilder [ literals at: literals size put: aVMCompiledCodeBuilder address ] -{ #category : #accessing } +{ #category : 'accessing' } VMCompiledCodeBuilder >> slotSize [ "Do not set by hand !" ^ slotSize diff --git a/smalltalksrc/VMMakerTests/VMContext.class.st b/smalltalksrc/VMMakerTests/VMContext.class.st index af9973c650..4458533aba 100644 --- a/smalltalksrc/VMMakerTests/VMContext.class.st +++ b/smalltalksrc/VMMakerTests/VMContext.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMContext, - #superclass : #Object, + #name : 'VMContext', + #superclass : 'Object', #instVars : [ 'contextOop', 'interpreter' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMObjectIndices' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^ self new contextOop: anInteger; @@ -19,7 +21,7 @@ VMContext class >> newOnContext: anInteger withInterpreter: aStackInterpreterSim yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> caller [ | senderContext | @@ -35,12 +37,12 @@ VMContext >> caller [ ^ VMContext newOnContext: senderContext withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> contextOop: anInteger [ contextOop := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> description [ | homeContextOop method selector | homeContextOop := interpreter findHomeForContext: contextOop. @@ -50,32 +52,32 @@ VMContext >> description [ ^ interpreter stringOf: selector ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> instructionPointer [ ^interpreter objectMemory fetchPointer: InstructionPointerIndex ofObject: contextOop. ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : #testing } +{ #category : 'testing' } VMContext >> isMarried [ ^interpreter isStillMarriedContext: contextOop. ] -{ #category : #testing } +{ #category : 'testing' } VMContext >> isNilObject [ ^interpreter objectMemory nilObject = contextOop. ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> receiver [ ^interpreter objectMemory fetchPointer: ReceiverIndex ofObject: contextOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMContext >> sender [ ^interpreter objectMemory fetchPointer: SenderIndex ofObject: contextOop. ] diff --git a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st index 7c132fdfb8..d6324de0e9 100644 --- a/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st +++ b/smalltalksrc/VMMakerTests/VMContextAccessTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMContextAccessTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMContextAccessTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: anIndex [ | originalPC copiedPC | @@ -17,7 +19,7 @@ VMContextAccessTest >> assertContext: newContext equals: contextOop onInstVar: a self assert: copiedPC equals: originalPC ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> pushActiveContext [ interpreter pushActiveContextBytecode. @@ -25,7 +27,7 @@ VMContextAccessTest >> pushActiveContext [ ^ interpreter stackTop ] -{ #category : #running } +{ #category : 'running' } VMContextAccessTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -59,7 +61,7 @@ VMContextAccessTest >> setUp [ self initializeOldSpaceForFullGC ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectPC [ | contextOop newContext | @@ -73,7 +75,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPC [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ | contextOop newContext | @@ -91,7 +93,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectPCAfterFullGC [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ | contextOop newContext | @@ -106,7 +108,7 @@ VMContextAccessTest >> testCloningTopContextHasCorrectReceiver [ ] -{ #category : #tests } +{ #category : 'tests' } VMContextAccessTest >> testCloningTopContextHasCorrectSenderWhenItIsNil [ | contextOop newContext | diff --git a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st index a6cdd6a8b6..052c3aafb4 100644 --- a/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMDivisionInstructionTest.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMDivisionInstructionTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMDivisionInstructionTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotient remainer: remainer [ | expectedQuotient expectedRemainer | @@ -30,63 +32,63 @@ VMDivisionInstructionTest >> testDivide: numerator by: divisor quotient: quotien self assert: machineSimulator classRegisterValue equals: expectedRemainer ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 7 quotient: -1 remainer: -3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorAndDividentWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -7 quotient: 1 remainer: -3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithNegativeDivisorWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -7 quotient: -1 remainer: 3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testDivisionWithRemainerReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 7 quotient: 1 remainer: 3. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: 2 quotient: 5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: 10 by: -2 quotient: -5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorAndDivisorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: -2 quotient: 5 remainer: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMDivisionInstructionTest >> testIntegerDivisionWithNegativeNumeratorReturnsCorrectQuotientAndRemainder [ self testDivide: -10 by: 2 quotient: -5 remainer: 0. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMDivisionInstructionTest >> twoComplementOf: anInteger [ ^ self wordSize = 8 diff --git a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st index ad4a802dc9..0d7d7a6f1c 100644 --- a/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIArgumentMarshallingTest.class.st @@ -1,28 +1,29 @@ Class { - #name : #VMFFIArgumentMarshallingTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIArgumentMarshallingTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #private } +{ #category : 'private' } VMFFIArgumentMarshallingTest class >> isAbstract [ ^ self == VMFFIArgumentMarshallingTest ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self subclassResponsibility ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self subclassResponsibility ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ | newLargeInteger byteSize class | @@ -43,7 +44,7 @@ VMFFIArgumentMarshallingTest >> newLargeIntegerForValue: aValue [ ^ newLargeInteger ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorrectly [ self @@ -52,7 +53,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithCharacterArgumentIsMarshalledCorr expectedValue: 17 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrectly [ self @@ -61,7 +62,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithDoubleArgumentIsMarshalledCorrect expectedValue: 17.0 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectly [ self @@ -70,7 +71,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithFloatArgumentIsMarshalledCorrectl expectedValue: 17.0 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrectly [ self @@ -79,7 +80,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithPointerArgumentIsMarshalledCorrec expectedValue: 17 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -88,7 +89,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -97,7 +98,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesBadArgument [ self @@ -107,7 +108,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16NegativeOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesBadArgument [ self @@ -117,7 +118,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT16PositiveOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue aValueToStore | @@ -134,7 +135,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -149,7 +150,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -158,7 +159,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -167,7 +168,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesBadArgument [ | valueToStore | @@ -183,7 +184,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32NegativeOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesBadArgument [ self @@ -193,7 +194,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT32PositiveOutOfRangeProducesB ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeValueIsMarshalledCorrectly [ | aValue | @@ -205,7 +206,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargeNegativeVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -224,7 +225,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -237,7 +238,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithLargePositiveVa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -246,7 +247,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithNegativeValueIs expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -255,7 +256,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsMarshalledCorrectly [ self @@ -264,7 +265,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithNegativeValueIsM expectedValue: -42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -273,7 +274,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8ArgumentWithPositiveValueIsM expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBadArgument [ self @@ -283,7 +284,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8NegativeOutOfRangeProducesBa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBadArgument [ self @@ -293,7 +294,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithSINT8PositiveOutOfRangeProducesBa ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -310,7 +311,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructByteArrayArgumentIsMarshall expectedValue: storedValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalledCorrectly [ | oop ptr storedValue | @@ -327,7 +328,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithStructPointerArgumentIsMarshalled expectedValue: storedValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFails [ self @@ -336,7 +337,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -345,7 +346,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16ArgumentWithPositiveValueIs expectedValue: 8 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self @@ -354,7 +355,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT16WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHigherThan4BytesFails [ | aValue | @@ -369,7 +370,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -384,7 +385,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithLargePositiveVa expectedValue: 16r3FFFFFFF + 2 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFails [ self @@ -393,7 +394,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -402,7 +403,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ | valueToStore | @@ -417,7 +418,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT32WithPositiveOutOfRangeFails failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHigherThan8BytesFails [ | aValue newLargeInteger | @@ -436,7 +437,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveHi failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveValueIsMarshalledCorrectly [ | aValue | @@ -448,7 +449,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithLargePositiveVa expectedValue: aValue ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFails [ self @@ -457,7 +458,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithNegatieValueFai failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -466,7 +467,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT64ArgumentWithPositiveValueIs expectedValue: 42 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFails [ self @@ -475,7 +476,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithNegatieValueFail failsWith: PrimErrBadArgument ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsMarshalledCorrectly [ self @@ -484,7 +485,7 @@ VMFFIArgumentMarshallingTest >> testCalloutWithUINT8ArgumentWithPositiveValueIsM expectedValue: 8 ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFIArgumentMarshallingTest >> testCalloutWithUINT8WithPositiveOutOfRangeFailsWithPrimErrBadArgument [ self diff --git a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st index be1875a921..b5bcbc2d51 100644 --- a/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFICallbacksTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFICallbacksTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFICallbacksTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ interpreter push: memory nilObject. @@ -16,7 +17,7 @@ VMFFICallbacksTest >> doCallout: tfExternalFunction with: parametersArray [ ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -51,7 +52,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackInCalloutSuspendsActiveProc interpreter primitiveSameThreadCallout. ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcessesInReady [ | parametersArray tfExternalFunction callbackContext processBefore | @@ -77,7 +78,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnKeepsAllOtherProcesse self assertCollection: self readyProcesses hasSameElements: processBefore ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | @@ -104,7 +105,7 @@ VMFFICallbacksTest >> testPrimitiveSameThreadCallbackReturnResumesCalloutProcess self assert: interpreter activeProcess equals: oldActiveProcess. ] -{ #category : #'tests - callbacks' } +{ #category : 'tests - callbacks' } VMFFICallbacksTest >> testPrimitiveSameThreadReentrantCallbackRestoresCalloutProcess [ | parametersArray tfExternalFunction oldActiveProcess callbackContext numberOfCallbacks innerCallbackContext tfExternalFunction2 | diff --git a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st index 57db1b5e98..8d27531029 100644 --- a/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIHelpersTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFIHelpersTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIHelpersTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> assertPopInEmptyStackFails [ [ interpreter popSameThreadCalloutSuspendedProcess. @@ -15,7 +16,7 @@ VMFFIHelpersTest >> assertPopInEmptyStackFails [ equals: 'SameThreadCalloutSuspendedProcessStack is empty' ] ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesError [ self assert: (memory splObj: SuspendedProcessInCallout) equals: memory nilObject. @@ -23,7 +24,7 @@ VMFFIHelpersTest >> testPopSameThreadCalloutSuspendedProcessInEmptyStackRaisesEr self assertPopInEmptyStackFails ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcess [ | aProcess anotherProcess | @@ -41,7 +42,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsFirstPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -59,7 +60,7 @@ VMFFIHelpersTest >> testPushPushThenPopPopSameThreadCalloutSuspendedProcessInEmp ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcess [ | aProcess anotherProcess | @@ -75,7 +76,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsLastPushedProcessWithNilNextLink [ | aProcess anotherProcess | @@ -91,7 +92,7 @@ VMFFIHelpersTest >> testPushPushThenPopSameThreadCalloutSuspendedProcessInEmptyS ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresThePassedProcess [ | aProcess | @@ -104,7 +105,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackStoresT ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdatesNextLinkWithNil [ | aProcess | @@ -117,7 +118,7 @@ VMFFIHelpersTest >> testPushSameThreadCalloutSuspendedProcessInEmptyStackUpdates ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptyStackFails [ | aProcess | @@ -132,7 +133,7 @@ VMFFIHelpersTest >> testPushThenPopPopSameThreadCalloutSuspendedProcessInEmptySt ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsProcessWithNilInNextLink [ | aProcess | @@ -145,7 +146,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStackReturnsPushedProcess [ | aProcess | @@ -158,7 +159,7 @@ VMFFIHelpersTest >> testPushThenPopSameThreadCalloutSuspendedProcessInEmptyStack ] -{ #category : #'tests - helpers' } +{ #category : 'tests - helpers' } VMFFIHelpersTest >> testReadAddressReadsTheValidAddressValue [ | anExternalAddress | diff --git a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st index 03182807ca..a3aefe8ff7 100644 --- a/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIReturnMarshallingTest.class.st @@ -1,22 +1,23 @@ Class { - #name : #VMFFIReturnMarshallingTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFIReturnMarshallingTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #private } +{ #category : 'private' } VMFFIReturnMarshallingTest class >> isAbstract [ ^ self = VMFFIReturnMarshallingTest ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ self subclassResponsibility ] -{ #category : #utils } +{ #category : 'utils' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedLargeIntegerValue: expectedValue [ self @@ -36,7 +37,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn expectedSmalltalkValue: expectedValue [ self @@ -50,7 +51,7 @@ VMFFIReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnVal ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteArray [ | valueToReturn | @@ -72,7 +73,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningAnStructPushesAByteAr ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatInStack [ self @@ -84,7 +85,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningDoublePushSmallFloatI ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatInStack [ self @@ -96,7 +97,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningFloatPushSmallFloatIn ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExternalAddress [ @@ -110,7 +111,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningPointerPushesAnExtern ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallInteger [ self @@ -119,7 +120,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeInteger [ | value | @@ -131,7 +132,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallInteger [ | value | @@ -145,7 +146,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeInteger [ self @@ -154,7 +155,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallInteger [ self @@ -163,7 +164,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger [ self @@ -172,7 +173,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningSINT8PushSmallInteger expectedSmalltalkValue: INT8_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallInteger [ self @@ -181,7 +182,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT16PushSmallIntege expectedSmalltalkValue: INT16_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeInteger [ | value | @@ -193,7 +194,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushLargeIntege expectedLargeIntegerValue: INT32_MAX - 1 ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallInteger [ | value | @@ -207,7 +208,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT32PushSmallIntege expectedSmalltalkValue: value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeInteger [ self @@ -216,7 +217,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushLargeIntege expectedLargeIntegerValue: INT64_MAX ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallInteger [ self @@ -225,7 +226,7 @@ VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT64PushSmallIntege expectedSmalltalkValue: memory maxSmallInteger ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIReturnMarshallingTest >> testPrimitiveCalloutReturningUINT8PushSmallInteger [ self diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st index d18e6ecd88..ba96a06ec5 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadArgumentMarshallingTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadArgumentMarshallingTest, - #superclass : #VMFFIArgumentMarshallingTest, - #category : #VMMakerTests + #name : 'VMFFISameThreadArgumentMarshallingTest', + #superclass : 'VMFFIArgumentMarshallingTest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #implementation } +{ #category : 'implementation' } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ | parametersArray tfExternalFunction savedValue | @@ -28,7 +29,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: savedValue equals: expectedValue. ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ | parametersArray tfExternalFunction savedValue | @@ -52,7 +53,7 @@ VMFFISameThreadArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumen self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : #'tests - parameters marshalling' } +{ #category : 'tests - parameters marshalling' } VMFFISameThreadArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ | parametersArray tfExternalFunction functionCalled | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st index 33727d32a7..4a8ee9389a 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadCalloutTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadCalloutTest, - #superclass : #VMAbstractFFITest, - #category : #VMMakerTests + #name : 'VMFFISameThreadCalloutTest', + #superclass : 'VMAbstractFFITest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - callouts' } +{ #category : 'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProcess [ | parametersArray tfExternalFunction oldActiveProcess | @@ -24,7 +25,7 @@ VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutMaintainsActiveProce self assert: interpreter activeProcess equals: oldActiveProcess ] -{ #category : #'tests - callouts' } +{ #category : 'tests - callouts' } VMFFISameThreadCalloutTest >> testPrimitiveSameThreadCalloutShouldKeepTheNewMethodVariable [ | parametersArray tfExternalFunction oldActiveProcess callbackContext | diff --git a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st index bccbc9e6b1..71a34defe3 100644 --- a/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFISameThreadReturnMarshallingTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMFFISameThreadReturnMarshallingTest, - #superclass : #VMFFIReturnMarshallingTest, - #category : #VMMakerTests + #name : 'VMFFISameThreadReturnMarshallingTest', + #superclass : 'VMFFIReturnMarshallingTest', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ | parametersArray tfExternalFunction | @@ -26,7 +27,7 @@ VMFFISameThreadReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType aBlock value ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFISameThreadReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st index 884e602d1e..177e8e7463 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerArgumentMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerArgumentMarshallingTest, - #superclass : #VMFFIArgumentMarshallingTest, + #name : 'VMFFIWorkerArgumentMarshallingTest', + #superclass : 'VMFFIArgumentMarshallingTest', #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -11,10 +11,11 @@ Class { 'task', 'savedValue' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue expectedValue: expectedValue [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -32,7 +33,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: savedValue equals: expectedValue ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentType smalltalkValue: smalltalkValue failsWith: expectedErrorCode [ self doWorkerCallWithValue: smalltalkValue ofType: argumentType. @@ -41,7 +42,7 @@ VMFFIWorkerArgumentMarshallingTest >> doTestFuntionWithArgumentType: argumentTyp self assert: interpreter primFailCode equals: expectedErrorCode. ] -{ #category : #implementation } +{ #category : 'implementation' } VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofType: argumentType [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. @@ -77,21 +78,21 @@ VMFFIWorkerArgumentMarshallingTest >> doWorkerCallWithValue: smalltalkValue ofTy interpreter primitiveWorkerCallout ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerArgumentMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #running } +{ #category : 'running' } VMFFIWorkerArgumentMarshallingTest >> setUp [ super setUp. interpreter libFFI testWorker clear ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerArgumentMarshallingTest >> testCalloutWithoutArgumentsMarshallsCorrectly [ aFunctionBlock := [ :anArgument | self fail: 'It should enqueue it, not execute it' ]. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st index 10fc6eeb4f..0cabd48fa0 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerCalloutTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerCalloutTest, - #superclass : #VMAbstractFFITest, + #name : 'VMFFIWorkerCalloutTest', + #superclass : 'VMAbstractFFITest', #instVars : [ 'aFunctionBlock', 'tfExternalFunction', @@ -9,16 +9,17 @@ Class { 'workerOop', 'semaphoreIndex' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes [ ^ self doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: interpreter libFFI void ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: argumentTypes returnType: returnType [ aFunctionBlock := [ self fail: 'It should enqueue it, not execute it' ]. @@ -49,21 +50,21 @@ VMFFIWorkerCalloutTest >> doWorkerCallWithArguments: smalltalkValues ofTypes: ar interpreter primitiveWorkerCallout ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutEnqueuesOnlyOneTask [ self doWorkerCallWithArguments: {} ofTypes: {}. self assert: interpreter libFFI testWorker tasks size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIfPrimitiveFails [ | previous | @@ -86,7 +87,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReleasesAllAllocatedMemoryIf self assert: interpreter allocatedElements size equals: previous. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocateReturnHolder [ self doWorkerCallWithArguments: {} ofTypes: {}. @@ -94,7 +95,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutReturningVoidDoesNotAllocate self assert: interpreter libFFI testWorker tasks first returnHolderAddress isNil ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgumentHoldersAndReturnHolderInCHeap [ | previous | @@ -116,7 +117,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithParametersAllocatesArgum self assert: interpreter allocatedElements size equals: previous + 7. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithReturnAllocateJustOne [ | previous | @@ -127,7 +128,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithRetu self assert: interpreter allocatedElements size equals: previous + 1. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutReturnDoesNotAllocate [ | previous | @@ -138,7 +139,7 @@ VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersAndWithoutR self assert: interpreter allocatedElements size equals: previous. ] -{ #category : #tests } +{ #category : 'tests' } VMFFIWorkerCalloutTest >> testPrimitiveWorkerCalloutWithoutParametersHasNilAsParametersPointer [ self doWorkerCallWithArguments: {} ofTypes: {}. diff --git a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st index 92a15a06fb..d413ef8af6 100644 --- a/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMFFIWorkerReturnMarshallingTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMFFIWorkerReturnMarshallingTest, - #superclass : #VMFFIReturnMarshallingTest, + #name : 'VMFFIWorkerReturnMarshallingTest', + #superclass : 'VMFFIReturnMarshallingTest', #instVars : [ 'tfExternalFunction', 'returnHolder', @@ -12,10 +12,11 @@ Class { 'worker', 'workerOop' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType returnValue: valueToReturn asserting: aBlock [ tfExternalFunction := self @@ -54,14 +55,14 @@ VMFFIWorkerReturnMarshallingTest >> doTestCalloutWithReturnType: aLibFFIType ret aBlock value. ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> initializationOptions [ ^ super initializationOptions , { #FEATURE_THREADED_FFI . true } ] -{ #category : #'tests - marshalling return' } +{ #category : 'tests - marshalling return' } VMFFIWorkerReturnMarshallingTest >> testPrimitiveCalloutReturningVoidPushesTheReceiver [ self diff --git a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st index 52f52916aa..dc8609f7ca 100644 --- a/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMForwardLiteralInMachineMethodTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMForwardLiteralInMachineMethodTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMForwardLiteralInMachineMethodTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMForwardLiteralInMachineMethodTest >> initStack [ self createBaseFrame. @@ -22,13 +24,13 @@ VMForwardLiteralInMachineMethodTest >> initStack [ ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMForwardLiteralInMachineMethodTest >> methodWithGlobal [ ^ Smalltalk ] -{ #category : #tests } +{ #category : 'tests' } VMForwardLiteralInMachineMethodTest >> testForwardLiteralInMethod [ | machineCodeMethod literal methodOop array literalValue selector associationClass valueClass literalKey | diff --git a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st index a0768e8b2c..7716e906f5 100644 --- a/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMFrameBuilder.class.st @@ -42,8 +42,8 @@ Configuring of the frame. When it links them, it gives the last frame the previous caller Frame, for debug purpose. " Class { - #name : #VMFrameBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMFrameBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'method', 'context', @@ -61,10 +61,12 @@ Class { 'methodBuilder', 'isSuspended' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> adaptAddressToMemory: anInteger [ anInteger = memory nilObject ifTrue: [ ^ #nilObject ]. anInteger = memory trueObject ifTrue: [ ^ #trueObject ]. @@ -73,70 +75,70 @@ VMFrameBuilder >> adaptAddressToMemory: anInteger [ "^ memory integerObjectOf: anInteger" ] -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> adaptAddressToMemoryIfInteger: anAssociation [ anAssociation value isInteger ifTrue: [ anAssociation value: (self adaptAddressToMemory: anAssociation value) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> argumentSize [ ^ argumentSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> argumentSize: anObject [ argumentSize := anObject ] -{ #category : #configuring } +{ #category : 'configuring' } VMFrameBuilder >> beSuspended [ isSuspended := true ] -{ #category : #configuring } +{ #category : 'configuring' } VMFrameBuilder >> beSuspendedAt: anInstructionPointer [ instructionPointer := anInstructionPointer. self beSuspended ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> callerFrame [ ^ callerFrame ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> callerFrame: aFrame [ callerFrame := aFrame ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> context [ ^ context ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> context: anObject [ context := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> flags [ ^ flags ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> flags: anObject [ flags := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> framePointer [ ^ myFramePointer ] -{ #category : #initialization } +{ #category : 'initialization' } VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory andMethodBuilder: aMethodBuilder [ memory := aMemory. interpreter := anInterpreter. "allow to not care if it's for a cog or stack interpreter" @@ -153,7 +155,7 @@ VMFrameBuilder >> initializeWithInterpreter: anInterpreter andMemory: aMemory an argumentSize := 0. ] -{ #category : #inspect } +{ #category : 'inspect' } VMFrameBuilder >> inspectFrameIn: aBuilder [ @@ -184,12 +186,12 @@ VMFrameBuilder >> inspectFrameIn: aBuilder [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> instructionPointer [ ^ instructionPointer ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> isMarried [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -198,7 +200,7 @@ VMFrameBuilder >> isMarried [ ifFalse: [ interpreter isStillMarriedContext: contextOop ] ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> isSingle [ | contextOop | contextOop := interpreter frameContext: myFramePointer. @@ -209,43 +211,43 @@ VMFrameBuilder >> isSingle [ interpreter isSingleContext: contextOop ] ] -{ #category : #testing } +{ #category : 'testing' } VMFrameBuilder >> isSuspended [ ^ isSuspended ] -{ #category : #context } +{ #category : 'context' } VMFrameBuilder >> marryToContext [ interpreter ensureFrameIsMarried: myFramePointer SP: myStackPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> method [ ^ method ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> method: anOop [ method := anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> previousFrameArgsSize [ ^ previousFrameArgsSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> previousFrameArgsSize: anObject [ previousFrameArgsSize := anObject ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushCurrentFramesStack [ "push to the stack all objects in the frame stack" stack do: [ :oop | interpreter push: oop ]. ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushFlags [ "Flags: this stack frame is single. I.e., it has no context object. Otherwise GC fails with an assertion looking for it in the heap" @@ -256,14 +258,14 @@ VMFrameBuilder >> pushFlags [ interpreter push: flags ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushFrame [ interpreter push: receiver. temps do: [ :oop | interpreter push: oop ]. ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> pushYourself [ self setVariablesFromCompiledMethod. @@ -286,17 +288,17 @@ VMFrameBuilder >> pushYourself [ ^ myFramePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> receiver [ ^ receiver ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> receiver: anObject [ receiver := anObject ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setArgsFromMethod [ | argNumber | argNumber := interpreter argumentCountOf: method. @@ -307,7 +309,7 @@ VMFrameBuilder >> setArgsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of arguments from the method oop.' ]] ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ "If possible, setting IP to before the first bytecode, so it is ready for fetchNextBytecode" @@ -317,7 +319,7 @@ VMFrameBuilder >> setInstructionPointerBeforeFirstBytecode [ interpreter instructionPointer: instructionPointer ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setTempsFromMethod [ | tempNumber | tempNumber := interpreter tempCountOf: method. @@ -328,7 +330,7 @@ VMFrameBuilder >> setTempsFromMethod [ ifFalse: [ self error: 'Set temporaries do not match the number of temporaries from the method oop.' ]] ] -{ #category : #building } +{ #category : 'building' } VMFrameBuilder >> setVariablesFromCompiledMethod [ (memory isCompiledMethod: method) ifFalse: [ ^ self ]. @@ -337,43 +339,43 @@ VMFrameBuilder >> setVariablesFromCompiledMethod [ self setArgsFromMethod ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stack [ ^ stack ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stack: anObject [ stack := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> stackPointer [ ^ myStackPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> tempAt: anIndex put: anOop [ self collection: temps at: anIndex put: anOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> temps [ ^ temps ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> temps: anObject [ temps := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> vmMethodBuilder [ ^ vmMethodBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } VMFrameBuilder >> vmMethodBuilder: anObject [ vmMethodBuilder := anObject diff --git a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st index 8223f68c98..2083513609 100644 --- a/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageHeaderWritingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMImageHeaderWritingTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-ImageFormat' + #name : 'VMImageHeaderWritingTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #running } +{ #category : 'running' } VMImageHeaderWritingTest >> setUp [ super setUp. @@ -18,7 +20,7 @@ VMImageHeaderWritingTest >> setUp [ self saveImage. ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ | header permanentObject | @@ -35,7 +37,7 @@ VMImageHeaderWritingTest >> testImageHeaderWithPermanentObjects [ + (memory bytesInObject: permanentObject) + 16 "PermSpace has an empty object as first object.". ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ | header | @@ -45,7 +47,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBaseAddress [ self assert: header oldBaseAddr equals: memory getMemoryMap oldSpaceStart ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ | header | @@ -55,7 +57,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectBytesLeftInOldSpace [ self assert: header freeOldSpaceInImage equals: memory bytesLeftInOldSpace ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ | header | @@ -65,7 +67,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectCodeSize [ self assert: header hdrCogCodeSize equals: interpreter unknownShortOrCodeSizeInKs ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ | header | @@ -75,7 +77,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDataSize [ self assert: header dataSize equals: memory imageSizeToWrite ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ | header | @@ -85,7 +87,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredEdenSize [ self assert: header hdrEdenBytes equals: interpreter getDesiredEdenBytes ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages [ | header | @@ -95,7 +97,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectDesiredNumberStackPages self assert: header hdrNumStackPages equals: interpreter getDesiredNumStackPages ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable [ | header | @@ -105,7 +107,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExternalSemaphoreTable self assert: header hdrMaxExtSemTabSize equals: (interpreter getMaxExtSemTabSizeSet ifTrue: [interpreter ioGetMaxExtSemTableSize] ifFalse: [0]) ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ | header | @@ -115,7 +117,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectExtraVMMemory [ self assert: header extraVMMemory equals: interpreter getExtraVMMemory ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ | header | @@ -125,7 +127,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectFirstSegmentSize [ self assert: header firstSegSize equals: memory firstSegmentBytes ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ | header | @@ -135,7 +137,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderFlags [ self assert: header headerFlags equals: interpreter getImageHeaderFlags ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ | header expectedHeaderSize | @@ -147,7 +149,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectHeaderSize [ self assert: header imageHeaderSize equals: expectedHeaderSize. ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ | header | @@ -157,7 +159,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageFormat [ self assert: header imageFormat equals: interpreter imageFormatVersion ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ | header | @@ -167,7 +169,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectImageVersion [ self assert: header imageVersion equals: interpreter getImageVersion ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ | header | @@ -177,7 +179,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectNextObjectHash [ self assert: header hdrLastHash equals: memory lastHash ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop [ | header | @@ -187,7 +189,7 @@ VMImageHeaderWritingTest >> testWritingImageWritesCorrectSpecialObjectsArrayOop self assert: header initialSpecialObjectsOop equals: memory specialObjectsOop ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONHeader [ | header readHeader | @@ -201,7 +203,7 @@ VMImageHeaderWritingTest >> testWritingSTONHeader [ self assert: readHeader equals: (self stonPretty: header). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONPermSpace [ | writtenMetadata expectedPermSpaceMetadata | @@ -222,7 +224,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpace [ self assert: writtenMetadata equals: (self stonPretty: expectedPermSpaceMetadata). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ | writtenMetadata | @@ -236,7 +238,7 @@ VMImageHeaderWritingTest >> testWritingSTONPermSpaceOnEmptySpace [ self assert: writtenMetadata equals: (self stonPretty: ComposedMetadataStruct new). ] -{ #category : #tests } +{ #category : 'tests' } VMImageHeaderWritingTest >> testWritingSTONSegment [ | header writtenHeader segmentMetadata | diff --git a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st index 260d37e29e..90e609d175 100644 --- a/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMImageReadingTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMImageReadingTest, - #superclass : #VMAbstractImageFormatTest, + #name : 'VMImageReadingTest', + #superclass : 'VMAbstractImageFormatTest', #instVars : [ 'originalNilObjectIdentityHash', 'permanentObject', 'originalPermanentObjectIdentityHash' ], - #category : #'VMMakerTests-ImageFormat' + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #query } +{ #category : 'query' } VMImageReadingTest >> dataFrom: fileName [ ^ self imageFileName asFileReference / fileName ] -{ #category : #accessing } +{ #category : 'accessing' } VMImageReadingTest >> initializationOptions [ ^ super initializationOptions , { #CloneOnGC. false. #CloneOnScavenge. false } ] -{ #category : #utilities } +{ #category : 'utilities' } VMImageReadingTest >> loadImage [ environmentBuilder := VMSimulatedEnvironmentBuilder new. @@ -41,7 +43,7 @@ VMImageReadingTest >> loadImage [ ] -{ #category : #query } +{ #category : 'query' } VMImageReadingTest >> metadataFrom: fileName [ | writtenHeader | @@ -49,7 +51,7 @@ VMImageReadingTest >> metadataFrom: fileName [ ^ STON fromString: writtenHeader ] -{ #category : #utilities } +{ #category : 'utilities' } VMImageReadingTest >> saveImage [ memory garbageCollectForSnapshot. @@ -62,7 +64,7 @@ VMImageReadingTest >> saveImage [ ] -{ #category : #initialization } +{ #category : 'initialization' } VMImageReadingTest >> setUp [ super setUp. @@ -75,7 +77,7 @@ VMImageReadingTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ | obj magicNumber initSegmentSize initPermSpaceSize finalSegmentSize finalPermSpaceSize | @@ -116,7 +118,7 @@ VMImageReadingTest >> testMovingObjectsToPermSpaceReduceOldSpace [ self assert: (self metadataFrom: 'permSpace.ston') dataSize equals: finalPermSpaceSize ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testReadingSTONHeader [ | headerStruct headerFile | @@ -134,7 +136,7 @@ VMImageReadingTest >> testReadingSTONHeader [ self assert: (self stonPretty: headerStruct) equals: headerFile contents. ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self saveImage. @@ -143,7 +145,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromOldSpace [ self assert: originalNilObjectIdentityHash equals: (memory hashBitsOf: memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ "Only valid in the new format" @@ -159,7 +161,7 @@ VMImageReadingTest >> testSavedImageSavesObjectFromPermanentSpace [ ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ | firstNewSegmentSize secondNewSegmentSize obj newObj originalObjHash | @@ -200,7 +202,7 @@ VMImageReadingTest >> testSavingImageWithThreeSegmentsIsCorrectlySqueezed [ self assert: originalObjHash equals: (memory hashBitsOf: newObj) ] -{ #category : #tests } +{ #category : 'tests' } VMImageReadingTest >> testSavingPermanentSpaceObjectsInSpurFormatFails [ imageWriterClass = SpurImageWriter ifFalse: [ ^ self skip ]. diff --git a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st index 6837a56522..9ead2ebb76 100644 --- a/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st +++ b/smalltalksrc/VMMakerTests/VMInterpreterTests.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMInterpreterTests, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMInterpreterTests', + #superclass : 'VMSpurMemoryManagerTest', #pools : [ 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -23,7 +25,7 @@ VMInterpreterTests >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : #running } +{ #category : 'running' } VMInterpreterTests >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -41,7 +43,7 @@ VMInterpreterTests >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMInterpreterTests >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" diff --git a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st index cdfda82889..c1f9413e77 100644 --- a/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITPrimitiveCallingTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJITPrimitiveCallingTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJITPrimitiveCallingTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJITPrimitiveCallingTest >> initStack [ self createBaseFrame. @@ -19,7 +21,7 @@ VMJITPrimitiveCallingTest >> initStack [ ] -{ #category : #running } +{ #category : 'running' } VMJITPrimitiveCallingTest >> setUp [ super setUp. @@ -34,7 +36,7 @@ VMJITPrimitiveCallingTest >> setUp [ self createActiveProcess ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -54,7 +56,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitiveTakingTracesWithInvalidNum ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -74,7 +76,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesHasATraceForT self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -94,7 +96,7 @@ VMJITPrimitiveCallingTest >> testCallingNamedPrimitivesTakingTracesReturnsValidR self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidReceiverRunsFallbackCode [ | callingMethod | @@ -114,7 +116,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithInvalidRece ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntegerWillExecuteThePrimitiveAndReturnASmallInteger [ | callingMethod | @@ -134,7 +136,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithLargeIntege ] -{ #category : #'tests - run on smalltalk stack' } +{ #category : 'tests - run on smalltalk stack' } VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntegerReceiverReturnsSmallInteger [ | callingMethod | @@ -154,7 +156,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveInSmalltalkStackWithSmallIntege ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -174,7 +176,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveTakingTracesWithInvalidNumbersE ] -{ #category : #'tests - without tracing' } +{ #category : 'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValidResult [ | callingMethod | @@ -194,7 +196,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesReturnsValid self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - without tracing' } +{ #category : 'tests - without tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidNumbersExecutesFailbackCode [ | callingMethod | @@ -216,7 +218,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitiveWithoutTakingTracesWithInvalidN ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePrimitive [ | callingMethod | @@ -236,7 +238,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesHasATraceForThePri self assert: (interpreter primTraceLog at: 1) equals: callingMethod selector ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResults [ | callingMethod | @@ -256,7 +258,7 @@ VMJITPrimitiveCallingTest >> testCallingPrimitivesTakingTracesReturnsValidResult self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - newMethod' } +{ #category : 'tests - newMethod' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ | callingMethod | @@ -278,7 +280,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsNewMethod [ ] -{ #category : #'tests - primitiveFunctionPointer' } +{ #category : 'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -300,7 +302,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveCallSetsPrimitiveFunctionPointerW ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -334,7 +336,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithForwa ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -357,7 +359,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthWithoutFo ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -391,7 +393,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithF ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -414,7 +416,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithAccessorDepthZeroWitho ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -448,7 +450,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -471,7 +473,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveFailingWithNegativeAccessorDepthW ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -488,7 +490,7 @@ VMJITPrimitiveCallingTest >> testNamedPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : #'tests - newMethod' } +{ #category : 'tests - newMethod' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ | callingMethod | @@ -510,7 +512,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsNewMethod [ ] -{ #category : #'tests - primitiveFunctionPointer' } +{ #category : 'tests - primitiveFunctionPointer' } VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCallingCImplementation [ | callingMethod | @@ -532,7 +534,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveCallSetsPrimitiveFunctionPointerWhenCa ] -{ #category : #'tests - error code' } +{ #category : 'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -571,7 +573,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : #'tests - error code' } +{ #category : 'tests - error code' } VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -610,7 +612,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: machineSimulator framePointerRegisterValue) equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwardersDoesRetry [ | callingMethod forwarder receiver | @@ -646,7 +648,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithForwarders ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -671,7 +673,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthWithoutForward ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwardersDoesNotRetry [ | callingMethod forwarder receiver | @@ -707,7 +709,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithForwar ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutForwardersDoNotRetry [ | callingMethod | @@ -732,7 +734,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithAccessorDepthZeroWithoutFor ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithForwardersDoNotRetry [ | callingMethod forwarder receiver | @@ -768,7 +770,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithFo ] -{ #category : #'tests - retry primitive' } +{ #category : 'tests - retry primitive' } VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithoutForwardersDoNotRetry [ | callingMethod | @@ -793,7 +795,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveFailingWithNegativeAccessorDepthWithou ] -{ #category : #'tests - with tracing' } +{ #category : 'tests - with tracing' } VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ | callingMethod | @@ -810,7 +812,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveIsNotTracedIfNotCalled [ ] -{ #category : #'tests - fail fast' } +{ #category : 'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode [ | callingMethod | @@ -833,7 +835,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithPrimitiveFailExecutesFallbackCode ] -{ #category : #'tests - profile sampling' } +{ #category : 'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSample [ | callingMethod | @@ -859,7 +861,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreAndNextTickTakesSa self assert: interpreter nextProfileTick equals: 0 ] -{ #category : #'tests - profile sampling' } +{ #category : 'tests - profile sampling' } VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoesNotTakeSample [ | callingMethod | @@ -883,7 +885,7 @@ VMJITPrimitiveCallingTest >> testPrimitiveWithProfileSemaphoreButNotNextTickDoes self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42) ] -{ #category : #'tests - fail fast' } +{ #category : 'tests - fail fast' } VMJITPrimitiveCallingTest >> testPrimitiveWithoutFunctionExecutesFallbackCode [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st index 95cae51655..edbb279a46 100644 --- a/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJITVMPrimitiveTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMJITVMPrimitiveTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJITVMPrimitiveTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> setUp [ super setUp. @@ -14,7 +16,7 @@ VMJITVMPrimitiveTest >> setUp [ self createBaseFrame ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod [ | methodToXray target | @@ -33,7 +35,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayPreviouslyCompiledFramelessMethod self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0111) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ | methodToXray target | @@ -52,7 +54,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldCompile [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0001) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ | methodToXray target | @@ -70,7 +72,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayShouldNotCompile [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ | methodToXray target | @@ -89,7 +91,7 @@ VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasCompiled [ self assert: ((memory integerValueOf: interpreter stackTop) anyMask: 2r0010) ] -{ #category : #'tests - primitiveMethodXray' } +{ #category : 'tests - primitiveMethodXray' } VMJITVMPrimitiveTest >> testPrimitiveMethodXRayWasNotCompiled [ | methodToXray target | diff --git a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st index 0c20ab755d..5e0e973c35 100644 --- a/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st +++ b/smalltalksrc/VMMakerTests/VMJistMethodTestObject.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMJistMethodTestObject, - #superclass : #Object, + #name : 'VMJistMethodTestObject', + #superclass : 'Object', #instVars : [ 'var1', 'var2', @@ -132,10 +132,12 @@ Class { 'var128', 'var129' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #initialization } +{ #category : 'initialization' } VMJistMethodTestObject >> initialize [ super initialize. var1 := Array new. diff --git a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st index c2f21e9f2f..4eec1ca80e 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJitMethodTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJitMethodTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ | tmp1 tmp2 | @@ -19,14 +21,14 @@ VMJitMethodTest >> addVector: arg1 with: arg2 intoVector: arg3 [ ^ arg3 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> comparingSmallIntegers: aBitmap [ aBitmap size = 32768 ifTrue: [ ^ 17 ]. ^ 23 ] -{ #category : #accessing } +{ #category : 'accessing' } VMJitMethodTest >> filter: aGlyphForm [ "This method is here only for a test" @@ -109,7 +111,7 @@ VMJitMethodTest >> filter: aGlyphForm [ ^answer ] -{ #category : #helpers } +{ #category : 'helpers' } VMJitMethodTest >> initStack [ self createBaseFrame. @@ -124,13 +126,13 @@ VMJitMethodTest >> initStack [ ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> initialCodeSize [ ^ 16 * 1024 ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> setUp [ super setUp. @@ -138,7 +140,7 @@ VMJitMethodTest >> setUp [ self installFloat64RegisterClass ] -{ #category : #running } +{ #category : 'running' } VMJitMethodTest >> setUpTrampolines [ super setUpTrampolines. @@ -150,7 +152,7 @@ VMJitMethodTest >> setUpTrampolines [ cogit ceReturnToInterpreterTrampoline: (self compileTrampoline: [ cogit Stop ] named:#ceReturnToInterpreterTrampoline). ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ | callingMethod parameter aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -185,7 +187,7 @@ VMJitMethodTest >> testComparingSmallIntegersThatNotFit [ equals: 17 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ | callingMethod cm x y z | @@ -259,7 +261,7 @@ VMJitMethodTest >> testJitCompiledFloat32VectorAddition [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ | callingMethod cm x y z firstTerm size | @@ -331,7 +333,7 @@ VMJitMethodTest >> testJitCompiledFloat64VectorAddition [ self assert: (memory fetchFloat64: 1 ofObject: z) equals: 22.0 ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ | callingMethod | @@ -340,7 +342,7 @@ VMJitMethodTest >> testMixedInlinedLiteralsSmoteTest [ self deny: callingMethod address equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodTest >> testOnStackReplacementForLongRunningVectorAddMethod [ | callingMethod cm x y z firstTerm size frame | diff --git a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st index 02dd237dfe..b80dc4405f 100644 --- a/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJitMethodWithImmutabilityTest.class.st @@ -1,26 +1,28 @@ Class { - #name : #VMJitMethodWithImmutabilityTest, - #superclass : #VMPrimitiveCallAbstractTest, + #name : 'VMJitMethodWithImmutabilityTest', + #superclass : 'VMPrimitiveCallAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMJitMethodWithImmutabilityTest >> initialCodeSize [ ^ 32 * 1024 ] -{ #category : #initialization } +{ #category : 'initialization' } VMJitMethodWithImmutabilityTest >> setUp [ super setUp. self initializeSpecialSelectors ] -{ #category : #initialization } +{ #category : 'initialization' } VMJitMethodWithImmutabilityTest >> setUpTrampolines [ super setUpTrampolines. @@ -30,7 +32,7 @@ VMJitMethodWithImmutabilityTest >> setUpTrampolines [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitMethodWithImmutabilityTest >> testCompileMethodWithALotOfAssignmentsToInstanceVariables [ | callingMethod | diff --git a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st index 810ddfe30c..97a1aa0b1e 100644 --- a/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st +++ b/smalltalksrc/VMMakerTests/VMJitSimdBytecode.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMJitSimdBytecode, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJitSimdBytecode', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #running } +{ #category : 'running' } VMJitSimdBytecode >> jitOptions [ ^ super jitOptions @@ -18,7 +20,7 @@ VMJitSimdBytecode >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -60,7 +62,7 @@ VMJitSimdBytecode >> testAddVector32CopiesArraySumIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -95,7 +97,7 @@ VMJitSimdBytecode >> testAddVectorCopiesArraySumIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -130,7 +132,7 @@ VMJitSimdBytecode >> testAddVectorPushesArraySumIntoSimulatedStack [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ | endInstruction primitiveAddress array register | @@ -161,7 +163,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterCopiesArrayChunkIntoVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ | endInstruction primitiveAddress array entry | @@ -191,7 +193,7 @@ VMJitSimdBytecode >> testPushArrayToRegisterPushesArrayChunkIntoSimulatedStack [ self assert: (entry registerr) equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegisterContent [ | endInstruction primitiveAddress array | @@ -222,7 +224,7 @@ VMJitSimdBytecode >> testStoreRegisterIntoArrayReplacesArrayElementsWithRegister self assert: (memory fetchFloat64: 1 ofObject: array) equals: 4.0. ] -{ #category : #tests } +{ #category : 'tests' } VMJitSimdBytecode >> testSubVectorStoreResultIntoVectorRegister [ | endInstruction primitiveAddress array register | diff --git a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st index 88d625ab18..beaecb6e12 100644 --- a/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedBoxFloatPrimitivesTest.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMJittedBoxFloatPrimitivesTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedBoxFloatPrimitivesTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogAbstractRegisters', 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> setUp [ super setUp. @@ -22,7 +24,7 @@ VMJittedBoxFloatPrimitivesTest >> setUp [ named: 'ceCheckFeatures') ] ] -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> testAsFloat [ cogit receiverTags: memory smallIntegerTag. @@ -36,7 +38,7 @@ VMJittedBoxFloatPrimitivesTest >> testAsFloat [ equals: 27.0 ] -{ #category : #tests } +{ #category : 'tests' } VMJittedBoxFloatPrimitivesTest >> testAsFloatWhenThereIsNotSpaceFailsPrimitive [ | stop | diff --git a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st index 96c2a4c216..9ecec6897e 100644 --- a/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedByteArrayAccessPrimitiveTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedByteArrayAccessPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedByteArrayAccessPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'receiver', 'targetReceiver' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMJittedByteArrayAccessPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: bitSize [ ({ 8. 16. 32. 64 } includes: bitSize) ifFalse: [ self fail ]. @@ -42,7 +44,7 @@ VMJittedByteArrayAccessPrimitiveTest >> assertEqualsTo: expectedValue bitSize: b ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ | endPart | @@ -54,7 +56,7 @@ VMJittedByteArrayAccessPrimitiveTest >> genPrimitive: aString [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is the same receiver" @@ -68,7 +70,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiver [ targetReceiver := receiver ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: bitSize [ | complementedValue | @@ -90,7 +92,7 @@ VMJittedByteArrayAccessPrimitiveTest >> newReceiverWithValue: aValue ofBitSize: memory storeLong64: 0 ofObject: targetReceiver withValue: complementedValue ]. ] -{ #category : #'tests - load booleans' } +{ #category : 'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ | expectedValue | @@ -111,7 +113,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsFalse [ ] -{ #category : #'tests - load booleans' } +{ #category : 'tests - load booleans' } VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ | expectedValue | @@ -132,7 +134,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadBoolean8LoadsTrue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ | expectedValue | @@ -153,7 +155,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar16LoadsValue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ | expectedValue | @@ -174,7 +176,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar32LoadsValue [ ] -{ #category : #'tests - load chars' } +{ #category : 'tests - load chars' } VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ | expectedValue | @@ -195,7 +197,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadChar8LoadsValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ | expectedValue | @@ -216,7 +218,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat32LoadsValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ | expectedValue | @@ -237,7 +239,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsBoxedValue [ ] -{ #category : #'tests - load floats' } +{ #category : 'tests - load floats' } VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ | expectedValue | @@ -258,7 +260,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testLoadFloat64LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue [ | expectedValue | @@ -279,7 +281,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue [ | expectedValue | @@ -300,7 +302,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt16LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue [ | expectedValue | @@ -321,7 +323,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue [ | expectedValue | @@ -342,7 +344,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt32LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue [ | expectedValue | @@ -363,7 +365,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue [ | expectedValue | @@ -384,7 +386,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt64LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue [ | expectedValue | @@ -405,7 +407,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsNegativeValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue [ | expectedValue | @@ -426,7 +428,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadInt8LoadsPositiveValue ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ | expectedValue | @@ -447,7 +449,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadPointerLoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ | expectedValue | @@ -468,7 +470,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt16LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ | expectedValue | @@ -489,7 +491,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt32LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ | expectedValue | @@ -510,7 +512,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt64LoadsValue [ ] -{ #category : #'tests - load integers' } +{ #category : 'tests - load integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ | expectedValue | @@ -531,7 +533,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveLoadUInt8LoadsValue [ ] -{ #category : #'tests - store booleans' } +{ #category : 'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ self genPrimitive: #StoreBoolean8. @@ -547,7 +549,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresFalse [ ] -{ #category : #'tests - store booleans' } +{ #category : 'tests - store booleans' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ self genPrimitive: #StoreBoolean8. @@ -563,7 +565,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreBoolean8StoresTrue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ | expectedValue | @@ -583,7 +585,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar16StoresValue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ | expectedValue | @@ -603,7 +605,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar32StoresValue [ ] -{ #category : #'tests - store chars' } +{ #category : 'tests - store chars' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ | expectedValue | @@ -623,7 +625,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreChar8StoresValue [ ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ | expectedValue | @@ -642,7 +644,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValue [ ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNotOverwriteAfter [ | expectedValue | @@ -661,7 +663,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat32StoresValueDoNo self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloatValue [ | expectedValue | @@ -680,7 +682,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresBoxedFloa ] -{ #category : #'tests - store floats' } +{ #category : 'tests - store floats' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ | expectedValue | @@ -699,7 +701,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreFloat64StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeValue [ | expectedValue | @@ -719,7 +721,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValue [ | expectedValue | @@ -739,7 +741,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -761,7 +763,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt16StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeValue [ | expectedValue | @@ -781,7 +783,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValue [ | expectedValue | @@ -801,7 +803,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveValueWithoutOverwriting [ | expectedValue | @@ -821,7 +823,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt32StoresPositiveVal self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeValue [ | expectedValue | @@ -841,7 +843,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresNegativeVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveValue [ | expectedValue | @@ -861,7 +863,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt64StoresPositiveVal ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValue [ | expectedValue | @@ -881,7 +883,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresNegativeValu ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValue [ | expectedValue | @@ -901,7 +903,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValueWithoutOverwritting [ | expectedValue | @@ -923,7 +925,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreInt8StoresPositiveValu self assert: (memory fetchByte: i ofObject: targetReceiver) equals: 16r90 + i + 1. ]. ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ | expectedValue | @@ -943,7 +945,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStorePointerStoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ | expectedValue | @@ -963,7 +965,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt16StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ | expectedValue | @@ -983,7 +985,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt32StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ | expectedValue | @@ -1004,7 +1006,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt64StoresValue [ ] -{ #category : #'tests - store integers' } +{ #category : 'tests - store integers' } VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ | expectedValue | @@ -1024,7 +1026,7 @@ VMJittedByteArrayAccessPrimitiveTest >> testPrimitiveStoreUInt8StoresValue [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedByteArrayAccessPrimitiveTest >> trailingName [ ^ 'Bytes' diff --git a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st index 47ffe36324..70c9624404 100644 --- a/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedExternalAddressAccessPrimitiveTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMJittedExternalAddressAccessPrimitiveTest, - #superclass : #VMJittedByteArrayAccessPrimitiveTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMJittedExternalAddressAccessPrimitiveTest', + #superclass : 'VMJittedByteArrayAccessPrimitiveTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #utils } +{ #category : 'utils' } VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ "In this case the target receiver is a byteArray and the receiver to the primitive is an external address pointing to it" @@ -14,7 +16,7 @@ VMJittedExternalAddressAccessPrimitiveTest >> newReceiver [ ] -{ #category : #utils } +{ #category : 'utils' } VMJittedExternalAddressAccessPrimitiveTest >> trailingName [ ^ 'ExternalAddress' diff --git a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st index 944daa4de2..d647fb061c 100644 --- a/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedGeneralPrimitiveTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedGeneralPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedGeneralPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ | lastOop | @@ -15,7 +17,7 @@ VMJittedGeneralPrimitiveTest >> lastObjectInNewSpace [ ^ lastOop ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ "32 bits images does not have SmallFloats" @@ -40,7 +42,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateFloat [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self compile: [ | jump | @@ -60,7 +62,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenImmediateSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self compile: [ | jump | @@ -80,7 +82,7 @@ VMJittedGeneralPrimitiveTest >> testCheckImmediateWhenNonImmediate [ self assert: machineSimulator receiverRegisterValue equals: 0 ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self compile: [ | jump | @@ -96,7 +98,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self compile: [ | jump | @@ -112,7 +114,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBoxedFloat [ self compile: [ | jump | @@ -128,7 +130,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualBo self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSmallInteger [ self compile: [ | jump | @@ -144,7 +146,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanEqualSm self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterBoxedFloat [ self compile: [ | jump | @@ -160,7 +162,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreaterSmallInteger [ self compile: [ | jump | @@ -176,7 +178,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanGreater self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerBoxedFloat [ self compile: [ | jump | @@ -192,7 +194,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater or equal than comparison' } +{ #category : 'tests - greater or equal than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmallerSmallInteger [ self compile: [ | jump | @@ -208,7 +210,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterOrEqualThanSmaller self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self compile: [ | jump | @@ -224,7 +226,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self compile: [ | jump | @@ -240,7 +242,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerGreaterThanSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory trueObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self compile: [ | jump | @@ -256,7 +258,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToBoxedFloat [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - equals comparison' } +{ #category : 'tests - equals comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self compile: [ | jump | @@ -272,7 +274,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotEqualsToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat [ self compile: [ | jump | @@ -288,7 +290,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanBoxedFloat self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - greater than comparison' } +{ #category : 'tests - greater than comparison' } VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallInteger [ self compile: [ | jump | @@ -304,7 +306,7 @@ VMJittedGeneralPrimitiveTest >> testCompareSmallIntegerNotGreaterThanSmallIntege self assert: machineSimulator receiverRegisterValue equals: self memory falseObject ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self compile: [ @@ -317,7 +319,7 @@ VMJittedGeneralPrimitiveTest >> testConvertIntegerToSmallInteger [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17). ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self compile: [ | jump | @@ -330,7 +332,7 @@ VMJittedGeneralPrimitiveTest >> testConvertSmallIntegerToInteger [ self assert: machineSimulator receiverRegisterValue equals: 17. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self compile: [ | jump | @@ -343,7 +345,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassIndexOfObjectObtainsClassIndex [ self assert: machineSimulator receiverRegisterValue equals: (memory classIndexOf: memory falseObject) ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self compile: [ @@ -356,7 +358,7 @@ VMJittedGeneralPrimitiveTest >> testGetClassObjectOfClassIndex [ self assert: machineSimulator arg0RegisterValue equals: classFloat ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self compile: [ @@ -370,7 +372,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding [ self compile: [ @@ -384,7 +386,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf16BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: 8 * 2 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self compile: [ @@ -398,7 +400,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 * 4 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding [ self compile: [ @@ -412,7 +414,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf32BitIndexableWithPadding self assert: machineSimulator arg0RegisterValue equals: (7 * 4 roundUpTo: self wordSize) "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ | desiredSlots | @@ -430,7 +432,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf64BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: (desiredSlots * 8 / self wordSize) ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self compile: [ @@ -444,7 +446,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexable [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self compile: [ @@ -458,7 +460,7 @@ VMJittedGeneralPrimitiveTest >> testGetNumberOfSlotsOf8BitIndexableWithPadding [ self assert: machineSimulator arg0RegisterValue equals: 8 "bytes" / self wordSize ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self compile: [ | jump | @@ -473,7 +475,7 @@ VMJittedGeneralPrimitiveTest >> testMoveFloatToFloatPointRegister [ self assert: machineSimulator doublePrecisionFloatingPointRegister0Value equals: Float fmax. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -486,7 +488,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -503,7 +505,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -520,7 +522,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -537,7 +539,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddFailsWhenSumOverflowsWhenNegativ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -548,7 +550,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -565,7 +567,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 94). ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -583,7 +585,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAddReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -265). ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -596,7 +598,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatDoesNotCompileIfReceiverTagI self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -609,7 +611,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatIsCompleteWhenReceiverTagIsS self assert: result equals: 0. "Incomplete Primitive, if the float cannot be allocated, it executes the C code" ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -629,7 +631,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatReturnsASmallFloat [ self assert: self machineSimulator receiverRegisterValue equals: (memory floatObjectOf: 42.0) ] -{ #category : #'tests - primitiveAsFloat' } +{ #category : 'tests - primitiveAsFloat' } VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmallFloat [ | endInstruction primitiveAddress | @@ -652,7 +654,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveAsFloatWith64BitIntegerReturnsASmal equals: 8589934592 asFloat ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerReceiver [ | result | @@ -665,7 +667,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -678,7 +680,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -694,7 +696,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -712,7 +714,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitAndShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerReceiver [ | result | @@ -725,7 +727,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesCompileForSmallIntegerRece self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -738,7 +740,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrDoesNotCompileForNonSmallInteg self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -754,7 +756,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldFailWithNonSmallIntegerA self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitAnd/Or' } +{ #category : 'tests - primitiveBitAnd/Or' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -772,7 +774,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitOrShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 3) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerReceiver [ | result | @@ -785,7 +787,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesCompileForSmallIntegerR self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -798,7 +800,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftDoesNotCompileForNonSmallIn self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBiggerThanSmallIntegerBits [ | primitiveAddress endInstruction | @@ -816,7 +818,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithArgumentBigge self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -832,7 +834,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithNonSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ | primitiveAddress endInstruction | @@ -850,7 +852,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldFailWithOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ | primitiveAddress endInstruction | @@ -872,7 +874,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallInteger [ equals: (memory integerObjectOf: memory maxSmallInteger >> 1 << 1) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWithShiftRight [ | primitiveAddress endInstruction | @@ -894,7 +896,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnSmallIntegerWit equals: (memory integerObjectOf: 17) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBiggerThanNumSmallIntegerBits [ | primitiveAddress endInstruction | @@ -916,7 +918,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitShiftShouldReturnZeroIfShiftIsBi equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ | primitiveAddress endInstruction | @@ -934,7 +936,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorCompileWithNegativeSmallInt [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 128) ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerReceiver [ | result | @@ -947,7 +949,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesCompileForSmallIntegerRec self assert: result equals: CompletePrimitive ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallIntegerReceiver [ | result | @@ -960,7 +962,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorDoesNotCompileForNonSmallInte self assert: result equals: UnimplementedPrimitive ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallIntegerArgument [ | primitiveAddress endInstruction | @@ -976,7 +978,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldFailWithNonSmallInteger self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag [ | primitiveAddress endInstruction | @@ -994,7 +996,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveBitXorShouldPreserveSmallIntegerTag self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ | endInstruction primitiveAddress | @@ -1012,7 +1014,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesOnFloatResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -1029,7 +1031,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1042,7 +1044,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1059,7 +1061,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1076,7 +1078,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1087,7 +1089,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1104,7 +1106,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1122,7 +1124,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1139,7 +1141,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1152,7 +1154,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideDoesNotCompileIfReceiverTagIs self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -1169,7 +1171,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsOnNonIntegerResult [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1186,7 +1188,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWhenArgumentIsNotSmallIn self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -1203,7 +1205,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1214,7 +1216,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideIsCompleteWhenReceiverTagIsSm self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1231,7 +1233,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1249,7 +1251,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsASmallIntegerWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -1266,7 +1268,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveDivideReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1279,7 +1281,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualDoesNotCompileIfReceiverTagIsN self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1296,7 +1298,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualFailsWhenArgumentIsNotSmallInt self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1307,7 +1309,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualIsCompleteWhenReceiverTagIsSma self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1324,7 +1326,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1342,7 +1344,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveEqualReturnsABooleanWhenNegativeNum self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveFormat' } +{ #category : 'tests - primitiveFormat' } VMJittedGeneralPrimitiveTest >> testPrimitiveFormatArray [ | primitiveAddress | @@ -1357,7 +1359,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveFormatArray [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: memory arrayFormat). ] -{ #category : #'tests - primitiveFormat' } +{ #category : 'tests - primitiveFormat' } VMJittedGeneralPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate [ | endInstruction primitiveAddress | @@ -1374,7 +1376,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveFormat' } +{ #category : 'tests - primitiveFormat' } VMJittedGeneralPrimitiveTest >> testPrimitiveFormatTrueObject [ | primitiveAddress | @@ -1389,7 +1391,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveFormatTrueObject [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). "According to SpurMemomyManager >> formatOfHeader:, the format of the True object is 0." ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1402,7 +1404,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualDoesNotCompileIfRecei self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1419,7 +1421,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWhenArgumentIsNo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1430,7 +1432,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualIsCompleteWhenReceive self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1447,7 +1449,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1465,7 +1467,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterOrEqualReturnsABooleanWhenNe self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1478,7 +1480,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1495,7 +1497,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1506,7 +1508,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1523,7 +1525,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1541,7 +1543,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveGreaterThanReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveHashMultiply' } +{ #category : 'tests - primitiveHashMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHashMultiply [ | result primitiveAddress | @@ -1558,7 +1560,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveHashMultiplySmallIntegerReturnsHash self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50 hashMultiply). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1571,7 +1573,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualDoesNotCompileIfReceiver self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1588,7 +1590,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualFailsWhenArgumentIsNotSm self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1599,7 +1601,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualIsCompleteWhenReceiverTa self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -1616,7 +1618,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1634,7 +1636,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessOrEqualReturnsABooleanWhenNegat self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1647,7 +1649,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1664,7 +1666,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1675,7 +1677,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ | endInstruction primitiveAddress | @@ -1692,7 +1694,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1710,7 +1712,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveLessThanReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1723,7 +1725,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -1740,7 +1742,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflows [ | endInstruction primitiveAddress | @@ -1757,7 +1759,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenComputationOverflo self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ | endInstruction primitiveAddress | @@ -1776,7 +1778,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenNegativeOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ | endInstruction primitiveAddress | @@ -1795,7 +1797,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenPositiveOverflow [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -1812,7 +1814,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -1823,7 +1825,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallInteger [ | endInstruction primitiveAddress | @@ -1840,7 +1842,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsANegativeSmallIntege self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -84). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -1857,7 +1859,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 84). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -1875,7 +1877,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 17424). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand [ | endInstruction primitiveAddress | @@ -1893,7 +1895,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveMultiplyReturnsZeroWithZeroOperand self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop instanceVariableCount | @@ -1919,7 +1921,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewInitializesObjectCorrectly [ equals: memory nilObject ] ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectly [ | endInstruction primitiveAddress class newOop arraySize | @@ -1949,7 +1951,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectlyWhenNotAligned [ | endInstruction primitiveAddress class newOop arraySize | @@ -1980,7 +1982,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNewWithArgInitializesObjectCorrectl equals: memory nilObject ] ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -1993,7 +1995,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2010,7 +2012,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2021,7 +2023,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ | endInstruction primitiveAddress | @@ -2038,7 +2040,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABoolean [ self assert: self machineSimulator receiverRegisterValue equals: (memory falseObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2056,7 +2058,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveNotEqualReturnsABooleanWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory trueObject). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ | endInstruction primitiveAddress | @@ -2074,7 +2076,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesOnNonIntegerResult [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ | endInstruction primitiveAddress | @@ -2091,7 +2093,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoCompilesWithNegativNumbers [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2104,7 +2106,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoDoesNotCompileIfReceiverTagIsNot self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2121,7 +2123,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWhenArgumentIsNotSmallInteg self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ | endInstruction primitiveAddress | @@ -2138,7 +2140,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoFailsWithZeroDivision [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2149,7 +2151,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoIsCompleteWhenReceiverTagIsSmall self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2166,7 +2168,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2184,7 +2186,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsASmallIntegerWhenNegative self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 50). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ | endInstruction primitiveAddress | @@ -2201,7 +2203,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveQuoReturnsZeroWithZeroReceiver [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ @@ -2220,7 +2222,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareBigString [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ @@ -2239,7 +2241,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ @@ -2258,7 +2260,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithIsCaseSensitive [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ @@ -2277,7 +2279,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -1). ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ @@ -2295,7 +2297,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveStringCompareWithSameSymbol [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTagIsNotSmallInteger [ | result | @@ -2308,7 +2310,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractDoesNotCompileIfReceiverTag self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmallInteger [ | endInstruction primitiveAddress | @@ -2325,7 +2327,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenArgumentIsNotSmall self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ | endInstruction primitiveAddress | @@ -2342,7 +2344,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflows [ self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNegative [ | endInstruction primitiveAddress | @@ -2359,7 +2361,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractFailsWhenSumOverflowsWhenNe self runFrom: primitiveAddress until: endInstruction address. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIsSmallInteger [ | result | @@ -2370,7 +2372,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractIsCompleteWhenReceiverTagIs self assert: result equals: CompletePrimitive. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ | endInstruction primitiveAddress | @@ -2387,7 +2389,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallInteger [ self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: -10). ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNegativeNumbers [ | endInstruction primitiveAddress | @@ -2405,7 +2407,7 @@ VMJittedGeneralPrimitiveTest >> testPrimitiveSubtractReturnsASmallIntegerWhenNeg self assert: self machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallIntegers [ | result | @@ -2417,7 +2419,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessShouldNotCompileForNonSmallI self assert: result equals: UnimplementedPrimitive. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentDoesNotReturn [ "If the argument is not an small integer, flow jumps and return does not (yet) happen" @@ -2443,7 +2445,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanNonSmallIntegerArgumentD self assert: machineSimulator arg0RegisterValue equals: self memory falseObject. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self compile: [ @@ -2465,7 +2467,7 @@ VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsFalse [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject. ] -{ #category : #'tests - support' } +{ #category : 'tests - support' } VMJittedGeneralPrimitiveTest >> testSmallIntegerLessThanReturnsTrue [ self compile: [ diff --git a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st index 5d37bd7ef3..c78d8ff140 100644 --- a/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedLookupTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMJittedLookupTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMJittedLookupTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'methodOop', 'selectorOop', 'receiver', 'receiverClass' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodDictionary: aMethodDictionary [ | anArrayOfMethods | @@ -25,7 +27,7 @@ VMJittedLookupTest >> installSelector: aSelectorOop method: aMethodOop inMethodD withValue: aMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -38,7 +40,7 @@ VMJittedLookupTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -51,7 +53,7 @@ VMJittedLookupTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setUpClassAndMethod [ @@ -63,7 +65,7 @@ VMJittedLookupTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ "2 instances variables the array of methods and the tally and 12 entries to put elemetns of the collection" @@ -90,7 +92,7 @@ VMJittedLookupTest >> setUpMethodDictionaryIn: aClass [ ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ | superclass superclassMethodDictionary foundMethod | @@ -123,7 +125,7 @@ VMJittedLookupTest >> testLookUpMNUShouldJItCompile [ self assert: foundMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMJittedLookupTest >> testLookUpMNUWithAnyNonMethodObjectShouldNotJItCompile [ | superclass superclassMethodDictionary foundMethod | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st index 7f9a69d72f..76898f93d9 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtPutTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedPrimitiveAtPutTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveAtPutTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtPutTest >> setUp [ super setUp. @@ -21,7 +23,7 @@ VMJittedPrimitiveAtPutTest >> setUp [ bytecodes: 10. ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtPutTest >> setUpTrampolines [ super setUpTrampolines. @@ -30,7 +32,7 @@ VMJittedPrimitiveAtPutTest >> setUpTrampolines [ ] -{ #category : #tests } +{ #category : 'tests' } VMJittedPrimitiveAtPutTest >> testPrimitiveAtPut32bitIndexableWithLargeNumberShouldStoreValue [ | integerArray offset expectedValue | diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st index 18d5ef041c..e36762ff81 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveAtTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedPrimitiveAtTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveAtTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitiveAtTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveAtTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMJittedPrimitiveAtTest >> setUp [ bytecodes: 10. ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -41,7 +43,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableFirstPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -57,7 +59,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -73,7 +75,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableSecondPaddingOutOfBounds self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ | integerArray offset | @@ -100,7 +102,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -116,7 +118,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableThirdPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 16bit indexable' } +{ #category : 'tests - 16bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -142,7 +144,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt16bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShouldFallThrough [ | integerArray offset | @@ -158,7 +160,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsAtPaddingShou self assertFallsThrough ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -174,7 +176,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ | integerArray offset | @@ -199,7 +201,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 32bit indexable' } +{ #category : 'tests - 32bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -228,7 +230,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt32bitIndexableWithLargeNumberShouldRet equals: expectedValue ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -244,7 +246,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableOutOfBoundsShouldFallThr self assertFallsThrough ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32BitsShouldFallthrough [ | integerArray offset | @@ -261,7 +263,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerIn32Bits self assertFallsThrough ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldReturnValue [ | integerArray offset | @@ -288,7 +290,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithLargeIntegerShouldRe equals: SmallInteger maxVal + 1 ] -{ #category : #'tests - 64bit indexable' } +{ #category : 'tests - 64bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldReturnValue [ | integerArray offset | @@ -315,7 +317,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt64bitIndexableWithSmallIntegerShouldRe equals: (memory integerObjectOf: 17) ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -330,7 +332,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFifthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -345,7 +347,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFirstPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -360,7 +362,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableFourthPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -375,7 +377,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableOutOfBoundsShouldFallThro self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -390,7 +392,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSecondPaddingOutOfBoundsS self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -405,7 +407,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSeventhPaddingOutOfBounds self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ | integerArray offset | @@ -431,7 +433,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableShouldReturnValue [ equals: 17 ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -446,7 +448,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableSixthPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsShouldFallThrough [ | integerArray offset | @@ -461,7 +463,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableThirdPaddingOutOfBoundsSh self assertFallsThrough ] -{ #category : #'tests - 8bit indexable' } +{ #category : 'tests - 8bit indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldReturnValue [ | integerArray offset expectedValue | @@ -487,7 +489,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAt8bitIndexableWithLargeNumberShouldRetu equals: expectedValue ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ | offset array | @@ -500,7 +502,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayOutOfBoundsShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ | offset array | @@ -514,7 +516,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtArrayShouldAccessValue [ self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShouldFallThrough [ | objectWithInstanceVariables | @@ -531,7 +533,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithInstanceVariablesShould self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShouldFallThrough [ | objectWithNoInstanceVariables | @@ -546,7 +548,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtFixedObjectWithNoInstanceVariablesShou self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ machineSimulator receiverRegisterValue: (memory characterObjectOf: $a codePoint). @@ -555,7 +557,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateCharacterShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -567,7 +569,7 @@ VMJittedPrimitiveAtTest >> testPrimitiveAtImmediateFloatShouldFallThrough [ self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #'tests - immediate' } +{ #category : 'tests - immediate' } VMJittedPrimitiveAtTest >> testPrimitiveAtSmallIntegerShouldFallThrough [ machineSimulator receiverRegisterValue: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st index f1948eec9d..9771567a95 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitiveSizeTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMJittedPrimitiveSizeTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedPrimitiveSizeTest', + #superclass : 'VMJittedPrimitivesTest', #instVars : [ 'stop' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitiveSizeTest >> assertFallsThrough [ self runFrom: cogInitialAddress until: stop address. self assert: machineSimulator instructionPointerRegisterValue equals: stop address ] -{ #category : #running } +{ #category : 'running' } VMJittedPrimitiveSizeTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMJittedPrimitiveSizeTest >> setUp [ bytecodes: 10. ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf16bitSlots [ | integerArray | @@ -41,7 +43,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize16bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf32bitSlots [ | integerArray | @@ -57,7 +59,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShouldReturnNumberOf32bitSlots [ | integerArray aSize bytesPerSlot desiredByteSize numberOfWordSizeSlots padding | @@ -83,7 +85,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize32bitIndexableWithExtraHeaderShoul equals: 32768 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf64bitSlots [ | integerArray | @@ -99,7 +101,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize64bitIndexableShouldReturnNumberOf equals: 7 ] -{ #category : #'tests - bit indexable' } +{ #category : 'tests - bit indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8bitSlots [ | integerArray | @@ -115,7 +117,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSize8bitIndexableShouldReturnNumberOf8 equals: 7 ] -{ #category : #'tests - pointer indexable' } +{ #category : 'tests - pointer indexable' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots [ | array | @@ -129,7 +131,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeArrayShouldReturnPointerSizedSlots self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: 7) ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ | objectWithInstanceVariables | @@ -144,7 +146,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeFixedObjectShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThrough [ self prepareStackForSendReceiver: (memory characterObjectOf: $a codePoint). @@ -152,7 +154,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateCharacterShouldFallThroug self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ "Floats are not immediate in 32 bits" @@ -163,7 +165,7 @@ VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateFloatShouldFallThrough [ self assertFallsThrough ] -{ #category : #'tests - fixed pointer layout' } +{ #category : 'tests - fixed pointer layout' } VMJittedPrimitiveSizeTest >> testPrimitiveSizeImmediateIntegerShouldFallThrough [ self prepareStackForSendReceiver: (memory integerObjectOf: 17). diff --git a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st index c306428b27..99c580ac58 100644 --- a/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedPrimitivesTest.class.st @@ -1,21 +1,23 @@ Class { - #name : #VMJittedPrimitivesTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMJittedPrimitivesTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'classFloat' ], #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #private } +{ #category : 'private' } VMJittedPrimitivesTest class >> isAbstract [ ^ self == VMJittedPrimitivesTest ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -28,7 +30,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: argumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -41,7 +43,7 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument ] -{ #category : #utils } +{ #category : 'utils' } VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument: firstArgumentOop and: secondArgumentOop [ "Simulate a primitive execution having an object as receiver and a single argument @@ -54,13 +56,13 @@ VMJittedPrimitivesTest >> executePrimitiveWithReceiver: receiverOop withArgument self runUntilReturn ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : #helpers } +{ #category : 'helpers' } VMJittedPrimitivesTest >> setUp [ super setUp. diff --git a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st index 94945ee4fb..17c2d6be67 100644 --- a/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMJittedSmallFloatPrimitiveTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMJittedSmallFloatPrimitiveTest, - #superclass : #VMJittedPrimitivesTest, + #name : 'VMJittedSmallFloatPrimitiveTest', + #superclass : 'VMJittedPrimitivesTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ "SmallFloats only exist in 64bits systems" @@ -15,7 +17,7 @@ VMJittedSmallFloatPrimitiveTest class >> wordSizeParameters [ ^ self wordSize64Parameters ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -29,7 +31,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveAddTwoSmallFloatsReturnsASmallFl self assert: machineSimulator receiverRegisterValue equals: (self memory floatObjectOf: 3.0) ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -45,7 +47,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveDivideTwoSmallFloatsReturnsASmal equals: 0.5 ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -61,7 +63,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsFalse equals: memory falseObject ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -77,7 +79,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveEqualTwoSmallFloatsReturnsTrue [ equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -93,7 +95,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -109,7 +111,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -125,7 +127,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterOrEqualTwoSmallFloatsRetu equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenEqual [ cogit receiverTags: memory smallFloatTag. @@ -141,7 +143,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsFalseWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -157,7 +159,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturnsTrueWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -173,7 +175,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveGreaterThanTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -189,7 +191,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -205,7 +207,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -221,7 +223,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessOrEqualTwoSmallFloatsReturns equals: memory trueObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenEquals [ cogit receiverTags: memory smallFloatTag. @@ -237,7 +239,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFalseWhenGreater [ cogit receiverTags: memory smallFloatTag. @@ -253,7 +255,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTrueWhenLower [ cogit receiverTags: memory smallFloatTag. @@ -269,7 +271,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveLessThanTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -285,7 +287,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveMultiplyTwoSmallFloatsReturnsASm equals: 6.0 ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFalse [ cogit receiverTags: memory smallFloatTag. @@ -301,7 +303,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsFal equals: memory falseObject ] -{ #category : #'tests - primitiveEquals' } +{ #category : 'tests - primitiveEquals' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTrue [ cogit receiverTags: memory smallFloatTag. @@ -317,7 +319,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveNotEqualTwoSmallFloatsReturnsTru equals: memory trueObject ] -{ #category : #'tests - primitiveSquareRoot' } +{ #category : 'tests - primitiveSquareRoot' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. @@ -332,7 +334,7 @@ VMJittedSmallFloatPrimitiveTest >> testPrimitiveSquareRootASmallFloatsReturnsASm equals: 2.0 sqrt ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMJittedSmallFloatPrimitiveTest >> testPrimitiveSubtractTwoSmallFloatsReturnsASmallFloat [ cogit receiverTags: memory smallFloatTag. diff --git a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st index 63226acbf5..a1b3df39a5 100644 --- a/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLiterRulesTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #VMLiterRulesTest, - #superclass : #TestCase, - #category : #VMMakerTests + #name : 'VMLiterRulesTest', + #superclass : 'TestCase', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ | ast | @@ -20,7 +21,7 @@ VMLiterRulesTest >> testSlangRedundantTypeDeclaration [ ast pragmas first). ] -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ | ast | @@ -31,7 +32,7 @@ VMLiterRulesTest >> testSlangTypeDeclarationForArgument [ ast pragmas first) ] -{ #category : #tests } +{ #category : 'tests' } VMLiterRulesTest >> testSlangTypeDeclarationForVariable [ | ast | diff --git a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st index 7094ce4b0e..48bc2548f9 100644 --- a/smalltalksrc/VMMakerTests/VMLookUpTest.class.st +++ b/smalltalksrc/VMMakerTests/VMLookUpTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMLookUpTest, - #superclass : #VMInterpreterTests, + #name : 'VMLookUpTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'methodOop', 'selectorOop', @@ -14,10 +14,12 @@ Class { 'VMBasicConstants', 'VMBytecodeConstants' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest class >> testParameters [ ^ super testParameters * (ParametrizedTestMatrix new @@ -26,7 +28,7 @@ VMLookUpTest class >> testParameters [ yourself) ] -{ #category : #assertions } +{ #category : 'assertions' } VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ | length | @@ -37,19 +39,19 @@ VMLookUpTest >> assertNonForwardedSelectorsIn: aMethodDictionary [ self deny: (memory isForwarded: selector) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMLookUpTest >> linearSearchLimit [ ^ linearSearchLimit ] -{ #category : #accessing } +{ #category : 'accessing' } VMLookUpTest >> linearSearchLimit: anObject [ linearSearchLimit := anObject ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setArrayClassIntoClassTable [ | aClass | aClass := self @@ -62,7 +64,7 @@ VMLookUpTest >> setArrayClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setMessageClassIntoClassTable [ | aClass | aClass := self @@ -75,7 +77,7 @@ VMLookUpTest >> setMessageClassIntoClassTable [ withValue: aClass ] -{ #category : #running } +{ #category : 'running' } VMLookUpTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -131,7 +133,7 @@ VMLookUpTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> setUpClassAndMethod [ @@ -143,7 +145,7 @@ VMLookUpTest >> setUpClassAndMethod [ receiverClass := self setSmallIntegerClassIntoClassTable ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ "We set a smallInteger class into the classTable" @@ -153,7 +155,7 @@ VMLookUpTest >> testInstallSmallIntegerClassIntoClassTable [ equals: receiverClass ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsForwardedMethod [ | aMethodDictionary | @@ -169,7 +171,7 @@ VMLookUpTest >> testLookUpFindsForwardedMethod [ self assert: interpreter newMethod equals: methodOop. ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodInClass [ | aMethodDictionary | @@ -184,7 +186,7 @@ VMLookUpTest >> testLookUpFindsMethodInClass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodInSuperclass [ | superclass superclassMethodDictionary | @@ -209,7 +211,7 @@ VMLookUpTest >> testLookUpFindsMethodInSuperclass [ self assert: interpreter newMethod equals: methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ | aMethodDictionary | @@ -226,7 +228,7 @@ VMLookUpTest >> testLookUpFindsMethodWithForwardedSelector [ self assertNonForwardedSelectorsIn: aMethodDictionary ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ | aMethodDictionary | @@ -241,7 +243,7 @@ VMLookUpTest >> testLookUpInDefiningClassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -283,7 +285,7 @@ VMLookUpTest >> testLookUpInFindsCannotInterpretCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -319,7 +321,7 @@ VMLookUpTest >> testLookUpInFindsDNUCreatesANewEntryInCache [ classTag: memory smallIntegerTag) ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ | superclass superclassMethodDictionary | @@ -341,7 +343,7 @@ VMLookUpTest >> testLookUpInSuperclassCreatesANewEntryInCache [ self assert: (interpreter lookupInMethodCacheSel: selectorOop classTag:memory smallIntegerTag). ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ | nonExistingSelector superclass superclassMethodDictionary dnuMethodOop dnuSelectorOop | @@ -379,7 +381,7 @@ VMLookUpTest >> testLookUpNonExistingCannotInterpretAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ | nonExistingSelector aMethodDictionary | @@ -400,7 +402,7 @@ VMLookUpTest >> testLookUpNonExistingDNUThrowsRecursivelyDoesNotUnderstand [ self should: [interpreter lookupMethodInClass: receiverClass] raise: Error. ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ | nonExistingSelector dnuMethodOop dnuSelectorOop aMethodDictionary | @@ -434,7 +436,7 @@ VMLookUpTest >> testLookUpNonExistingSelectorAnswersDNUMethod [ self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ "There is no superclass, so no cannotInterpret: to call" @@ -456,7 +458,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNilSuperclassFails [ self should: [ interpreter lookupMethodInClass: receiverClass ] raise: Error ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUMethod [ "Class has a nil methodDictionary, so `cannotInterpret:` is send. But superclass does not understand it, so `doesNotUnderstand:` is called instead." @@ -502,7 +504,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryAndNoCannotInterpretAnswersDNUM self assert: interpreter newMethod equals: dnuMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ | nonExistingSelector cannotInterpretMethodOop cannotInterpretSelectorOop superclass superclassMethodDictionary | @@ -542,7 +544,7 @@ VMLookUpTest >> testLookUpWithNilMethodDictionaryFindsCannotInterpret [ self assert: interpreter newMethod equals: cannotInterpretMethodOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ | aMethodDictionary receiverOop frame | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." @@ -567,7 +569,7 @@ VMLookUpTest >> testPrimitivePerformCreatesCorrectFrame [ ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformExecutes [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -585,7 +587,7 @@ VMLookUpTest >> testPrimitivePerformExecutes [ self assert: interpreter stackTop equals: receiverOop ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformFindsMethodOop [ | aMethodDictionary receiverOop | self setUpClassAndMethod. @@ -606,7 +608,7 @@ VMLookUpTest >> testPrimitivePerformFindsMethodOop [ "(1) the Instruction Pointer is set to be just before the bytecode to execute, so fetchNextBytecode will fetch the first bytecode ( #justActivateNewMethod: )" ] -{ #category : #tests } +{ #category : 'tests' } VMLookUpTest >> testPrimitivePerformSetsIPBeforeFirstBytecode [ | aMethodDictionary receiverOop | "Primitive perform sets everything up (frame, instruction pointer..) so next interpret loop will execute the first bytecode." diff --git a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st index 245cbd43ed..acd7a0e1c3 100644 --- a/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMASTTranslationTest.class.st @@ -1,46 +1,47 @@ Class { - #name : #VMMASTTranslationTest, - #superclass : #TestCase, - #category : #VMMakerTests + #name : 'VMMASTTranslationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> + arg [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> emptyBlockHasSingleNilStatement [ [ ] value ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineMethodWithLoop [ self methodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineSecondLevelMethodWithLoop [ self inlineMethodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineTwiceMethodWithLoop [ self methodWithLoop. self methodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlineTwiceSecondLevelMethodWithLoop [ self inlineMethodWithLoop. self inlineMethodWithLoop ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ @@ -50,17 +51,17 @@ VMMASTTranslationTest >> inlinedMethodWithLocalWithSameName [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithArgument: anArgument [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithExpressionInLoopCondition [ 1 to: self something - 10 do: [ :i | self foo: i ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNil [ self something @@ -68,7 +69,7 @@ VMMASTTranslationTest >> methodWithIfNil [ ifNotNil: [ 2 ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNil [ self something @@ -77,7 +78,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNil [ ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ self something @@ -85,7 +86,7 @@ VMMASTTranslationTest >> methodWithIfNilIfNotNilWithArgument [ ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNil [ self something @@ -93,7 +94,7 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNil [ ifNil: [ 2 ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ self something @@ -101,14 +102,14 @@ VMMASTTranslationTest >> methodWithIfNotNilIfNilWithArgument [ ifNil: [ ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithIfNotNilWithArgument [ self something ifNotNil: [ :soSomething | self lala: soSomething ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ @@ -117,17 +118,17 @@ VMMASTTranslationTest >> methodWithLocalVarAndAndInlinedMethod [ self inlinedMethodWithLocalWithSameName. ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithLoop [ 1 to: 10 do: [ :i | self foo: i ] ] -{ #category : #'generation-targets' } +{ #category : 'generation-targets' } VMMASTTranslationTest >> methodWithNoArguments [ ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testArgumentIsNoTemp [ | translation method | @@ -137,7 +138,7 @@ VMMASTTranslationTest >> testArgumentIsNoTemp [ self deny: (translation locals includes: method methodNode arguments first name) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -174,7 +175,7 @@ VMMASTTranslationTest >> testComplexIfNilIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -211,7 +212,7 @@ VMMASTTranslationTest >> testComplexIfNotNilIfNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ | translation method codeGenerator assignment conditional condition | @@ -243,7 +244,7 @@ VMMASTTranslationTest >> testComplexIfNotNilWithArgument [ self assert: condition arguments first name equals: 'nil' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ | translation method codeGenerator block | @@ -259,7 +260,7 @@ VMMASTTranslationTest >> testEmptyBlockGeneratesSingleNilStatement [ self assert: block statements first value equals: nil ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ | translation | @@ -268,7 +269,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilBecomesIfTrueIfFalse [ self assert: translation statements first selector equals: #ifTrue:ifFalse: ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ | translation | @@ -288,7 +289,7 @@ VMMASTTranslationTest >> testIfNilIfNotNilDoesNotInvertBlocks [ equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ | translation | @@ -308,7 +309,7 @@ VMMASTTranslationTest >> testIfNotNilIfNilInversesBlocks [ equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -323,7 +324,7 @@ VMMASTTranslationTest >> testInlineMethodWithLoopDeclaresLoopIndexVariable [ self assert: (translation locals includesAll: inlinedMethod locals) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -339,7 +340,7 @@ VMMASTTranslationTest >> testInlineSecondLevelMethodWithLoopDeclaresLoopIndexVar self assert: translation locals asSet size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVariable [ | translation codeGenerator inlinedMethod | @@ -354,7 +355,7 @@ VMMASTTranslationTest >> testInlineTwiceMethodWithLoopDeclaresTwiceLoopIndexVari self assert: translation locals asSet size equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopIndexVariable [ | translation codeGenerator inlinedMethods | @@ -370,7 +371,7 @@ VMMASTTranslationTest >> testInlineTwiceSecondLevelMethodWithLoopDeclaresLoopInd self assert: translation locals asSet size equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ | method codeGenerator methodTranslation inlinedMethod inlinedMethodTranslation | @@ -390,7 +391,7 @@ VMMASTTranslationTest >> testInlinedLocalVariableWithSameNameIsProperlyRenamed [ self assert: (methodTranslation declarations at: #cond2) equals: 'pthread_cond_t cond2' ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testKeywordMethodHasArgument [ | translation method | @@ -400,7 +401,7 @@ VMMASTTranslationTest >> testKeywordMethodHasArgument [ self assert: (translation args includes: method methodNode arguments first name) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ | translation method loop | @@ -411,7 +412,7 @@ VMMASTTranslationTest >> testMethodWithConditionInLoopLimitHasLimitVariable [ self assert: loop arguments size equals: 4 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable [ | translation method loop | @@ -422,7 +423,7 @@ VMMASTTranslationTest >> testMethodWithConstantConditionInLoopHasNoLimitVariable self assert: loop arguments size equals: 6 ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ | translation method block | @@ -433,7 +434,7 @@ VMMASTTranslationTest >> testMethodWithLoopDeclaresLoopIndexVariable [ self deny: (translation locals includes: block arguments first) ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid [ | translation codeGenerator | @@ -450,7 +451,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnInOtherMethodReturnsVoid self assert: translation returnType equals: #void ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ | translation codeGenerator | @@ -467,7 +468,7 @@ VMMASTTranslationTest >> testMethodWithoutExplicitReturnReturnsVoid [ self assert: translation returnType equals: #void ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ | translation | @@ -476,7 +477,7 @@ VMMASTTranslationTest >> testTranslateBinaryMethodHasSameName [ self assert: translation selector equals: #+. ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ | translation method | @@ -486,7 +487,7 @@ VMMASTTranslationTest >> testTranslateKeywordMethodHasSameName [ self assert: translation selector equals: method selector. ] -{ #category : #tests } +{ #category : 'tests' } VMMASTTranslationTest >> testTranslateUnaryMethodHasSameName [ | translation method | diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st index bc7e61b968..74591986af 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeFrameBuilderForTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMMachineCodeFrameBuilderForTest, - #superclass : #Object, + #name : 'VMMachineCodeFrameBuilderForTest', + #superclass : 'Object', #instVars : [ 'test', 'returnAddress', @@ -10,20 +10,21 @@ Class { 'spouseContext', 'method' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> arguments: anObject [ arguments := anObject ] -{ #category : #building } +{ #category : 'building' } VMMachineCodeFrameBuilderForTest >> buildFrame [ | methodAddress | @@ -54,13 +55,13 @@ VMMachineCodeFrameBuilderForTest >> buildFrame [ test cogit needsFrame: true. ] -{ #category : #testing } +{ #category : 'testing' } VMMachineCodeFrameBuilderForTest >> hasSpouseContext [ ^ spouseContext notNil ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ self test: aTest. @@ -70,63 +71,63 @@ VMMachineCodeFrameBuilderForTest >> initializeWithTest: aTest [ temporaries := #(). ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> method [ ^ method ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> method: anObject [ method := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> receiver [ ^ receiver ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> receiver: anObject [ receiver := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> returnAddress [ ^ returnAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> returnAddress: anObject [ returnAddress := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> spouseContext [ ^ spouseContext ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> spouseContext: aContextOop [ spouseContext := aContextOop ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> temporaries [ ^ temporaries ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> temporaries: anObject [ temporaries := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> test [ ^ test ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeFrameBuilderForTest >> test: anObject [ test := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st index a4ead00b02..b46584b7c3 100644 --- a/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineCodeMethod.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMMachineCodeMethod, - #superclass : #Object, + #name : 'VMMachineCodeMethod', + #superclass : 'Object', #instVars : [ 'virtualMachine', 'cogMethodSurrogate' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogate: aCogMethodSurrogate [ ^ self new @@ -20,17 +22,17 @@ VMMachineCodeMethod class >> newOnInterpreter: aVirtualMachine cogMethodSurrogat yourself ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> cogMethodSurrogate [ ^ cogMethodSurrogate ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> cogMethodSurrogate: anObject [ cogMethodSurrogate := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> disassemble [ | methodEntry instructions | methodEntry := cogMethodSurrogate asInteger + virtualMachine cogit entryOffset. @@ -42,12 +44,12 @@ VMMachineCodeMethod >> disassemble [ ' join: (instructions collect: [:i | i assemblyCodeString]) ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> virtualMachine [ ^ virtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMMachineCodeMethod >> virtualMachine: anObject [ virtualMachine := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st index 5a50d7cb27..078c4b36a4 100644 --- a/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMMachineSimulatorTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMMachineSimulatorTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMMachineSimulatorTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogAbstractRegisters' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - instruction exception' } +{ #category : 'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ | label lastInstruction subInstruction breakInstruction | @@ -36,7 +38,7 @@ VMMachineSimulatorTest >> testInstructionExceptionHasCorrectInstructionAddress [ ] -{ #category : #'tests - instruction exception' } +{ #category : 'tests - instruction exception' } VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ | label lastInstruction subInstruction breakInstruction | @@ -65,7 +67,7 @@ VMMachineSimulatorTest >> testInstructionExceptionIsRaisedAsUnicornError [ ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -93,7 +95,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionComesWithCorrectAddress [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ | label lastInstruction invalidAddressHandled addInstruction jumpInstruction | @@ -133,7 +135,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledCountIsRespected [ equals: jumpInstruction address ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ | label lastInstruction invalidAddressHandled | @@ -177,7 +179,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledTimeoutIsRespected [ ^ self ] ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespected [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -213,7 +215,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self temporaryRegisterValue equals: 1 ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespectedCorrectInstructionPointer [ | label invalidAddressHandled addInstruction jumpInstruction | @@ -249,7 +251,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionHandledUntilAddressIsRespecte self assert: self machineSimulator instructionPointerRegisterValue equals: jumpInstruction address ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -276,7 +278,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -302,7 +304,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInCallHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ | lastInstruction invalidAddressHandled returningPoint | @@ -329,7 +331,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpContinuesToCorrectPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ | lastInstruction invalidAddressHandled | @@ -355,7 +357,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInJumpHasUpdatedPC [ self assert: invalidAddressHandled ] -{ #category : #'tests - memory access exception' } +{ #category : 'tests - memory access exception' } VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAddress [ | lastInstruction invalidAccessInstruction invalidAddressHandled | @@ -386,7 +388,7 @@ VMMachineSimulatorTest >> testMemoryAccessExceptionInstructionPointerInCorrectAd self assert: invalidAddressHandled ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ | label lastInstruction subInstruction | @@ -412,7 +414,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespected [ ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstructionPointer [ | label lastInstruction subInstruction jumpInstruction | @@ -437,7 +439,7 @@ VMMachineSimulatorTest >> testNormalExecutionCountIsRespectedAndHasCorrectInstru ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ | label lastInstruction | @@ -459,7 +461,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeout [ self fail. ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPointer [ | label lastInstruction | @@ -483,7 +485,7 @@ VMMachineSimulatorTest >> testNormalExecutionRespectTimeoutUpdatesInstructionPoi self fail. ] -{ #category : #'tests - normal execution' } +{ #category : 'tests - normal execution' } VMMachineSimulatorTest >> testNormalExecutionUntilAddressIsRespected [ | label lastInstruction | diff --git a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st index be3b8ddce2..15c0afc846 100644 --- a/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st +++ b/smalltalksrc/VMMakerTests/VMMockCodeGenerator.class.st @@ -1,14 +1,16 @@ Class { - #name : #VMMockCodeGenerator, - #superclass : #Object, + #name : 'VMMockCodeGenerator', + #superclass : 'Object', #instVars : [ 'interpreter', 'addedPrimitives' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ ^ self new @@ -16,13 +18,13 @@ VMMockCodeGenerator class >> for: aCogVMSimulatorLSB [ yourself ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> accessorDepthCalculator [ ^ self ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> accessorDepthForSelector: aString [ ^ addedPrimitives at: aString @@ -30,31 +32,31 @@ VMMockCodeGenerator >> accessorDepthForSelector: aString [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector [ self addPrimitive: aSelector accessorDepth: -1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> addPrimitive: aSelector accessorDepth: aDepth [ addedPrimitives at: aSelector put: aDepth ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> exportedPrimitiveNames [ ^ (addedPrimitives keys collect: [ :e | e -> e ]) asDictionary ] -{ #category : #initialization } +{ #category : 'initialization' } VMMockCodeGenerator >> initialize [ addedPrimitives := Dictionary new ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> initializeWithPrimitiveTable [ interpreter primitiveTable @@ -62,7 +64,7 @@ VMMockCodeGenerator >> initializeWithPrimitiveTable [ thenDo: [ :aSelector | self addPrimitive: aSelector ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMMockCodeGenerator >> interpreter: aCogVMSimulatorLSB [ interpreter := aCogVMSimulatorLSB. diff --git a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st index 42382cc3ae..acfab19b5c 100644 --- a/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectAccessorIdentificationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMObjectAccessorIdentificationTest, - #superclass : #TestCase, - #category : #'VMMakerTests-Simulation' + #name : 'VMObjectAccessorIdentificationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests-Simulation', + #package : 'VMMakerTests', + #tag : 'Simulation' } -{ #category : #tests } +{ #category : 'tests' } VMObjectAccessorIdentificationTest >> testObjectAccessorMessagesAreCorrectlyDetected [ | knownSelectors nonAccessorSelectors | diff --git a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st index 5419d39e53..54dd7eedd7 100644 --- a/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectLayoutTests.class.st @@ -1,17 +1,19 @@ Class { - #name : #VMObjectLayoutTests, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-ObjectLayoutTests' + #name : 'VMObjectLayoutTests', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-ObjectLayoutTests', + #package : 'VMMakerTests', + #tag : 'ObjectLayoutTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMObjectLayoutTests >> formatFromInstSpec: instSpecInt instSize: instSizeInt [ "A class format is composed by" "<5 bits inst spec><16 bits inst size>" ^ instSpecInt << 16 + instSizeInt ] -{ #category : #helpers } +{ #category : 'helpers' } VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSize: aSizeInt [ | class | class := self @@ -21,7 +23,7 @@ VMObjectLayoutTests >> installClassIntoClassTableWithInstSpec: aFormatInt instSi ^class ] -{ #category : #helper } +{ #category : 'helper' } VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ | objSize | "always have at least one slot for forwarders" @@ -37,7 +39,7 @@ VMObjectLayoutTests >> objSizeWithNumberOfSlots: numberOfSlots [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testCharacterIsImmediate [ | char | char := memory characterObjectOf: $a asInteger. @@ -45,7 +47,7 @@ VMObjectLayoutTests >> testCharacterIsImmediate [ self assert: (memory fetchClassTagOf: char) equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ | class objOop | 0 to: 254 do: [ :slots | @@ -61,19 +63,19 @@ VMObjectLayoutTests >> testHeaderOfObjectEncodesTheCorrectAmountOfSlots [ equals: objSize ] ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesInRange [ self assert: (memory isIntegerValue: memory minSmallInteger) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testNegativeIntegerValuesNotInRange [ "An integer smaller than the smallest integer is not in a valid range" self deny: (memory isIntegerValue: memory minSmallInteger - 1) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectAlignment [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -84,7 +86,7 @@ VMObjectLayoutTests >> testObjectAlignment [ self assert: objOop2 \\ 8 equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ | class objOop header | 0 to: 254 do: [ :slots | @@ -95,7 +97,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesAmountOfSlots [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ | class objOop header classIndex | 0 to: 10 do: [ :slots | @@ -108,7 +110,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesClassIndex [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ | class objOop header classInstSpec | "instSpec: @@ -123,7 +125,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForFixedLayout [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout16Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 12-15 = 16-bit indexable @@ -145,7 +147,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout32Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 10-11 = 32-bit indexable @@ -165,7 +167,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayout8Bit [ | class objOop header classInstSpec instSpec bits maxSize | "instSpec: 16-23 = 8-bit indexable @@ -192,7 +194,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexableOpaqueLayou ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayout [ | class objOop header classInstSpec instSpec | instSpec := 2. "instSpec for indexable objects with no inst vars (Array et al)" @@ -206,7 +208,7 @@ VMObjectLayoutTests >> testObjectHeaderEncodesObjecFormatForIndexablePointerLayo ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectMinimumSize [ | class objOop1 objOop2 instSpec | instSpec := 0. @@ -216,7 +218,7 @@ VMObjectLayoutTests >> testObjectMinimumSize [ self assert: objOop2 - objOop1 equals: 16 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ | class slots obj1oop obj2oop | "objects always are allocated with at least one slots for forwarding" @@ -227,7 +229,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysAligned [ self assert: obj2oop - obj1oop equals: self objectHeaderSize + memory allocationUnit ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForwarding [ | class slots oop | slots := 0. @@ -236,7 +238,7 @@ VMObjectLayoutTests >> testObjectWith0SlotsIsAreAlwaysWithAtLeastOneSlotsForForw self assert: (memory bytesInObject: oop) equals: self objectHeaderSize + memory allocationUnit. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ | class objOop slots | slots := 255. @@ -251,7 +253,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTheCorrectSize [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ | class objOop bigOopHeader mask numSlots | mask := 16rFFFFFFFFFFFFFF. @@ -265,7 +267,7 @@ VMObjectLayoutTests >> testObjectWithMoreThan254SlotsHasTwoHeaders [ self assert: numSlots equals: slots ] ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ "Test of the border case when int = 2r000111111... . The highest possible value using usqInt encoding is (2**61) -1 since (2**61) can be confused with a pointer (on a 64 bits machine) Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guarantees the portability @@ -274,25 +276,25 @@ VMObjectLayoutTests >> testPositiveIntegerBorderCase1 [ self deny: (memory isIntegerValue: memory maxCInteger >> memory numSmallIntegerTagBits) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerBorderCase2 [ "Test of the border case when int = 2r111000000 ... . Regarding the cCode implementation, the sign bit can be lost if this test fails. The maxCInteger and numSmallIntegerTagBits guaranties the portability of the test on 32 and 64 bit computer. " self deny: (memory isIntegerValue: (memory maxCInteger >> memory numSmallIntegerTagBits) bitInvert) "<=> isIntegerValue: (0001111) bitInvert" ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesInRange [ self assert: (memory isIntegerValue: memory maxSmallInteger) ] -{ #category : #'tests - integerValues' } +{ #category : 'tests - integerValues' } VMObjectLayoutTests >> testPositiveIntegerValuesNotInRange [ self deny: (memory isIntegerValue: memory maxSmallInteger + 1) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testSmallIntegerIsImmediate [ | int | int := memory integerObjectOf: 42. @@ -300,7 +302,7 @@ VMObjectLayoutTests >> testSmallIntegerIsImmediate [ self assert: (memory fetchClassTagOf: int) equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectLayoutTests >> testVariableObjectWithInstVarsHasTheRightSize [ | class objOop fixedFieldsSize indexableSize | indexableSize := 12. diff --git a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st index b3400f900f..c780fcb9c2 100644 --- a/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st +++ b/smalltalksrc/VMMakerTests/VMObjectStackTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMObjectStackTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMObjectStackTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ @@ -12,7 +14,7 @@ VMObjectStackTest >> testGrowingMournQueueUpdatesVMGlobalVariable [ self assert: memory mournQueue equals: (memory objStackAt: 4098"MournQueueRootIndex") ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testNewMournQueueIsEmpty [ | objStack | @@ -22,7 +24,7 @@ VMObjectStackTest >> testNewMournQueueIsEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testNewObjectStackIsEmpty [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -33,7 +35,7 @@ VMObjectStackTest >> testNewObjectStackIsEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ | objStack | @@ -46,7 +48,7 @@ VMObjectStackTest >> testObjectsInMournQueueArePoppedInOrder [ ]. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -60,7 +62,7 @@ VMObjectStackTest >> testObjectsInObjectStackArePoppedInOrder [ ]. ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopMournQueueReducesSize [ | objStack | @@ -70,7 +72,7 @@ VMObjectStackTest >> testPopMournQueueReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ | objStack | @@ -79,7 +81,7 @@ VMObjectStackTest >> testPopObjectInMournQueueReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -89,7 +91,7 @@ VMObjectStackTest >> testPopObjectInStackReturnsInitiallyPushedObject [ self assert: (memory popObjStack: objStack) equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPopObjectStackReducesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" @@ -100,14 +102,14 @@ VMObjectStackTest >> testPopObjectStackReducesSize [ self assert: (memory isEmptyObjStack: objStack) ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjects: n [ "Create an object stack at the position of the mark stack in the class table (4096)" self testPushObjects: n inStackAtIndex: 4096 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ memory ensureRoomOnObjStackAt: objectStackIndex. @@ -119,19 +121,19 @@ VMObjectStackTest >> testPushObjects: n inStackAtIndex: objectStackIndex [ self assert: (memory sizeOfObjStack: (memory objStackAt: objectStackIndex)) equals: n ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjectsAboveObjectStackLimit [ self testPushObjects: memory objectStackPageLimit + 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushObjectsToObjectStackLimit [ self testPushObjects: memory objectStackPageLimit ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushToMournQueueIncreasesSize [ | objStack | @@ -140,7 +142,7 @@ VMObjectStackTest >> testPushToMournQueueIncreasesSize [ self assert: (memory sizeOfObjStack: objStack) equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMObjectStackTest >> testPushToObjectStackIncreasesSize [ "Create an object stack at the position of the mark stack in the class table (4096)" diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st index 3cdae8df48..822de70068 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceImageReadingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPermanentSpaceImageReadingTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-PermSpace' + #name : 'VMPermanentSpaceImageReadingTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #utilities } +{ #category : 'utilities' } VMPermanentSpaceImageReadingTest >> loadImage [ | memoryClass isa | @@ -37,7 +39,7 @@ VMPermanentSpaceImageReadingTest >> loadImage [ ] -{ #category : #initialization } +{ #category : 'initialization' } VMPermanentSpaceImageReadingTest >> setUp [ super setUp. @@ -49,7 +51,7 @@ VMPermanentSpaceImageReadingTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpaceImageReadingTest >> testLoadingImageHasEmptyPermSpaceWhenImageDoesNotHave [ self saveImage. diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st index 01eaca0a91..81376cf7b0 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpaceMemoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPermanentSpaceMemoryTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-PermSpace' + #name : 'VMPermanentSpaceMemoryTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #running } +{ #category : 'running' } VMPermanentSpaceMemoryTest >> setUp [ super setUp. @@ -12,7 +14,7 @@ VMPermanentSpaceMemoryTest >> setUp [ self createWeakArrayClass ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ | permanentObject allInstances | @@ -25,7 +27,7 @@ VMPermanentSpaceMemoryTest >> testAllInstancesReturnsObjectsInPermSpace [ self assert: (memory fetchPointer: 0 ofObject: allInstances) equals: permanentObject. ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ | permanentObject oldObject youngReplacement arrFrom arrTo ec | @@ -52,7 +54,7 @@ VMPermanentSpaceMemoryTest >> testBecomingOfPermanentObjectFails [ self deny: ec equals: PrimNoErr ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenModified [ | oldObject1 permanentObject1 | @@ -73,7 +75,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWhenMoving [ | oldObject1 permanentObject1 | @@ -94,7 +96,7 @@ VMPermanentSpaceMemoryTest >> testCompiledMethodWithMachineCodeIsNotRememberedWh permanentObject1) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ | permanentObject newObject | @@ -112,7 +114,7 @@ VMPermanentSpaceMemoryTest >> testMarkingNewSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ | permanentObject oldObject | @@ -130,7 +132,7 @@ VMPermanentSpaceMemoryTest >> testMarkingOldSpaceDoesNotMarkPermSpace [ self deny: (memory isMarked: permanentObject) ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ | oldObject youngObject permanentObject | @@ -159,7 +161,7 @@ VMPermanentSpaceMemoryTest >> testMoveOldObjectInRememberedSetIsMovedFromSet [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememberedSet [ | permanentObject youngObject rootObject| @@ -175,7 +177,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAYoungOnePutsInRememb self assert: (memory getFromPermToNewSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRememberedSet [ | permanentObject oldObject rootObject| @@ -192,7 +194,7 @@ VMPermanentSpaceMemoryTest >> testMovingAnObjectReferencingAnOldOnePutsInRemembe self assert: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded [ | permanentObject oldObject rootObject| @@ -215,7 +217,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceIsCorrectlyForwarded ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ | permanentObject oldObject | @@ -230,7 +232,7 @@ VMPermanentSpaceMemoryTest >> testMovingOldObjectToPermSpaceLeavesForwarder [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesArray [ | permanentObject youngObject rootObject anArray| @@ -254,7 +256,7 @@ VMPermanentSpaceMemoryTest >> testMovingTwoObjectsPutBothInPermSpaceAndUpdatesAr self assert: (memory getMemoryMap isPermanentObject: youngObject). ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ | permanentObject | @@ -264,7 +266,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsCorrectlyAllocated [ self assert: permanentObject equals: memory getMemoryMap permSpaceStart + 16 "There is a zero-slot objects always in the perm space" ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ | permanentObject | @@ -274,7 +276,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNonYoungObject [ self deny: (memory getMemoryMap isYoungObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ | permanentObject | @@ -284,7 +286,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsNotAnOldObject [ self deny: (memory getMemoryMap isOldObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ | permanentObject | @@ -294,7 +296,7 @@ VMPermanentSpaceMemoryTest >> testNewPermanentByteArrayIsPermanentObject [ self assert: (memory getMemoryMap isPermanentObject: permanentObject) ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ | permanentObject nextObject | @@ -306,7 +308,7 @@ VMPermanentSpaceMemoryTest >> testNextObjectIsReturningAGoodValue [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ | oldObject1 permanentObject1 oldObject2 youngObject | @@ -343,7 +345,7 @@ VMPermanentSpaceMemoryTest >> testObjectInBothRememberedSetIsCorrectlyUpdated [ ] -{ #category : #'tests - allocation' } +{ #category : 'tests - allocation' } VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRememberedSetAndThenRemoved [ | oldObject1 oldObject2 permObject2 | @@ -367,7 +369,7 @@ VMPermanentSpaceMemoryTest >> testObjectReferencingOldIsAddedToCorrectRemembered self assert: memory getFromPermToNewSpaceRememberedSet rememberedSetSize equals: 0. ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ @@ -385,7 +387,7 @@ VMPermanentSpaceMemoryTest >> testObjectWithForwarderIsCorrectlyResolved [ ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 array | @@ -406,7 +408,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectInBulkToPermSpaceKeepsFirstInReme ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTheRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array youngObject | @@ -438,7 +440,7 @@ VMPermanentSpaceMemoryTest >> testPassingObjectsInBulkPreservesObjectAlreadyInTh ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 array | @@ -461,7 +463,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsInBulkToPermSpaceIsRemovedFro self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -481,7 +483,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceIsRemovedFromRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject1). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememberedSet [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -499,7 +501,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsFirstInRememb ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForwarderInOldSpace [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -514,7 +516,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceKeepsPointerToForw self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: oldObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarderInScanvenge [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -531,7 +533,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceNotUpdatesForwarde self deny: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderInGC [ | oldObject1 permanentObject1 oldObject2 permanentObject2 | @@ -548,7 +550,7 @@ VMPermanentSpaceMemoryTest >> testPassingTwoObjectsToPermSpaceUpdatesForwarderIn self assert: (memory fetchPointer: 0 ofObject: permanentObject1) equals: permanentObject2 ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompactingForSaving [ | oldObject1 permanentObject1 oldObject2 oldObject2Hash | @@ -572,7 +574,7 @@ VMPermanentSpaceMemoryTest >> testPermObjectPointingToOldSpaceIsUpdatedWhenCompa self assert: (memory hashBitsOf: (memory fetchPointer: 0 ofObject: permanentObject1)) equals: oldObject2Hash ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ | permanentObject oldObject oldClass oldClassHash found | @@ -598,7 +600,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectMarksItsOldClass [ self assert: found ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered [ @@ -611,7 +613,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToFalseIsNotRemembered self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemembered [ @@ -624,7 +626,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToMachineCodeIsNotRemem self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ @@ -636,7 +638,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToNilIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ @@ -649,7 +651,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToTrueIsNotRemembered [ self deny: (memory getFromPermToOldSpaceRememberedSet isInRememberedSet: permanentObject ). ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedWhenPointingToMachineCodeMethod [ @@ -680,7 +682,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectPointingToYoungObjectIsRemovedW self assert: (memory fetchPointer: 0 ofObject: permanentObject ) equals: fakeMachineCodeMethod. ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRememberedSet [ @@ -702,7 +704,7 @@ VMPermanentSpaceMemoryTest >> testPermanentObjectUpdatedToTrueIsRemovedFromRemem ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -728,7 +730,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldEphemeronIsNotFired ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | @@ -757,7 +759,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromOldWeakObjectIsNotNille ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFired [ | permanentObject oldObject ephemeronObject | @@ -780,7 +782,7 @@ VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungEphemeronIsNotFire ] -{ #category : #'test - moving' } +{ #category : 'test - moving' } VMPermanentSpaceMemoryTest >> testReferencingAnObjectFromYoungWeakObjectIsNotNilled [ | permanentObject oldObject weakObject | diff --git a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st index 7393d6f584..5ba4cc63d3 100644 --- a/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPermanentSpacePrimitiveTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #VMPermanentSpacePrimitiveTest, - #superclass : #VMAbstractPrimitiveTest, + #name : 'VMPermanentSpacePrimitiveTest', + #superclass : 'VMAbstractPrimitiveTest', #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : #'VMMakerTests-PermSpace' + #category : 'VMMakerTests-PermSpace', + #package : 'VMMakerTests', + #tag : 'PermSpace' } -{ #category : #configuring } +{ #category : 'configuring' } VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ super configureEnvironmentBuilder. @@ -17,7 +19,7 @@ VMPermanentSpacePrimitiveTest >> configureEnvironmentBuilder [ environmentBuilder permSpaceSize: 10*1024*1024. ] -{ #category : #initialization } +{ #category : 'initialization' } VMPermanentSpacePrimitiveTest >> setUp [ super setUp. @@ -25,7 +27,7 @@ VMPermanentSpacePrimitiveTest >> setUp [ self createWeakArrayClass. ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ interpreter push: (memory integerObjectOf: 42). @@ -35,7 +37,7 @@ VMPermanentSpacePrimitiveTest >> testIsInmmediateInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ interpreter push: (self newZeroSizedObject). @@ -45,7 +47,7 @@ VMPermanentSpacePrimitiveTest >> testIsNewObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ interpreter push: (self newOldSpaceObjectWithSlots: 0). @@ -55,7 +57,7 @@ VMPermanentSpacePrimitiveTest >> testIsOldObjectInPermSpace [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ | oldObj permObject | @@ -69,7 +71,7 @@ VMPermanentSpacePrimitiveTest >> testIsPermObjectInPermSpace [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ | oldObject | @@ -84,7 +86,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnEphemeron [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ | oldObject | @@ -99,7 +101,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceFailsOnWeakObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ | newObject | @@ -114,7 +116,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnNewPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ | oldObject | @@ -129,7 +131,7 @@ VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksOnOldPointerObject [ self assert: interpreter primFailCode equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMPermanentSpacePrimitiveTest >> testMoveToPermSpaceWorksWithByteArray [ | oldObject | diff --git a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st index 2b4eea4684..f23f44e730 100644 --- a/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPinnedObjectTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMPinnedObjectTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMPinnedObjectTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> lastAliveObject [ ^ self keptObjectInVMVariable2 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> lastPinnedObject [ ^ self keptObjectInVMVariable1 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newAliveObject [ | newAliveObject | newAliveObject := self newOldSpaceObjectWithSlots: 1. @@ -23,12 +25,12 @@ VMPinnedObjectTest >> newAliveObject [ ^ newAliveObject ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newDeadObject [ ^ self newOldSpaceObjectWithSlots: 1 ] -{ #category : #helper } +{ #category : 'helper' } VMPinnedObjectTest >> newKeptPinnedObject [ | newPinned | newPinned := self newOldSpaceObjectWithSlots: 1. @@ -38,7 +40,7 @@ VMPinnedObjectTest >> newKeptPinnedObject [ ^ newPinned ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed aliveHash | "D = Dead @@ -68,7 +70,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideAtStartOfOld self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPinnedObject [ | aliveObject destination | "D = Dead @@ -96,7 +98,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterAPinObjectShouldSlideBeforeLastPi self assert: self lastAliveObject equals: destination. ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -126,7 +128,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideAtStar self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBeforeFirstPinned [ | aliveObject destination | "D = Dead @@ -154,7 +156,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterManyPinnedObjectShouldSlideBefore self assert: self lastAliveObject equals: destination. ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfOldSpace [ | aliveObject destination shouldBeFreed | "D = Dead @@ -184,7 +186,7 @@ VMPinnedObjectTest >> testAllocatingObjectAfterTwoPinObjectShouldSlideAtStartOfO self assert: (memory isFreeObject: shouldBeFreed) ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDead [ | destination aliveObject aliveObjectHash | "D = Dead @@ -210,7 +212,7 @@ VMPinnedObjectTest >> testAllocatingObjectRightAfterPinnedShouldMoveItOnFirstDea self assert: (memory isFreeObject: (memory objectAfter: self lastPinnedObject)). ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ "if we follow the forwarder, the object is in the old space" | obj | @@ -221,7 +223,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpace [ self assert: (memory isInOldSpace: (memory followForwarded: obj)) ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForwarderBehind [ | obj | obj := self newObjectWithSlots: 0. @@ -231,7 +233,7 @@ VMPinnedObjectTest >> testPinANewObjectShouldMoveItToTheOldSpaceAndLeaveAForward self assert: (memory isForwarded: obj) ] -{ #category : #tests } +{ #category : 'tests' } VMPinnedObjectTest >> testPinnedObjectShouldNotBeMovedByGC [ | pinned | self newOldSpaceObjectWithSlots: 0. "deadObject, that differenciate the start of the old space to the pin" diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st index 1c7a580223..87474aad24 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallAbstractTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #VMPrimitiveCallAbstractTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMPrimitiveCallAbstractTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'baseMethodIP', 'baseFrame', 'baseMethod' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver arguments: arguments returnAddress: returnAddress [ machineSimulator receiverRegisterValue: receiver. @@ -32,19 +34,19 @@ VMPrimitiveCallAbstractTest >> callCogMethod: callingMethod receiver: receiver a ] -{ #category : #helpers } +{ #category : 'helpers' } VMPrimitiveCallAbstractTest >> findMethod: aSelector [ ^ self class lookupSelector: aSelector ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> jitOptions [ ^ super jitOptions @@ -52,13 +54,13 @@ VMPrimitiveCallAbstractTest >> jitOptions [ yourself ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodReturningNil [ ^ nil ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ "This method is used to test sends. @@ -66,7 +68,7 @@ VMPrimitiveCallAbstractTest >> methodSendingCharacterArgument [ ^ self methodWithSend: $7 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ "This method is used to test sends. @@ -74,7 +76,7 @@ VMPrimitiveCallAbstractTest >> methodSendingLiteralVariableArgument [ ^ self methodWithSend: Object ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ "This method is used to test sends. @@ -82,7 +84,7 @@ VMPrimitiveCallAbstractTest >> methodSendingNilArgument [ ^ self methodWithSend: nil ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ "This method is used to test the invocation of a primitive. @@ -92,7 +94,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitive: anArg [ ^ 84 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ "This method is used to test the invocation of a primitive. @@ -102,7 +104,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallNamedPrimitiveCounting: anArg [ ^ 84 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ @@ -110,7 +112,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive159 [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ "This method is used to test the invocation of a primitive. @@ -120,7 +122,7 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive173: anArg [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ "This method is used to test the invocation of a primitive. @@ -130,13 +132,13 @@ VMPrimitiveCallAbstractTest >> methodThatCallPrimitive1: anArg [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodToCompile1 [ ^ 42 ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend [ "This method is used to test sends. @@ -144,7 +146,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend [ ^ self send ] -{ #category : #'methods under test' } +{ #category : 'methods under test' } VMPrimitiveCallAbstractTest >> methodWithSend: arg [ "This method is used to test sends. @@ -152,7 +154,7 @@ VMPrimitiveCallAbstractTest >> methodWithSend: arg [ ^ arg send ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveCallAbstractTest >> setUp [ | primitiveAccessorDepthTable | @@ -177,7 +179,7 @@ VMPrimitiveCallAbstractTest >> setUp [ ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveCallAbstractTest >> setUpTrampolines [ super setUpTrampolines. diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st index 384475fb9b..084419c9cc 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveCallingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMPrimitiveCallingTest, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-InterpreterTests' + #name : 'VMPrimitiveCallingTest', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -26,7 +28,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSetErrorCodeInOtherTemp [ self assert: (interpreter temporary: 1 in: interpreter framePointer) equals: memory nilObject ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLongStore [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -48,7 +50,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingDoesNotSkipSecondBytecodeIfNotLong self assert: interpreter fetchByte equals: 16rF4 ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." @@ -70,7 +72,7 @@ VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTemp [ self assert: (interpreter temporary: 0 in: interpreter framePointer) equals: (memory integerObjectOf: -1) ] -{ #category : #tests } +{ #category : 'tests' } VMPrimitiveCallingTest >> testPrimitiveFailingSetsErrorCodeInCorrectTempWithInternalActivation [ "The method has two temporaries. The first one is the error code, the second one is a user defined temp." diff --git a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st index 20591fd644..009a19163e 100644 --- a/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPrimitiveTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #VMPrimitiveTest, - #superclass : #VMInterpreterTests, + #name : 'VMPrimitiveTest', + #superclass : 'VMInterpreterTests', #pools : [ 'VMBasicConstants', 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #asserting } +{ #category : 'asserting' } VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ | numSlotOop numSlotOopToCompare | @@ -23,7 +25,7 @@ VMPrimitiveTest >> assert: anOop contentEquals: oopToCompare [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMPrimitiveTest >> fillNewSpace [ "Allocate enough space to generate a full new space" @@ -35,7 +37,7 @@ VMPrimitiveTest >> fillNewSpace [ classIndex: memory arrayClassIndexPun) isNotNil ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMPrimitiveTest >> newArrayWith: aCollection [ | array | array := self newObjectWithSlots: aCollection size format: memory arrayFormat classIndex: memory arrayClassIndexPun. @@ -46,7 +48,7 @@ VMPrimitiveTest >> newArrayWith: aCollection [ ] -{ #category : #running } +{ #category : 'running' } VMPrimitiveTest >> setUp [ "taken from VMSimpleStackBasedCogitBytecodeTest >> #setup" @@ -71,7 +73,7 @@ VMPrimitiveTest >> setUp [ interpreter setStackPageAndLimit: page ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> setUpForwardedObjects [ | class1 class2 object1 object2 array1 array2 | @@ -95,7 +97,7 @@ VMPrimitiveTest >> setUpForwardedObjects [ ^ object1. ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -108,7 +110,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -121,7 +123,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ | string | @@ -137,7 +139,7 @@ VMPrimitiveTest >> testPrimitiveAddFailsWithTypeErrorPreservesStack [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ interpreter push: (memory integerObjectOf: 1). @@ -152,7 +154,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflow [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -169,7 +171,7 @@ VMPrimitiveTest >> testPrimitiveAddWithNoOverflowPopsOperands [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflow [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -182,7 +184,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflow [ ] -{ #category : #'tests - primitiveAdd' } +{ #category : 'tests - primitiveAdd' } VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ | maxSmallInt | @@ -200,7 +202,7 @@ VMPrimitiveTest >> testPrimitiveAddWithOverflowPreservesStack [ ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -221,7 +223,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeCreatesForwardersForObjectsOfDifferen self assert: (memory isForwarded: object2) equals: true ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -242,7 +244,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClass [ self assert: (memory fetchClassOf: object2) equals: class1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -263,7 +265,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesClassForObjectsOfDifferentSi self assert: (memory fetchClassOf: (memory followForwarded: object2)) equals: class1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -285,7 +287,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContents [ self assert: (memory fetchInteger: 0 ofObject: object2) equals: 42. ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferentSize [ | class1 class2 object1 object2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -311,7 +313,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesContentsForObjectsOfDifferen self assert: (memory fetchInteger: 0 ofObject: (memory followForwarded: object2)) equals: 42 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -334,7 +336,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHash [ self assert: (memory rawHashBitsOf: object2) equals: hash1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDifferentSize [ | class1 class2 object1 object2 hash1 hash2 array1 array2 | class1 := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -358,7 +360,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeExchangesIdentityHashForObjectsOfDiff self assert: (memory rawHashBitsOf: (memory followForwarded: object2)) equals: hash1 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ | class immediate array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -377,7 +379,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmediates [ ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -398,7 +400,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForImmutableObject [ self assert: interpreter primFailCode equals: PrimErrNoModification ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -418,7 +420,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeFailsForPinnedObject [ self assert: interpreter primFailCode equals: PrimErrObjectIsPinned ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNotCopyHash [ | class object1 object2 hash2BeforeBecome array1 array2 object2FromForwarder | class := self @@ -441,7 +443,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsFalseDoesNot self assert: (memory hashBitsOf: object2) equals: hash2BeforeBecome ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHash [ | class object1 object2 hash1 hash2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -464,7 +466,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCopyHashIfCopyHasIsTrueCopiesHa self deny: (memory hashBitsOf: object2) equals: hash2 ] -{ #category : #'tests - become' } +{ #category : 'tests - become' } VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOriginalObject [ | class object1 object2 array1 array2 | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -484,7 +486,7 @@ VMPrimitiveTest >> testPrimitiveArrayBecomeOneWayCreatesForwardThatPointsToOrigi self assert: (memory followForwarded: object1) equals: object2 ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacter [ interpreter push: (memory integerObjectOf: 65). @@ -494,7 +496,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacter [ self assert: interpreter stackTop equals: (memory characterObjectOf: 65). ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ | invalidNumber | @@ -513,7 +515,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsForOutOfRangeArg [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAsCharacter' } +{ #category : 'tests - primitiveAsCharacter' } VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ interpreter push: memory trueObject. @@ -524,7 +526,7 @@ VMPrimitiveTest >> testPrimitiveAsCharacterFailsWithNonIntObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -548,7 +550,7 @@ VMPrimitiveTest >> testPrimitiveAtDoesntFailsIfObjectIsImmutable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: interpreter stackTop. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -559,7 +561,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -574,7 +576,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -588,7 +590,7 @@ VMPrimitiveTest >> testPrimitiveAtFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ | class objectInstance biggerClass objectForwarded array1 array2 | "Forwarding an object happens when becoming it with a bigger object" @@ -618,7 +620,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForForwardedReceiver [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ interpreter push: (memory integerObjectOf: 32). @@ -630,7 +632,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ | class objectInstance | "I don't know how to force a bad argument count." @@ -653,7 +655,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForMoreThanTwoArguments [ self assert: interpreter primFailCode equals: PrimErrInappropriate. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -669,7 +671,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIndexableObject [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ | class objectInstance | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -684,7 +686,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsForNonIntegerArgument [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ | class object slotIndex objectToPutInSlot | @@ -707,7 +709,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsContext [ self assert: interpreter primFailCode equals: 2. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ | class object slotIndex objectToPutInSlot | @@ -731,7 +733,7 @@ VMPrimitiveTest >> testPrimitiveAtPutFailsIfObjectIsImmutable [ self assert: interpreter primFailCode equals: PrimErrNoModification. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -747,7 +749,7 @@ VMPrimitiveTest >> testPrimitiveAtPutPutsTheValueForAnIndexableObject [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -770,7 +772,7 @@ VMPrimitiveTest >> testPrimitiveAtReturnsTheValueForAnIndexableObject [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger >> memory numSmallIntegerTagBits)). @@ -781,7 +783,7 @@ VMPrimitiveTest >> testPrimitiveBifShitBorderCase [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -792,7 +794,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAnd2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -803,7 +805,7 @@ VMPrimitiveTest >> testPrimitiveBitAnd2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ | string | @@ -820,7 +822,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ | string | @@ -834,7 +836,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -845,7 +847,7 @@ VMPrimitiveTest >> testPrimitiveBitAndFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ "This insures the fact that no data is lost during the processing of usqInt by the primitive" @@ -861,7 +863,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : #'tests - primitiveBitAnd' } +{ #category : 'tests - primitiveBitAnd' } VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ "111... 010110 -> -42 000... 010110 -> 21""" @@ -874,7 +876,7 @@ VMPrimitiveTest >> testPrimitiveBitAndWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: 21). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -885,7 +887,7 @@ VMPrimitiveTest >> testPrimitiveBitOr1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr2 [ interpreter push: (memory integerObjectOf: 16r1). @@ -900,7 +902,7 @@ VMPrimitiveTest >> testPrimitiveBitOr2 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr3 [ interpreter push: (memory integerObjectOf: 16r0). @@ -915,7 +917,7 @@ VMPrimitiveTest >> testPrimitiveBitOr3 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOr4 [ "This is to insure that primitiveBitOr executes a logical Or and not an XOr" @@ -931,7 +933,7 @@ VMPrimitiveTest >> testPrimitiveBitOr4 [ ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ interpreter push: memory trueObject. @@ -945,7 +947,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -956,7 +958,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -967,7 +969,7 @@ VMPrimitiveTest >> testPrimitiveBitOrFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ "This insure the fact that no data is lost during the processing of usqInt by the primitive" @@ -983,7 +985,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: (num - 1)). ] -{ #category : #'tests - primitiveBitOr' } +{ #category : 'tests - primitiveBitOr' } VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ interpreter push: (memory integerObjectOf: -73). @@ -994,7 +996,7 @@ VMPrimitiveTest >> testPrimitiveBitOrWithNegativNumbers [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> memory numSmallIntegerTagBits) - 1)). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShift1 [ interpreter push: (memory integerObjectOf: 2). @@ -1005,7 +1007,7 @@ VMPrimitiveTest >> testPrimitiveBitShift1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1018,7 +1020,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -1031,7 +1033,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ interpreter push: memory trueObject. @@ -1044,7 +1046,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftFailsWithTypeErrorPreservesStack [ ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftLeft [ interpreter push: (memory integerObjectOf: 16). @@ -1055,7 +1057,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftLeft [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftRight [ interpreter push: (memory integerObjectOf: 16). @@ -1066,7 +1068,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftRight [ self assert: interpreter stackTop equals: (memory integerObjectOf: 8). ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ memory wordSize = 8 ifFalse: [ ^ self ]. "The 32 bits version of the primitive doesn't handle the negativ number case" @@ -1078,7 +1080,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithNegativNumbers [ equals: (memory integerObjectOf: 16r1C00000000000000) ] -{ #category : #'tests - primitiveBitShift' } +{ #category : 'tests - primitiveBitShift' } VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ "Insures no data is lost when bitshift overflows the integer type." @@ -1090,7 +1092,7 @@ VMPrimitiveTest >> testPrimitiveBitShiftWithOverflow [ self assert: (interpreter stackTop) > (memory maxSmallInteger). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor1 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1101,7 +1103,7 @@ VMPrimitiveTest >> testPrimitiveBitXor1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor2 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1112,7 +1114,7 @@ VMPrimitiveTest >> testPrimitiveBitXor2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor3 [ interpreter push: (memory integerObjectOf: 16r1). @@ -1123,7 +1125,7 @@ VMPrimitiveTest >> testPrimitiveBitXor3 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXor4 [ interpreter push: (memory integerObjectOf: 16r0). @@ -1134,7 +1136,7 @@ VMPrimitiveTest >> testPrimitiveBitXor4 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ interpreter push: memory trueObject. @@ -1148,7 +1150,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsPreservesStack [ self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1159,7 +1161,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1170,7 +1172,7 @@ VMPrimitiveTest >> testPrimitiveBitXorFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ "This guarantees the fact that no data is lost during the processing of usqInt by the primitive" "111... 111 @@ -1190,7 +1192,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithMaxBitIntWithNoDataLoss [ self assert: interpreter stackTop equals: (memory integerObjectOf: ((memory maxCInteger >> (memory numSmallIntegerTagBits + 1)))). ] -{ #category : #'tests - primitiveBitXor' } +{ #category : 'tests - primitiveBitXor' } VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ interpreter push: (memory integerObjectOf: -42). @@ -1201,7 +1203,7 @@ VMPrimitiveTest >> testPrimitiveBitXorWithNegativNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 40). ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqualsZero [ interpreter push: self setUpForwardedObjects. @@ -1215,7 +1217,7 @@ VMPrimitiveTest >> testPrimitiveClassDoesntFailsForForwardedObjectAndArgCountEqu ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZero [ interpreter push: self setUpForwardedObjects. @@ -1230,7 +1232,7 @@ VMPrimitiveTest >> testPrimitiveClassFailsForForwardedObjectAndArgCountMoreThanZ ] -{ #category : #'tests - primitiveClass' } +{ #category : 'tests - primitiveClass' } VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ interpreter push: memory trueObject. @@ -1242,7 +1244,7 @@ VMPrimitiveTest >> testPrimitiveClassReturnsAClass [ ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesArgCountLessThanOne [ | array1 size | @@ -1260,7 +1262,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesArgCountLessThanOne [ self assert: interpreter failed ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesEmpty [ | array1 array2 | @@ -1276,7 +1278,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesEmpty [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesIdentity [ | array1 size | @@ -1296,7 +1298,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesIdentity [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize1 [ | array1 array2 size | @@ -1319,7 +1321,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize1 [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize2 [ | array1 array2 size | @@ -1342,7 +1344,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentSize2 [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentValues [ | array1 array2 size | @@ -1363,7 +1365,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithDifferentValues [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithLastDifferentValue [ | array1 array2 size | @@ -1385,7 +1387,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithLastDifferentValue [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteArgument [ | array1 size nilClass | @@ -1406,7 +1408,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteArgument [ self assert: interpreter failed ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiver [ | array1 size nilClass | @@ -1428,7 +1430,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiver [ self assert: interpreter failed ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiverShouldLeaveTheSameStack [ | array1 size nilClass | @@ -1451,7 +1453,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithNonByteReceiverShouldLeaveTheSam self assert: (interpreter stackValue: 1) equals: memory nilObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithSize [ | array1 array2 size | @@ -1472,7 +1474,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithSize [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareBytesWithWordArgument [ | array1 array2 size | @@ -1491,7 +1493,7 @@ VMPrimitiveTest >> testPrimitiveCompareBytesWithWordArgument [ self assert: interpreter failed ] -{ #category : #'tests - primitiveCompareBytes' } +{ #category : 'tests - primitiveCompareBytes' } VMPrimitiveTest >> testPrimitiveCompareWordsEmpty [ | array1 array2 | @@ -1507,7 +1509,7 @@ VMPrimitiveTest >> testPrimitiveCompareWordsEmpty [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDiv [ interpreter push: (memory integerObjectOf: 15). @@ -1520,7 +1522,7 @@ VMPrimitiveTest >> testPrimitiveDiv [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ interpreter push: (memory trueObject). @@ -1533,7 +1535,7 @@ VMPrimitiveTest >> testPrimitiveDivFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1544,7 +1546,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1555,7 +1557,7 @@ VMPrimitiveTest >> testPrimitiveDivFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ "In the primitive implementation of quo, it doesnt push the rest of the operation on the stack" @@ -1567,7 +1569,7 @@ VMPrimitiveTest >> testPrimitiveDivOnNonIntegerResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1578,7 +1580,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1589,7 +1591,7 @@ VMPrimitiveTest >> testPrimitiveDivWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 4). @@ -1600,7 +1602,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -1611,7 +1613,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDiv' } +{ #category : 'tests - primitiveDiv' } VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1626,7 +1628,7 @@ VMPrimitiveTest >> testPrimitiveDivWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivide [ interpreter push: (memory integerObjectOf: 4). @@ -1637,7 +1639,7 @@ VMPrimitiveTest >> testPrimitiveDivide [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 2). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ interpreter push: (memory trueObject). @@ -1649,7 +1651,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ "The interpreter fails because 42%4 != 0" @@ -1663,7 +1665,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsOnFloatResult [ ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -1674,7 +1676,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -1685,7 +1687,7 @@ VMPrimitiveTest >> testPrimitiveDivideFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -1696,7 +1698,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -1707,7 +1709,7 @@ VMPrimitiveTest >> testPrimitiveDivideWith0DivisionOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ interpreter push: (memory integerObjectOf: 6). @@ -1718,7 +1720,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -3). ] -{ #category : #'tests - primitiveDivide' } +{ #category : 'tests - primitiveDivide' } VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -42). @@ -1729,7 +1731,7 @@ VMPrimitiveTest >> testPrimitiveDivideWithNegativeNumbers2 [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: -21). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self installFloatClass. @@ -1742,7 +1744,7 @@ VMPrimitiveTest >> testPrimitiveEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -1753,7 +1755,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 15). @@ -1764,7 +1766,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 15). @@ -1775,7 +1777,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -1790,7 +1792,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory falseObject). @@ -1801,7 +1803,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual' } +{ #category : 'tests - primitiveEqual' } VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -1812,7 +1814,7 @@ VMPrimitiveTest >> testPrimitiveEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - Float64Array' } +{ #category : 'tests - primitiveAdd - Float64Array' } VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ | x y z result firstTerm size | @@ -1836,7 +1838,7 @@ VMPrimitiveTest >> testPrimitiveFloat64ArrayAdd [ self assert: (memory fetchFloat64: 1 ofObject: result) equals: 22.0. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate [ | object | @@ -1854,7 +1856,7 @@ VMPrimitiveTest >> testPrimitiveFormatFailsWhenReceiverIsImmediate [ equals: (memory integerObjectOf: memory ephemeronFormat) ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatShouldFail [ | object | @@ -1867,7 +1869,7 @@ VMPrimitiveTest >> testPrimitiveFormatShouldFail [ self assert: interpreter failed ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithArray [ | object | @@ -1885,7 +1887,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithArray [ equals: (memory integerObjectOf: memory arrayFormat) ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithByteFormat [ | object | @@ -1903,7 +1905,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithByteFormat [ equals: (memory integerObjectOf: memory firstByteFormat) ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithCompiledMethod [ | object | @@ -1921,7 +1923,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithCompiledMethod [ equals: (memory integerObjectOf: memory firstCompiledMethodFormat) ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithEphemeron [ | object | @@ -1939,7 +1941,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithEphemeron [ equals: (memory integerObjectOf: memory ephemeronFormat) ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveFormatWithWeakArray [ | object | @@ -1957,7 +1959,7 @@ VMPrimitiveTest >> testPrimitiveFormatWithWeakArray [ equals: (memory integerObjectOf: memory weakArrayFormat) ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ interpreter push: (memory integerObjectOf: 1). @@ -1966,7 +1968,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOfImmediateReturnsTrue [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1979,7 +1981,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityOnANewObjectIsFalse [ self assert: interpreter stackTop equals: memory falseObject ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ | class object | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -1993,7 +1995,7 @@ VMPrimitiveTest >> testPrimitiveGetImmutabilityReturnsTrueIfObjectIsImmutable [ self assert: interpreter stackTop equals: memory trueObject ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2007,7 +2009,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2018,7 +2020,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2029,7 +2031,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2040,7 +2042,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2051,7 +2053,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2062,7 +2064,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2073,7 +2075,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2088,7 +2090,7 @@ VMPrimitiveTest >> testPrimitiveGreaterOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2099,7 +2101,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2110,7 +2112,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2121,7 +2123,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2132,7 +2134,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2143,7 +2145,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError1 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ interpreter push: (memory integerObjectOf: -1000). @@ -2154,7 +2156,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoError2 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2165,7 +2167,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveGreaterThan' } +{ #category : 'tests - primitiveGreaterThan' } VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2180,7 +2182,7 @@ VMPrimitiveTest >> testPrimitiveGreaterThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectWithArgCountLessThanOne [ |object1| "Tests the case where objectArg = 1 and: isOopFowarded: stackTop" @@ -2197,7 +2199,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalDoesntFailForForwardedOopOnOtherObjectW self deny: interpreter failed. ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ |object1| "Tests the case where objectArg > 1 and: isOopFowarded: stackTop" @@ -2216,7 +2218,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnOtherObject [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ |object1| @@ -2232,7 +2234,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalFailsForForwardedOopOnReceiver [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ interpreter push: memory trueObject. @@ -2244,7 +2246,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsBool [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButDifferentType [ | object1 object2 | @@ -2263,7 +2265,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseForObjectsWithSameValueButD ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ | object | @@ -2279,7 +2281,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsFalseWithWrongArgCount [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ | object | @@ -2293,7 +2295,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForIdenticalObject [ ] -{ #category : #'tests - primitiveIdentical' } +{ #category : 'tests - primitiveIdentical' } VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameValue [ | object1 object2 | @@ -2309,7 +2311,7 @@ VMPrimitiveTest >> testPrimitiveIdenticalReturnsTrueForImmediateObjectsWithSameV ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ interpreter push: (memory trueObject). @@ -2322,7 +2324,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerFailsWithTypeError [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ interpreter push: (memory characterObjectOf: 66). @@ -2335,7 +2337,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithChar [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ interpreter push: (memory integerObjectOf: 0). @@ -2348,7 +2350,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithFloat [ ] -{ #category : #'tests - primitiveImmediateAsInteger' } +{ #category : 'tests - primitiveImmediateAsInteger' } VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ interpreter push: (memory integerObjectOf: memory maxSmallInteger). @@ -2361,7 +2363,7 @@ VMPrimitiveTest >> testPrimitiveImmediateAsIntegerWithInt [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -2376,7 +2378,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2391,7 +2393,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtOverBoundShouldFailForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat . @@ -2407,7 +2409,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2423,7 +2425,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2439,7 +2441,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -2464,7 +2466,7 @@ VMPrimitiveTest >> testPrimitiveInstVarAtReturnsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedBool [ interpreter push: (memory trueObject). @@ -2475,7 +2477,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedBool [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -2486,7 +2488,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveIsPinned' } +{ #category : 'tests - primitiveIsPinned' } VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ interpreter push: (memory integerObjectOf: 16). @@ -2497,7 +2499,7 @@ VMPrimitiveTest >> testPrimitiveIsPinnedFailsForImmediateObjects [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2508,7 +2510,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2519,7 +2521,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2530,7 +2532,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2541,7 +2543,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2552,7 +2554,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2567,7 +2569,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2578,7 +2580,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual' } +{ #category : 'tests - primitiveLessOrEqual' } VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory trueObject). @@ -2589,7 +2591,7 @@ VMPrimitiveTest >> testPrimitiveLessOrEqualsFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -2600,7 +2602,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2611,7 +2613,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2622,7 +2624,7 @@ VMPrimitiveTest >> testPrimitiveLessThanFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -2633,7 +2635,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ interpreter push: (memory integerObjectOf: 42). @@ -2644,7 +2646,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -2655,7 +2657,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ interpreter push: (memory integerObjectOf: 0). @@ -2666,7 +2668,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorEquals [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveLessThan' } +{ #category : 'tests - primitiveLessThan' } VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2681,7 +2683,7 @@ VMPrimitiveTest >> testPrimitiveLessThanWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ | class array | @@ -2701,7 +2703,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ | class array | @@ -2719,7 +2721,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFrom64BitEmptyArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 0.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ | class array | @@ -2739,7 +2741,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromByteArrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ | class array | @@ -2759,7 +2761,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger16Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ | class array | @@ -2779,7 +2781,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesFromInteger32Arrays [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ | class array | @@ -2799,7 +2801,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ | class array | @@ -2819,7 +2821,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ | class array | @@ -2841,7 +2843,7 @@ VMPrimitiveTest >> testPrimitiveLoadFloat64FromBytesSecondBytes [ self assert: (memory floatValueOf: interpreter stackTop) equals: 42.0. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveMod [ interpreter push: (memory integerObjectOf: 16). @@ -2854,7 +2856,7 @@ VMPrimitiveTest >> testPrimitiveMod [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ interpreter push: (memory trueObject). @@ -2869,7 +2871,7 @@ VMPrimitiveTest >> testPrimitiveModFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -2880,7 +2882,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 42). @@ -2892,7 +2894,7 @@ VMPrimitiveTest >> testPrimitiveModFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMod' } +{ #category : 'tests - primitiveMod' } VMPrimitiveTest >> testPrimitiveModNegativeValue [ interpreter push: (memory integerObjectOf: 16). @@ -2905,7 +2907,7 @@ VMPrimitiveTest >> testPrimitiveModNegativeValue [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ interpreter push: (memory integerObjectOf: memory maxCInteger >> memory numSmallIntegerTagBits). @@ -2918,7 +2920,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyBy0 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -2929,7 +2931,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -2940,7 +2942,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ interpreter push: (memory trueObject). @@ -2953,7 +2955,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ interpreter push: (memory integerObjectOf: 16). @@ -2966,7 +2968,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflow [ self assert: interpreter stackTop equals: (memory integerObjectOf: 32). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -2981,7 +2983,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithNoOverflowPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ interpreter push: (memory integerObjectOf: (memory maxSmallInteger)). @@ -2992,7 +2994,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflow [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply' } +{ #category : 'tests - primitiveMultiply' } VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ interpreter push: (memory integerObjectOf: 16). @@ -3004,7 +3006,7 @@ VMPrimitiveTest >> testPrimitiveMultiplyWithOverflowPreservesStack [ self assert: (interpreter stackValue: 2) equals: (memory integerObjectOf: 16). ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3016,7 +3018,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ | class | class := self newClassInOldSpaceWithSlots: 4 instSpec: memory nonIndexablePointerFormat. @@ -3027,7 +3029,7 @@ VMPrimitiveTest >> testPrimitiveNewCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: interpreter stackTop) equals: 4 ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ | class | @@ -3041,7 +3043,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceAllocatesInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ | class | @@ -3055,7 +3057,7 @@ VMPrimitiveTest >> testPrimitiveNewInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3066,7 +3068,7 @@ VMPrimitiveTest >> testPrimitiveNewIsNotPinned [ self deny: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewOldSpace' } +{ #category : 'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3079,7 +3081,7 @@ VMPrimitiveTest >> testPrimitiveNewOldCreatesTheObjectInOldSpace [ self assert: (memory isOld: interpreter stackTop) ] -{ #category : #'tests - primitiveNewOldSpace' } +{ #category : 'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -3095,7 +3097,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewOldSpace' } +{ #category : 'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3107,7 +3109,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewOldSpace' } +{ #category : 'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3121,7 +3123,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsCreatesTheObjectInOldSpace [ self assert: (memory isOld: interpreter stackTop) ] -{ #category : #'tests - primitiveNewOldSpace' } +{ #category : 'tests - primitiveNewOldSpace' } VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3134,7 +3136,7 @@ VMPrimitiveTest >> testPrimitiveNewOldSpaceWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3146,7 +3148,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 3 instSpec: memory nonIndexablePointerFormat. @@ -3162,7 +3164,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectInFullNewSpaceIsSchedulingGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3174,7 +3176,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory nonIndexablePointerFormat. @@ -3186,7 +3188,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3199,7 +3201,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsCreatesTheObjectInOldSpace [ self deny: (memory isYoung: interpreter stackTop) ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3212,7 +3214,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsNotSchedulingGC [ self deny: memory needGCFlag ] -{ #category : #'tests - primitiveNewPinned' } +{ #category : 'tests - primitiveNewPinned' } VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3225,7 +3227,7 @@ VMPrimitiveTest >> testPrimitiveNewPinnedWithArgsObjectIsPinned [ self assert: (memory isPinned: interpreter stackTop) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ | newObj class | @@ -3242,7 +3244,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectInYoungSpace [ self assert: (memory isYoung: newObj) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ | newObj class | @@ -3258,7 +3260,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgCreatesTheObjectWithCorrectSize [ self assert: (memory numSlotsOf: newObj) equals: 7 ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ | newObj class | @@ -3276,7 +3278,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceAllocatesInOldSpace [ self assert: (memory getMemoryMap isOldObject: newObj) ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ | class | @@ -3292,7 +3294,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgInFullNewSpaceScheduleGC [ self assert: memory needGCFlag ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ | class | @@ -3306,7 +3308,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ | class | @@ -3321,7 +3323,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ | class | @@ -3337,7 +3339,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNewWithArgs' } +{ #category : 'tests - primitiveNewWithArgs' } VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ | class | @@ -3351,7 +3353,7 @@ VMPrimitiveTest >> testPrimitiveNewWithArgWithNegativeArgumentFails [ self assert: interpreter primFailCode equals: PrimErrBadArgument ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ | class | class := self newClassInOldSpaceWithSlots: 0 instSpec: memory arrayFormat. @@ -3362,7 +3364,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ | class | "class object with no slots, so no format" @@ -3374,7 +3376,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails2 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNew' } +{ #category : 'tests - primitiveNew' } VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ | class | "class with nil used as format" @@ -3387,7 +3389,7 @@ VMPrimitiveTest >> testPrimitiveNewWithInvalidClassFails3 [ self assert: interpreter primFailCode equals: PrimErrBadReceiver ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" @@ -3398,7 +3400,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualFailsWithFloat [ self assert: interpreter failed ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ interpreter push: (memory integerObjectOf: -13). @@ -3409,7 +3411,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNegativeNumbers [ self deny: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ interpreter push: (memory integerObjectOf: 16). @@ -3420,7 +3422,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError1 [ self assert: interpreter stackTop equals: (memory falseObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ interpreter push: (memory integerObjectOf: 16). @@ -3431,7 +3433,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoError2 [ self assert: interpreter stackTop equals: (memory trueObject). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3446,7 +3448,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ interpreter push: (memory trueObject). @@ -3457,7 +3459,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual' } +{ #category : 'tests - primitiveNotEqual' } VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 16). @@ -3468,7 +3470,7 @@ VMPrimitiveTest >> testPrimitiveNotEqualWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ interpreter push: self setUpForwardedObjects. @@ -3479,7 +3481,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForForwardedObjects [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ interpreter push: (memory integerObjectOf: 16). @@ -3490,7 +3492,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForImmediate [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ interpreter push: (memory instantiateClass: (self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat)). @@ -3502,7 +3504,7 @@ VMPrimitiveTest >> testPrimitivePinFailsForNOnBoolOnSecondArg [ self assert: interpreter primFailCode equals: PrimErrBadArgument. ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ |object object2| @@ -3521,7 +3523,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInNewSpace [ self assert: (memory isPinned: object2). ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ |object| @@ -3541,7 +3543,7 @@ VMPrimitiveTest >> testPrimitivePinPinsObjectCreatedInOldSpace [ ] -{ #category : #'tests - primitivePin' } +{ #category : 'tests - primitivePin' } VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ |object| @@ -3561,7 +3563,7 @@ VMPrimitiveTest >> testPrimitivePinReturnsBoolean [ ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuo [ interpreter push: (memory integerObjectOf: 15). @@ -3571,7 +3573,7 @@ VMPrimitiveTest >> testPrimitiveQuo [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 7). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ interpreter push: (memory trueObject). @@ -3584,7 +3586,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailPreservesStack [ self assert: (interpreter stackValue: 1) equals: (memory trueObject). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -3595,7 +3597,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -3606,7 +3608,7 @@ VMPrimitiveTest >> testPrimitiveQuoFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ "Tests that the rest of the integer division is not pushed into the stack, as this is not expected in a primitive behavior" interpreter push: (memory integerObjectOf: 16). @@ -3618,7 +3620,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultDoesntReturnRest [ self assert: (interpreter stackValue: 1) equals: (memory integerObjectOf: 16). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ interpreter push: (memory integerObjectOf: 42). @@ -3629,7 +3631,7 @@ VMPrimitiveTest >> testPrimitiveQuoOnFloatResultRoundsAndDoesntFail [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 10). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ interpreter push: (memory integerObjectOf: 0). @@ -3640,7 +3642,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnFirstOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ interpreter push: (memory integerObjectOf: 4). @@ -3651,7 +3653,7 @@ VMPrimitiveTest >> testPrimitiveQuoWith0DivisionOnSecondOperand [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 0). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ interpreter push: (memory integerObjectOf: -13). @@ -3662,7 +3664,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers1 [ self assert: interpreter stackTop equals: (memory integerObjectOf: 6). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ interpreter push: (memory integerObjectOf: -9). @@ -3673,7 +3675,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNegativeNumbers2 [ self assert: interpreter stackTop equals: (memory integerObjectOf: -2). ] -{ #category : #'tests - primitiveQuo' } +{ #category : 'tests - primitiveQuo' } VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -3688,7 +3690,7 @@ VMPrimitiveTest >> testPrimitiveQuoWithNoErrorPopsOperands [ self assert: interpreter stackTop equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ interpreter push: (memory integerObjectOf: 1). @@ -3698,7 +3700,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfImmediateShouldFail [ self assert: interpreter failed ] -{ #category : #'tests - primitiveImmutability' } +{ #category : 'tests - primitiveImmutability' } VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ | class object | @@ -3713,7 +3715,7 @@ VMPrimitiveTest >> testPrimitiveSetImmutabilityOfObjectAsTrueSetsImmutability [ self assert: (memory isImmutable: object) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ | method | @@ -3728,7 +3730,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForContext [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ | array1 | @@ -3741,7 +3743,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForIndexableObject [ ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ | method | @@ -3756,7 +3758,7 @@ VMPrimitiveTest >> testPrimitiveSizeAnswersCorrectSizeForMethod [ equals: (memory integerObjectOf: 10 + wordSize) ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ | array1 array2 arrayForwarder arrayForwardee | @@ -3781,7 +3783,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObject [ ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderResolutionAndCallPrimitiveAgain [ | array1 array2 arrayForwarder arrayForwardee | @@ -3808,7 +3810,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForForwardedObjectThenCallForwarderReso ] -{ #category : #'tests - primitiveSize' } +{ #category : 'tests - primitiveSize' } VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ | class objectInstance | "Forwarding an object happens when becoming it with a bigger object" @@ -3824,7 +3826,7 @@ VMPrimitiveTest >> testPrimitiveSizeFailsForNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadReceiver. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3839,7 +3841,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3854,7 +3856,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory arrayFormat. @@ -3870,7 +3872,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailForIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3886,7 +3888,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutOverBoundShouldFailNonIndexable [ self assert: interpreter primFailCode equals: PrimErrBadIndex. ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3902,7 +3904,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutPutsTheValueForNonIndexable [ self assert: (memory fetchPointer: 0 ofObject: object) equals: memory falseObject. ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ | class object | class := self newClassInOldSpaceWithSlots: 1 instSpec: memory nonIndexablePointerFormat. @@ -3924,7 +3926,7 @@ VMPrimitiveTest >> testPrimitiveSlotAtPutsTheValueForNonIndexable [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3941,7 +3943,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAdd [ equals: (memory smallFloatObjectOf: 10.0) ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3958,7 +3960,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnFirstOperandWithTypeErrorPre self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3975,7 +3977,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsOnSecondOperandWithTypeErrorPr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -3989,7 +3991,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnFirstOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4003,7 +4005,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddFailsWithTypeErrorOnSecondOperand [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveAdd - SmallFloat' } +{ #category : 'tests - primitiveAdd - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4021,7 +4023,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatAddPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4038,7 +4040,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivide [ equals: (memory smallFloatObjectOf: 1.0) ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4055,7 +4057,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnFirstOperandWithTypeError self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4072,7 +4074,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnSecondOperandWithTypeErro self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4090,7 +4092,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsOnZeroDivisionPreservesStac self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 0.0). ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4104,7 +4106,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4118,7 +4120,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithTypeErrorOnSecondOperan self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4131,7 +4133,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDivideFailsWithZeroDivision [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveDivide - SmallFloat' } +{ #category : 'tests - primitiveDivide - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4149,7 +4151,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatDividePopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4164,7 +4166,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4179,7 +4181,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4193,7 +4195,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnFirstOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4207,7 +4209,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorOnSecondOperand self assert: interpreter failed. ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4224,7 +4226,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualFailsWithTypeErrorPreservesStack self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4243,7 +4245,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveEqual - SmallFloat' } +{ #category : 'tests - primitiveEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4258,7 +4260,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4273,7 +4275,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4290,7 +4292,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualEquality [ ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4307,7 +4309,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnFirstOperandWithT self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4324,7 +4326,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsOnSecondOperandWith self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4338,7 +4340,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnFirs self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4352,7 +4354,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualFailsWithTypeErrorOnSeco self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4372,7 +4374,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterOrEqual - SmallFloat' } +{ #category : 'tests - primitiveGreaterOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4387,7 +4389,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4402,7 +4404,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThan [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4419,7 +4421,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4436,7 +4438,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4450,7 +4452,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4464,7 +4466,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4483,7 +4485,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThanPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveGreaterThan - SmallFloat' } +{ #category : 'tests - primitiveGreaterThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4498,7 +4500,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatGreaterThantWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4513,7 +4515,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4528,7 +4530,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualEquality [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4545,7 +4547,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnFirstOperandWithType self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4562,7 +4564,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsOnSecondOperandWithTyp self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4576,7 +4578,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnFirstOp self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4590,7 +4592,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualFailsWithTypeErrorOnSecondO self assert: interpreter failed. ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4609,7 +4611,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveLessOrEqual - SmallFloat' } +{ #category : 'tests - primitiveLessOrEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4624,7 +4626,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessOrEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4641,7 +4643,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThan [ ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4657,7 +4659,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnFirstOpera ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4673,7 +4675,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorOnSecondOper ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4692,7 +4694,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanFailsWithTypeErrorPreservesSta ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4714,7 +4716,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThanPopsOperands [ ] -{ #category : #'tests - primitiveLessThan - SmallFloat' } +{ #category : 'tests - primitiveLessThan - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4730,7 +4732,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatLessThantWithNegativeNumbers [ ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4747,7 +4749,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiply [ equals: (memory smallFloatObjectOf: 100.0) ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4766,7 +4768,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnFirstOperandWithTypeErr ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4785,7 +4787,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsOnSecondOperandWithTypeEr ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4799,7 +4801,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4813,7 +4815,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveMultiply - SmallFloat' } +{ #category : 'tests - primitiveMultiply - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4831,7 +4833,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatMultiplyPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4846,7 +4848,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqual [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4861,7 +4863,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualEqual [ self assert: interpreter stackTop equals: memory falseObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4878,7 +4880,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnFirstOperandWithTypeErr self assert: (interpreter stackValue: 1) equals: memory trueObject. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4895,7 +4897,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4909,7 +4911,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4923,7 +4925,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4942,7 +4944,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveNotEqual - SmallFloat' } +{ #category : 'tests - primitiveNotEqual - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4957,7 +4959,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatNotEqualtWithNegativeNumbers [ self assert: interpreter stackTop equals: memory trueObject. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4972,7 +4974,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtract [ self assert: interpreter stackTop equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeErrorPreservesStack [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -4989,7 +4991,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsOnSecondOperandWithTypeEr self assert: (interpreter stackValue: 1) equals: (memory smallFloatObjectOf: 2.0). ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -5003,7 +5005,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnFirstOpera self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOperand [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -5017,7 +5019,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractFailsWithTypeErrorOnSecondOper self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract - SmallFloat' } +{ #category : 'tests - primitiveSubtract - SmallFloat' } VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self wordSize = 8 ifFalse: [ ^ self skip]. @@ -5036,7 +5038,7 @@ VMPrimitiveTest >> testPrimitiveSmallFloatSubtractPopsOperands [ self assert: (interpreter stackTop) equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ | class array | @@ -5057,7 +5059,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesNegativeIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ | class array | @@ -5078,7 +5080,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64FromBytesOverflowIndex [ self assert: interpreter stackTop equals: 42 ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ | class array | @@ -5097,7 +5099,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesFor64BitArrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ | class array | @@ -5116,7 +5118,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForByteArrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ | class array | @@ -5135,7 +5137,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger16Arrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ | class array | @@ -5154,7 +5156,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForInteger32Arrays [ ] -{ #category : #'tests - primitiveFloat64' } +{ #category : 'tests - primitiveFloat64' } VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ | class array | @@ -5173,7 +5175,7 @@ VMPrimitiveTest >> testPrimitiveStoreFloat64IntoBytesForSecondSlotArrays [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -5189,7 +5191,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldFailForNonCharacterArgument [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -5206,7 +5208,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotFailWhenReceiverIsAString [ ] -{ #category : #'tests - primitiveAtPut' } +{ #category : 'tests - primitiveAtPut' } VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -5224,7 +5226,7 @@ VMPrimitiveTest >> testPrimitiveStringAtPutShouldNotModifyStringIfFailedWhenNonC self assert: string contentEquals: (self newString: 'po') ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ "Every other test is common with at:put:" | objectInstance | @@ -5239,7 +5241,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldFailForNonCharacterArgument [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ "Every other test is common with at:put:" | string | @@ -5262,7 +5264,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotFailWhenReceiverIsAString [ ] -{ #category : #'tests - primitiveAt' } +{ #category : 'tests - primitiveAt' } VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonCharacterArgument [ "Every other test is common with at:put:" @@ -5280,7 +5282,7 @@ VMPrimitiveTest >> testPrimitiveStringAtShouldNotModifyStringIfFailedWhenNonChar self assert: string contentEquals: (self newString: 'po') ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5300,7 +5302,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithHigherSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -5320,7 +5322,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithIsNotCaseSensitive [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ | nonCaseSensitiveOrder lowerByteSymbol upperByteSymbol | @@ -5340,7 +5342,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLimitCaseRegretion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ | asciiOrder aByteSymbol bByteSymbol | @@ -5360,7 +5362,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithLowerSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - primitiveStringCompare' } +{ #category : 'tests - primitiveStringCompare' } VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ | byteSymbol asciiOrder | @@ -5379,7 +5381,7 @@ VMPrimitiveTest >> testPrimitiveStringCompareWithTheSameSymbol [ self assert: interpreter stackTop equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ interpreter push: memory trueObject. @@ -5392,7 +5394,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnFirstOperand [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ interpreter push: (memory integerObjectOf: 2). @@ -5405,7 +5407,7 @@ VMPrimitiveTest >> testPrimitiveSubtracFailsWithTypeErrorOnSecondOperand [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ | string | @@ -5420,7 +5422,7 @@ VMPrimitiveTest >> testPrimitiveSubtractFailsWithTypeErrorPreservesStack [ self assert: (interpreter stackValue: 1) equals: string. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ interpreter push: (memory integerObjectOf: 2). @@ -5435,7 +5437,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflow [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ interpreter push: (memory integerObjectOf: 42). "Marker" @@ -5452,7 +5454,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithNoOverflowPopsOperands [ ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ interpreter push: (memory integerObjectOf: memory minSmallInteger). @@ -5463,7 +5465,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflow [ self assert: interpreter failed. ] -{ #category : #'tests - primitiveSubtract' } +{ #category : 'tests - primitiveSubtract' } VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ | minSmallInt | @@ -5481,7 +5483,7 @@ VMPrimitiveTest >> testPrimitiveSubtractWithOverflowPreservesStack [ ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ interpreter setImageVersion: 110. @@ -5496,7 +5498,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterGetsImageVersion [ self assert: interpreter stackTop equals: (memory integerObjectOf: 110). ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ | slots | @@ -5522,7 +5524,7 @@ VMPrimitiveTest >> testPrimitiveVMParameterReturnsArrayOfOops [ memory okayOop: (memory fetchPointer: i ofObject: interpreter stackTop) ] ] -{ #category : #'tests - primitiveVMParameter' } +{ #category : 'tests - primitiveVMParameter' } VMPrimitiveTest >> testPrimitiveVMParameterSetsImageVersion [ interpreter push: memory nilObject. diff --git a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st index 8ec7e8c742..895ba3b5f2 100644 --- a/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMPushThisContextRoutineTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMPushThisContextRoutineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMPushThisContextRoutineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> setUp [ | contextClass | @@ -27,7 +29,7 @@ VMPushThisContextRoutineTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | @@ -72,7 +74,7 @@ VMPushThisContextRoutineTest >> testMarriedContextReturnsSpouseObject [ equals: contextOop ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -105,7 +107,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasLargeSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: LargeContextSlots. ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ | isLargeContext isInBlock routine numberOfArguments | @@ -140,7 +142,7 @@ VMPushThisContextRoutineTest >> testNewMarriedContextHasSmallSize [ self assert: (memory numSlotsOf: machineSimulator receiverRegisterValue) equals: SmallContextSlots ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments expectedStackPointer | @@ -177,7 +179,7 @@ VMPushThisContextRoutineTest >> testNewMarriedLargeContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ | isLargeContext isInBlock routine numberOfArguments | @@ -214,7 +216,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasArguments [ self assert: (memory fetchPointer: Context allSlots size +2 ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: 3). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ | isLargeContext isInBlock routine numberOfArguments | @@ -248,7 +250,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInNil [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ | isLargeContext isInBlock routine numberOfArguments | @@ -283,7 +285,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasClosureInSetOne [ self assert: (memory fetchPointer: ClosureIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop expectedStackPointer | @@ -321,7 +323,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasCorrectStackPointer self assert: (memory fetchPointer: StackPointerIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory integerObjectOf: expectedStackPointer). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ | isLargeContext isInBlock routine numberOfArguments | @@ -356,7 +358,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasReceiver [ self assert: (memory fetchPointer: ReceiverIndex ofObject: machineSimulator receiverRegisterValue ) equals: (memory trueObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ | isLargeContext isInBlock routine numberOfArguments | @@ -396,7 +398,7 @@ VMPushThisContextRoutineTest >> testNewMarriedSmallContextHasTemporaries [ self assert: (memory fetchPointer: Context allSlots size + numberOfArguments + 3 ofObject: machineSimulator receiverRegisterValue ) equals: (memory nilObject). ] -{ #category : #tests } +{ #category : 'tests' } VMPushThisContextRoutineTest >> testSingleContextReturnsNewSpouseInNewSpace [ | isLargeContext isInBlock routine numberOfArguments methodObject contextOop | diff --git a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st index 1bf2f3ffe4..df3bbbdc82 100644 --- a/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSegmentsImageFormatTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSegmentsImageFormatTest, - #superclass : #VMAbstractImageFormatTest, - #category : #'VMMakerTests-ImageFormat' + #name : 'VMSegmentsImageFormatTest', + #superclass : 'VMAbstractImageFormatTest', + #category : 'VMMakerTests-ImageFormat', + #package : 'VMMakerTests', + #tag : 'ImageFormat' } -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegment [ | header newSegmentSize | @@ -26,7 +28,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFirstSegme equals: (memory segmentManager segments at: 0) segSize ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage [ | header newSegmentSize | @@ -52,7 +54,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsHasCorrectSizeForFullImage equals: header firstSegSize + newSegmentSize ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBigger [ | newSegmentSize | @@ -68,7 +70,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsBi self assert: newSegmentSize >= memory growHeadroom ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSmaller [ | newSegmentSize | @@ -86,7 +88,7 @@ VMSegmentsImageFormatTest >> testImageWithTwoSegmentsRespectGrowHeadroomWhenIsSm self assert: newSegmentSize >= memory growHeadroom ] -{ #category : #tests } +{ #category : 'tests' } VMSegmentsImageFormatTest >> testMinimalImageHasASingleSegment [ diff --git a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st index 8a162f9399..9b55da5b97 100644 --- a/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSelectorIndexDereferenceRoutineTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMSelectorIndexDereferenceRoutineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSelectorIndexDereferenceRoutineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ "32 bit platforms use a direct selector reference and not an index" @@ -18,7 +20,7 @@ VMSelectorIndexDereferenceRoutineTest >> test32BitsDoesNotGenerateRoutine [ self assert: cogit ceDereferenceSelectorIndex isNil ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -29,7 +31,7 @@ VMSelectorIndexDereferenceRoutineTest >> test64BitsGeneratesRoutine [ self assert: cogit ceDereferenceSelectorIndex notNil ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSpecialSelectorTable [ "64 bit platforms use a selector index and a routine to map it to the real selector" @@ -58,7 +60,7 @@ VMSelectorIndexDereferenceRoutineTest >> testNegativeSelectorIndexIsLookedUpInSp self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMSelectorIndexDereferenceRoutineTest >> testPositiveSelectorIndexIsLookedUpInMethodLiterals [ "64 bit platforms use a selector index and a routine to map it to the real selector" diff --git a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st index 8e4b9726e7..34f53a536e 100644 --- a/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSessionIdTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSessionIdTest, - #superclass : #VMInterpreterTests, - #category : #'VMMakerTests-InterpreterTests' + #name : 'VMSessionIdTest', + #superclass : 'VMInterpreterTests', + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #tests } +{ #category : 'tests' } VMSessionIdTest >> testGlobalSessionID [ "The globalSessionID is stored as a 64 bit number, but for compatibility with older plugins, is restricted to postive signed 32 bit values" | vm predicted diff | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st index 0df1c1ac40..62f82ef61d 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitAbstractTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimpleStackBasedCogitAbstractTest, - #superclass : #VMSpurMemoryManagerTest, + #name : 'VMSimpleStackBasedCogitAbstractTest', + #superclass : 'VMSpurMemoryManagerTest', #instVars : [ 'cogit', 'codeSize', @@ -31,16 +31,18 @@ Class { 'VMBytecodeConstants', 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> imageFormatParameters [ ^ { { (#useComposedImageFormat -> true) } } ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ ^ ParametrizedTestMatrix new @@ -49,7 +51,7 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize32Parameters [ yourself ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ ^ ParametrizedTestMatrix new @@ -58,26 +60,26 @@ VMSimpleStackBasedCogitAbstractTest class >> wordSize64Parameters [ yourself ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitAbstractTest class >> wordSizeParameters [ ^ self wordSize64Parameters + self wordSize32Parameters ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> ISA: anISA [ isa := anISA ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> abstractInstructions [ ^ (0 to: cogit getOpcodeIndex - 1) collect: [ :i | cogit abstractOpcodes at: i ] ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure [ | before after | @@ -89,7 +91,7 @@ VMSimpleStackBasedCogitAbstractTest >> assertPushed: anOop after: aBlockClosure self assert: (self readMemoryAt: after) equals: anOop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlockClosure [ | before | @@ -101,17 +103,17 @@ VMSimpleStackBasedCogitAbstractTest >> assertStackRemainsUnchangedDuring: aBlock equals: before ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> callerAddress [ ^ callerAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> cogit [ ^ cogit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ "Compiles some native code using the code inside the block closure as builder. This version assumes the block has a single 1-bytecode statement @@ -120,13 +122,13 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure [ ^ self compile: aBlockClosure bytecodes: 2 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes [ ^ self compile: aBlockClosure bytecodes: bytecodes headerSize: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecodes headerSize: headerSize [ "Compiles some native code using the code inside the block closure as builder. @@ -151,7 +153,7 @@ VMSimpleStackBasedCogitAbstractTest >> compile: aBlockClosure bytecodes: bytecod ^ allocatedAddress ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ "We will call to this address" @@ -163,7 +165,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileSpecialSend [ sendAddress := self compile: [ cogit genSpecialSelectorSend ]. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampolineName [ | startAddress | @@ -183,7 +185,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileTrampoline: aBlock named: aTrampol ^ startAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytecodes: bytecodes [ "Call a compilation block initializing the compiler before. @@ -201,7 +203,7 @@ VMSimpleStackBasedCogitAbstractTest >> compileWithoutOutput: aBlockClosure bytec ^ aBlockClosure value ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ "Create the root context with a valid method" @@ -237,7 +239,7 @@ VMSimpleStackBasedCogitAbstractTest >> createBaseFrame [ baseFrame := interpreter framePointer ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ self @@ -247,13 +249,13 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: anAddress [ temporaries: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments [ self createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for machine code. @@ -284,7 +286,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramefulCallFrom: returnAddress rec builder buildFrame ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ self @@ -293,7 +295,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: anAddress [ arguments: #() ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress receiver: receiver arguments: arguments [. "I create a frameless call @@ -320,7 +322,7 @@ VMSimpleStackBasedCogitAbstractTest >> createFramelessCallFrom: returnAddress re ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: returnAddress receiver: receiver arguments: arguments temporaries: temps [ "I create a frameful call for interpreter. @@ -361,7 +363,7 @@ VMSimpleStackBasedCogitAbstractTest >> createInterpreterFramefulCallFrom: return cogit needsFrame: true. ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ | specialObjectsOop | @@ -378,19 +380,19 @@ VMSimpleStackBasedCogitAbstractTest >> createSpecialSelectorArray [ memory specialObjectsOop: specialObjectsOop. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassemble [ ^ self disassembleFrom: cogInitialAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex [ ^ self disassembleFrom: anIndex opcodes: opcodes ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberOfInstructions [ ^ machineSimulator disassembler @@ -403,25 +405,25 @@ VMSimpleStackBasedCogitAbstractTest >> disassembleFrom: anIndex opcodes: numberO pc: 0 ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue [ ^ machineSimulator framePointerRegisterValue ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> framePointerRegisterValue: aValue [ machineSimulator framePointerRegisterValue: aValue ] -{ #category : #configuration } +{ #category : 'configuration' } VMSimpleStackBasedCogitAbstractTest >> generateCaptureCStackPointers [ ^ true ] -{ #category : #'helpers - cog methods' } +{ #category : 'helpers - cog methods' } VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector: anSelectorOop [ | targetCog allocatedAddress | @@ -440,18 +442,18 @@ VMSimpleStackBasedCogitAbstractTest >> generateCogMethod: aBlockClosure selector ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> getLastAddress [ ^ machineSimulator getLastAddress: self abstractInstructions. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initialCodeSize [ ^ 4 * 1024 ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ "I will create the initial stack with a well-known caller address so we know if the code comes back @@ -463,7 +465,7 @@ VMSimpleStackBasedCogitAbstractTest >> initializeInitialStackFrame [ ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ | page | @@ -476,31 +478,31 @@ VMSimpleStackBasedCogitAbstractTest >> initializeStackMemory [ machineSimulator framePointerRegisterValue: page baseAddress. ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> instructionPointer [ ^ self readRegister: machineSimulator instructionPointerRegister ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> interpreterClass [ ^ CogVMSimulatorLSB ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> jitCompilerClass [ ^ SimpleStackBasedCogit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod [ ^ self jitMethod: aHostCompiledMethod selector: memory nilObject ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: aSelectorOop [ | methodOop | @@ -510,7 +512,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitMethod: aHostCompiledMethod selector: ^ cogit cog: methodOop selector: aSelectorOop ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> jitOptions [ ^ Dictionary newFromPairs: { @@ -521,7 +523,7 @@ VMSimpleStackBasedCogitAbstractTest >> jitOptions [ #ObjectMemory. self memoryClass name } ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ | builder | @@ -530,12 +532,12 @@ VMSimpleStackBasedCogitAbstractTest >> machineCodeFrameBuilder [ ^ builder ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> machineSimulator [ ^ machineSimulator ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ^ self wordSize = 4 @@ -543,7 +545,7 @@ VMSimpleStackBasedCogitAbstractTest >> memoryClass [ ifFalse: [ Spur64BitCoMemoryManager ] ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ | compiler | @@ -558,13 +560,13 @@ VMSimpleStackBasedCogitAbstractTest >> newJitCompiler [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> openMachineDebugger [ self openMachineDebuggerAt: cogInitialAddress ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ ^ VMMachineCodeDebugger new @@ -575,7 +577,7 @@ VMSimpleStackBasedCogitAbstractTest >> openMachineDebuggerAt: anAddress [ openWithSpec. ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pop [ | stackAddressIntegerValue poppedByteArray | @@ -592,13 +594,13 @@ VMSimpleStackBasedCogitAbstractTest >> pop [ ^ poppedByteArray ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> popAddress [ ^ self pop integerAt: 1 size: self wordSize signed: false ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareCall [ machineSimulator hasLinkRegister @@ -611,13 +613,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareCall [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver [ self prepareStackForSendReceiver: aReceiver arguments: #() ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver arguments: arguments [ machineSimulator baseRegisterValue: cogit varBaseAddress. @@ -634,13 +636,13 @@ VMSimpleStackBasedCogitAbstractTest >> prepareStackForSendReceiver: aReceiver ar self prepareCall ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> primitiveTraceLogSize [ ^ 256 * 8 "word size" ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ | stackAddressIntegerValue | @@ -661,7 +663,7 @@ VMSimpleStackBasedCogitAbstractTest >> push: aByteArray [ ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ | aByteArray | @@ -670,7 +672,7 @@ VMSimpleStackBasedCogitAbstractTest >> pushAddress: anInteger [ self push: aByteArray ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ | bytes | @@ -678,7 +680,7 @@ VMSimpleStackBasedCogitAbstractTest >> readMemoryAt: anAddress [ ^ bytes integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ registerValue := ByteArray new: self wordSize. @@ -686,7 +688,7 @@ VMSimpleStackBasedCogitAbstractTest >> readRegister: aRegisterID [ ^ registerValue integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ " @@ -709,26 +711,26 @@ VMSimpleStackBasedCogitAbstractTest >> readTemporaryValueAt: anIndex [ ^ self readMemoryAt: machineSimulator framePointerRegisterValue - ((3 + anIndex) * self wordSize) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> receiverRegister: anInteger [ self writeRegister: UcX86Registers rdx value: anInteger ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> returnValue [ ^ self readRegister: machineSimulator receiverRegister ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress [ ^ self runFrom: startAddress until: endAddress timeout: 100000. "microseconds" ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress timeout: microseconds [ machineSimulator startAt: startAddress @@ -737,7 +739,7 @@ VMSimpleStackBasedCogitAbstractTest >> runFrom: startAddress until: endAddress t count: 0. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ "The different platforms generates code in a different way, so the number of opcodes can not be valid. Eg: ARM generates more instructions per opcode. It has to calculate the instructions to run differently" @@ -748,7 +750,7 @@ VMSimpleStackBasedCogitAbstractTest >> runGeneratedCode [ count: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ machineSimulator startAt: cogInitialAddress @@ -758,7 +760,7 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturn [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ machineSimulator startAt: anAddress @@ -768,17 +770,17 @@ VMSimpleStackBasedCogitAbstractTest >> runUntilReturnFrom: anAddress [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> sentSelector [ ^ sentSelector ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> sentSelector: anObject [ sentSelector := anObject ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUp [ super setUp. @@ -821,7 +823,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUp [ self initializeInitialStackFrame. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit allocateOpcodes: 80 bytecodes: 0 ifFail: [ self error: 'Could not allocate opcodes' ]. @@ -838,7 +840,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpCogMethodEntry [ cogit methodZone manageFrom: cogit methodZoneBase to: memory getMemoryMap codeZoneEnd. ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ "Create a send trampoline so we can stop..." @@ -865,7 +867,7 @@ VMSimpleStackBasedCogitAbstractTest >> setUpTrampolines [ ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ ^ (self stackAt: index) @@ -874,7 +876,7 @@ VMSimpleStackBasedCogitAbstractTest >> stackAddressAt: index [ signed: false ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ | stackAddressIntegerValue | @@ -884,37 +886,37 @@ VMSimpleStackBasedCogitAbstractTest >> stackAt: index [ ^ machineSimulator memoryAt: stackAddressIntegerValue readNext: self wordSize. ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue [ ^ machineSimulator stackPointerRegisterValue ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> stackPointerRegisterValue: aValue [ machineSimulator stackPointerRegisterValue: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimpleStackBasedCogitAbstractTest >> temporaryRegisterValue [ ^ self machineSimulator temporaryRegisterValue ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> top [ ^ self stackAt: 0 ] -{ #category : #'helpers - stack' } +{ #category : 'helpers - stack' } VMSimpleStackBasedCogitAbstractTest >> topAddress [ ^ self top integerAt: 1 size: self wordSize signed: false ] -{ #category : #'helpers - registers' } +{ #category : 'helpers - registers' } VMSimpleStackBasedCogitAbstractTest >> writeRegister: aRegister value: anInteger [ | value | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st index da38e1895e..c43441d889 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitBytecodeTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitBytecodeTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitBytecodeTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -25,7 +27,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doPopIntoReceiverVariableBytecodeStoresVa self runGeneratedCode. ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrameful onBlock: generationBlock [ | oldFP oldSP | @@ -45,7 +47,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnCleansStackWithFrame: isFrame self assert: oldSP equals: self stackPointerRegisterValue. ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister: anAddress withFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -58,7 +60,7 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsObjectInReturnRegister self assert: machineSimulator receiverRegisterValue equals: anAddress ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isFrameful onBlock: compilationBlock [ isFrameful @@ -69,50 +71,50 @@ VMSimpleStackBasedCogitBytecodeTest >> doTestReturnReturnsToCallerWithFrame: isF self runUntilReturn. ] -{ #category : #'tests - extended store bytecode - store inst var' } +{ #category : 'tests - extended store bytecode - store inst var' } VMSimpleStackBasedCogitBytecodeTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable1 [ self testExtendedPushPushesInstanceVariable: 1 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable2 [ self testExtendedPushPushesInstanceVariable: 2 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable3 [ self testExtendedPushPushesInstanceVariable: 3 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable32 [ self testExtendedPushPushesInstanceVariable: 32 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable64 [ self testExtendedPushPushesInstanceVariable: 64 ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesInstanceVariable: instanceVariableToWrite [ self testExtendedPushPushesVariableType: 0 "Instance variable type" index: instanceVariableToWrite ] -{ #category : #'tests - extended push bytecode - push inst var' } +{ #category : 'tests - extended push bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type index: instanceVariableToWrite [ "Type = 0 is instance variable" @@ -136,7 +138,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testExtendedPushPushesVariableType: type self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - jumps' } +{ #category : 'tests - jumps' } VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ | firstBytecode | @@ -176,67 +178,67 @@ VMSimpleStackBasedCogitBytecodeTest >> testJumpForwardJumpsOverAnInstruction [ equals: memory trueObject ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempPopsValue [ self testPopIntoTempPopsValueAt: 3 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto3rdTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 3 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempPopsValue [ self testPopIntoTempPopsValueAt: 4 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto4thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 4 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempPopsValue [ self testPopIntoTempPopsValueAt: 5 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto5thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 5 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempPopsValue [ self testPopIntoTempPopsValueAt: 6 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto6thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 6 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempPopsValue [ self testPopIntoTempPopsValueAt: 7 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopInto7thTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 7 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -244,7 +246,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoEighthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -252,7 +254,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFifthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -260,19 +262,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempPopsValue [ self testPopIntoTempPopsValueAt: 1 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFirstTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 1 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -280,55 +282,55 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoFourthReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresEigthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 8 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFifthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 5 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFirstInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 1 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresFourthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 4 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSecondInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSeventhInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresSixthInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresThirdInstanceVariable [ self testPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: instanceVariableToWrite. @@ -337,7 +339,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoReceiverVariableBytecodeStores self assert: (memory fetchPointer: instanceVariableToWrite - 1 ofObject: obj) equals: memory falseObject ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -345,19 +347,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondReceiverVariableBytecode self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 2 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempPopsValue [ self testPopIntoTempPopsValueAt: 2 ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSecondTempUpdatesTemporaryWithFalse [ self testPopIntoTempUpdatesVariableAt: 2 ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -365,7 +367,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSeventhReceiverVariableBytecod self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 7 ] ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -373,7 +375,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoSixthReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 6 ] ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableUnderTest [ | temporaries | @@ -400,7 +402,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempPopsValueAt: tempVariableU self assert: self popAddress equals: memory trueObject ] -{ #category : #'tests - single bytecode - pop into temp' } +{ #category : 'tests - single bytecode - pop into temp' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVariableUnderTest [ | temporaries | @@ -425,7 +427,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoTempUpdatesVariableAt: tempVar self assert: (self readTemporaryValueAt: tempVariableUnderTest) equals: memory falseObject ] -{ #category : #'tests - single bytecode - pop into inst var' } +{ #category : 'tests - single bytecode - pop into inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodePopsValue [ "The block pushed and then pops. @@ -433,157 +435,157 @@ VMSimpleStackBasedCogitBytecodeTest >> testPopIntoThirdReceiverVariableBytecodeP self assertStackRemainsUnchangedDuring: [ self doPopIntoReceiverVariableBytecodeStoresVariableAt: 3 ] ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 10 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush10thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 10 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 11 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush11thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 11 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 12 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush12thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 12 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 13 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush13thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 13 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 14 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush14thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 14 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 15 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush15thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 15 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush3rdTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 3 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 4 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush4thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 4 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 5 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush5thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 5 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 6 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush6thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 6 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 7 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush7thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 7 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 8 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush8thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 8 ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 9 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPush9thTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 9 ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse [ self compile: [ cogit genPushConstantFalseBytecode ]. @@ -592,7 +594,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantFalseBytecodePushesFalse self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - two bytecodes' } +{ #category : 'tests - two bytecodes' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self compile: [ @@ -604,7 +606,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilAndThenReturn [ self assert: machineSimulator receiverRegisterValue equals: memory nilObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self compile: [ cogit genPushConstantNilBytecode ]. @@ -613,7 +615,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantNilBytecodePushesNil [ self assert: self popAddress equals: memory nilObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self compile: [ cogit genPushConstantTrueBytecode ]. @@ -622,7 +624,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantTrueBytecodePushesTrue [ self assert: self popAddress equals: memory trueObject ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallIntegerZero [ self compile: [ cogit genPushConstantZeroBytecode ]. @@ -631,19 +633,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushConstantZeroBytecodePushesASmallI self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 1 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushFirstTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 1 ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusOne [ cogit byte0: 116. @@ -654,7 +656,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerMinusOnePushesAMinusO self assert: self popAddress equals: (memory integerObjectOf: -1) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ cogit byte0: 118. @@ -665,7 +667,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerOnePushesOne [ self assert: self popAddress equals: (memory integerObjectOf: 1) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ cogit byte0: 119. @@ -676,7 +678,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerTwoPushesTwo [ self assert: self popAddress equals: (memory integerObjectOf: 2) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ cogit byte0: 117. @@ -687,7 +689,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushQuickIntegerZeroPushesAZero [ self assert: self popAddress equals: (memory integerObjectOf: 0) ] -{ #category : #'tests - single bytecode' } +{ #category : 'tests - single bytecode' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver [ machineSimulator receiverRegisterValue: 75. @@ -698,103 +700,103 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverBytecodePushesTheReceiver self assert: self popAddress equals: 75 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEighthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 8 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesEleventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 11 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 15 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFifthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 5 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFirstVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 1 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 14 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesFourthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 4 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesNinthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 9 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSecondVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 2 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSeventhVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 7 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 16 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesSixthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 6 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 10 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirdVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 3 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesThirteenthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 13 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesTwelfthVariable [ self testPushReceiverVariableBytecodeZeroPushesVariableAt: 12 ] -{ #category : #'tests - single bytecode - push inst var' } +{ #category : 'tests - single bytecode - push inst var' } VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushesVariableAt: instanceVariableToWrite [ "Create an object with at least `instanceVariableToWrite` instance variables. @@ -813,19 +815,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushReceiverVariableBytecodeZeroPushe self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 2 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushSecondTempVariableWithArgumentsPushesArgument [ self testPushTempVariablePushesArgumentAt: 2 ] -{ #category : #'tests - single bytecode - push temp - arg' } +{ #category : 'tests - single bytecode - push temp - arg' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tempVariableUnderTest [ | arguments | @@ -848,7 +850,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesArgumentAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tempVariableUnderTest [ | temporaries | @@ -873,13 +875,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushTempVariablePushesVariableAt: tem self assert: self popAddress equals: memory falseObject ] -{ #category : #'tests - single bytecode - push temp' } +{ #category : 'tests - single bytecode - push temp' } VMSimpleStackBasedCogitBytecodeTest >> testPushThirdTempVariablePushesVariable [ self testPushTempVariablePushesVariableAt: 3 ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -918,7 +920,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithFullFr equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallFrameCallsLargeFullBlockTrampoline [ | numberOfArguments methodObject method | @@ -956,7 +958,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForFullBlockWithSmallF equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFrameCallsLargeMethodTrampoline [ | numberOfArguments methodObject method | @@ -993,7 +995,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithLargeFram equals: numberOfArguments ] -{ #category : #'tests - thisContext' } +{ #category : 'tests - thisContext' } VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFrameCallsSmallMethodTrampoline [ | numberOfArguments methodObject method | @@ -1030,13 +1032,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testPushThisContextForMethodWithSmallFram equals: numberOfArguments ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnRegister [ self @@ -1045,19 +1047,19 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulLeavesNilInReturnReg onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramefulReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRegister [ self @@ -1066,13 +1068,13 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessLeavesNilInReturnRe onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnNilFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ cogit genReturnNil ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInReturnRegister [ self @@ -1083,7 +1085,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefulLeavesTopObjectInRet cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ self doTestReturnCleansStackWithFrame: true onBlock: [ @@ -1091,7 +1093,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: true onBlock: [ @@ -1099,7 +1101,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramefullReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ self doTestReturnCleansStackWithFrame: false onBlock: [ @@ -1107,7 +1109,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelesCleansStack [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInReturnRegister [ self @@ -1118,7 +1120,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessLeavesTopObjectInRe cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ self doTestReturnReturnsToCallerWithFrame: false onBlock: [ @@ -1126,7 +1128,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTopFramelessReturnsToCaller [ cogit genReturnTopFromMethod ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ self @@ -1134,7 +1136,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInReturnRegister [ self @@ -1144,7 +1146,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulLeavesTrueObjectInR cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ self @@ -1152,7 +1154,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramefulReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ self @@ -1160,7 +1162,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessCleansStack [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectInReturnRegister [ self @@ -1170,7 +1172,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessLeavesTrueObjectIn cogit genReturnTrue ] ] -{ #category : #'tests - single bytecode - return' } +{ #category : 'tests - single bytecode - return' } VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ self @@ -1178,7 +1180,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testReturnTrueFramelessReturnsToCaller [ onBlock: [ cogit genReturnTrue ] ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1192,7 +1194,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithIdenticalObjectsP equals: memory trueObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorEqualsEquals ]. @@ -1207,7 +1209,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendEqualsEqualsWithNonIdenticalObjec equals: memory falseObject ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1244,7 +1246,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector literalIndex | @@ -1272,7 +1274,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralOneWithZeroArgsMovesSelect self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesReceiverFromStackTopIntoReceiverRegister [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1296,7 +1298,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesRecei equals: memory falseObject ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector literalIndex | @@ -1323,7 +1325,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: literalIndex ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelectorIntoClassRegisterIn32bits [ | selector | @@ -1350,7 +1352,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsMovesSelec self assert: machineSimulator classRegisterValue equals: selector ] -{ #category : #'tests - sends' } +{ #category : 'tests - sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesReturnValueFromReceiverRegisterAfterReturn [ sendTrampolineAddress := self compile: [ cogit RetN: 0 ]. @@ -1379,7 +1381,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendLiteralZeroWithZeroArgsPushesRetu self assert: self popAddress equals: (memory integerObjectOf: 42) ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjectsPushesFalse [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1394,7 +1396,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithIdenticalObjec equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalObjectsPushesTrue [ sendAddress := self compile: [ cogit genSpecialSelectorNotEqualsEquals ]. @@ -1409,7 +1411,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendNotEqualsEqualsWithNonIdenticalOb equals: memory trueObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1429,7 +1431,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1454,7 +1456,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #+. @@ -1469,7 +1471,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1488,7 +1490,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessageMovesSelector equals: selectorAtIndex ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #+. @@ -1507,7 +1509,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendOneArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1528,7 +1530,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageDoesNotMovesI equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64bits [ | signed | @@ -1554,7 +1556,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesNegatedS equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #at:put:. @@ -1570,7 +1572,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesReceiver self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelectorIntoClassRegisterIn32bits [ | signed | @@ -1596,7 +1598,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessageMovesSelector equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #at:put:. @@ -1616,7 +1618,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendTwoArgSpecialMessagePushesReturnV self assert: self popAddress equals: (memory integerObjectOf: 42). ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMovesIntoSendNumArgsRegister [ | previousValue | @@ -1635,7 +1637,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageDoesNotMoves equals: previousValue ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegatedSelectorIndexIntoClassRegisterIn64Bits [ | signed | @@ -1659,7 +1661,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesNegated equals: (selectorIndex + 1 / 2) negated ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceiverFromStackTopIntoReceiverRegister [ sentSelector := #atEnd. @@ -1673,7 +1675,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesReceive self assert: machineSimulator receiverRegisterValue equals: memory falseObject ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelectorIntoClassRegisterIn32Bits [ self wordSize = 8 ifTrue: [ self skip ]. @@ -1691,7 +1693,7 @@ VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessageMovesSelecto equals: selectorAtIndex ] -{ #category : #'tests - special sends' } +{ #category : 'tests - special sends' } VMSimpleStackBasedCogitBytecodeTest >> testSendZeroArgSpecialMessagePushesReturnValueFromReceiverRegisterAfterReturn [ sentSelector := #atEnd. diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st index e471e136aa..c69374a214 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitCoggedMethods.class.st @@ -1,19 +1,21 @@ Class { - #name : #VMSimpleStackBasedCogitCoggedMethods, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitCoggedMethods', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogMethodConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitCoggedMethods >> setUp [ super setUp. self setUpCogMethodEntry. ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndContinue [ | cogMethod otherBlock | @@ -28,7 +30,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: otherBlock ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterAndGoesToAbort [ | cogMethod otherBlock | @@ -43,7 +45,7 @@ VMSimpleStackBasedCogitCoggedMethods >> testUsingEntryOffsetChecksClassRegisterA self assert: machineSimulator instructionPointerRegisterValue equals: cogit ceMethodAbortTrampoline ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitCoggedMethods >> testUsingNoCheckEntryDoesNotCheckClassTag [ | cogMethod otherBlock | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st index 021b93d5c5..e2345429d5 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMegamorphicPICTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMSimpleStackBasedCogitMegamorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitMegamorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'VMMethodCacheConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ | specialSelectorsArray | @@ -25,7 +27,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> setUp [ cogit generateOpenPICPrototype. ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICReturnsPIC [ | selector createdPic specialObjectsArray | @@ -36,13 +38,13 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupExistingMegamorphicPICRet self assert: (cogit methodZone openPICWithSelector: selector) equals: createdPic. ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testLookupNonExistingMegamorphicPICReturnsNil [ self assert: (cogit methodZone openPICWithSelector: memory trueObject) equals: nil ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ "We have to call the pic and see if it reaches the abort trampoline" @@ -74,7 +76,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testMiss [ self assert: machineSimulator sendNumberOfArgumentsRegisterValue equals: createdPic address ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectPicAbortTrampoline [ | createdPic selector | @@ -87,7 +89,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICHasTheCorrectP equals: (cogit picAbortTrampolineFor: 1) ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numArgs [ | selector createdPic | @@ -96,43 +98,43 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgs: numAr self assert: createdPic cmNumArgs equals: numArgs ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith1 [ self testNewMegamorphicPICNumArgs: 1 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith16 [ self testNewMegamorphicPICNumArgs: 16 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith2 [ self testNewMegamorphicPICNumArgs: 2 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith4 [ self testNewMegamorphicPICNumArgs: 4 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWith8 [ self testNewMegamorphicPICNumArgs: 8 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICNumArgsWithoutArgs [ self testNewMegamorphicPICNumArgs: 0 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ | createdPic selector | @@ -141,7 +143,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSelector [ self assert: createdPic selector equals: selector ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ | createdPic selector | @@ -150,7 +152,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICSize [ self assert: createdPic blockSize equals: cogit openPICSize. ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ | selector createdPic | @@ -160,7 +162,7 @@ VMSimpleStackBasedCogitMegamorphicPICTest >> testNewMegamorphicPICType [ ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMegamorphicPICTest >> testRelinkCallSiteToMegamorphicPICCallsNewPIC [ | selector literalIndex method createdPic returnAfterCallAddress patchedCogMethod startAddress | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st index 64f66063c8..e1ff4724cd 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitMonomorphicPICTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitMonomorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitMonomorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ "Calculate the size of the Closed Pic" @@ -14,7 +16,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testCalculateClosePICSize [ self assert: cogit closedPICSize isNotNil ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineReplacesTheCallTargetWithTheCogMethodAddress [ "This is for the monomorphic case" @@ -64,7 +66,7 @@ VMSimpleStackBasedCogitMonomorphicPICTest >> testLinkCallDuringSendInTrampolineR self deny: executedTheTrampoline ] -{ #category : #'tests - PIC' } +{ #category : 'tests - PIC' } VMSimpleStackBasedCogitMonomorphicPICTest >> testObtainInlineCacheFromLinkedCall [ | sendingMethod targetCog selector executedTheTrampoline | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st index 1aba76164e..2d4f3a96ab 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitPolymorphicPICTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimpleStackBasedCogitPolymorphicPICTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMSimpleStackBasedCogitPolymorphicPICTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'selector', 'numArgs', @@ -14,10 +14,12 @@ Class { #pools : [ 'CogMethodConstants' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ ^ super testParameters * @@ -26,7 +28,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest class >> testParameters [ yourself) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ | pic | "Only run this test if the test is configured for so much cases" @@ -37,7 +39,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertHitAtCase: aCase [ self assertPIC: pic hits: (cogMethods at: aCase) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ "Receiver is nil, class tag of the first entry is the receiver's class tag. - the receiver matches class tag for case 0 @@ -59,7 +61,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPIC: pic hits: hitMethod [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ "Receiver is nil, class tag of the first entry is 1 (a small integer). @@ -80,19 +82,19 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> assertPICMiss: pic [ self assert: machineSimulator receiverRegisterValue equals: receiver ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases [ ^ configuredPicCases ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> configuredPicCases: aNumber [ configuredPicCases := aNumber ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ cogit @@ -102,7 +104,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> extendPIC: aPic [ isMNUCase: false. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ | pic | @@ -117,7 +119,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> makePolymorphicPIC [ ^ pic ] -{ #category : #running } +{ #category : 'running' } VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ super setUp. @@ -158,7 +160,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> setUp [ cogMethods at: index - 1 put: cogMethod ] "Maximum polymorphic cases" ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ | pic | @@ -167,7 +169,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasConfiguredCases [ self assert: pic cPICNumCases equals: self configuredPicCases ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ | pic | pic := self makePolymorphicPIC. @@ -175,43 +177,43 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testHasJumpToAbortTrampoline [ self assert: (cogit backend callTargetFromReturnAddress: pic asInteger + cogit missOffset) equals: (cogit picAbortTrampolineFor: numArgs) ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase0 [ self assertHitAtCase: 0 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase1 [ self assertHitAtCase: 1 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase2 [ self assertHitAtCase: 2 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase3 [ self assertHitAtCase: 3 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase4 [ self assertHitAtCase: 4 ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testHitCase5 [ "This is the last case. Cog PICs have 6 cases (0-based)" self assertHitAtCase: 5 ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ | pic | pic := self makePolymorphicPIC. @@ -219,7 +221,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testIsClosedPic [ self assert: pic cmType equals: CMPolymorphicIC. ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ | pic | @@ -229,7 +231,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testMiss [ self assertPICMiss: pic ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ | pic | @@ -238,7 +240,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testNumberOfArgumentsInHeader [ self assert: pic cmNumArgs equals: numArgs ] -{ #category : #'tests - hit/miss' } +{ #category : 'tests - hit/miss' } VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEntryOffset [ | pic methodCheckEntryPoint methodNoCheckEntryPoint passedByCheckEntryPoint | @@ -269,7 +271,7 @@ VMSimpleStackBasedCogitPolymorphicPICTest >> testPolymorphicPICHitDoesNotCallEnt self deny: passedByCheckEntryPoint ] -{ #category : #'tests - metadata' } +{ #category : 'tests - metadata' } VMSimpleStackBasedCogitPolymorphicPICTest >> testSelectorInHeader [ | pic | diff --git a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st index 7ab3e09968..00fe287064 100644 --- a/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimpleStackBasedCogitRememberedSetTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimpleStackBasedCogitRememberedSetTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSimpleStackBasedCogitRememberedSetTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: value shouldCallTrampoline: shouldCallTrampoline [ | trampoline afterBytecode | @@ -28,14 +30,14 @@ VMSimpleStackBasedCogitRememberedSetTest >> assertReceiver: receiver value: valu ] -{ #category : #initialization } +{ #category : 'initialization' } VMSimpleStackBasedCogitRememberedSetTest >> setUp [ super setUp. self setUpTrampolines ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesNotCallTrampoline [ | newObject otherNewObject | @@ -48,7 +50,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInNewObjectDoesN shouldCallTrampoline: false ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesCallTrampoline [ | oldObject otherNewObject | @@ -62,7 +64,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringNewObjectInOldObjectDoesC shouldCallTrampoline: true ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesNotCallTrampoline [ | oldObject otherOldObject | @@ -76,7 +78,7 @@ VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInOldObjectDoesN shouldCallTrampoline: false ] -{ #category : #tests } +{ #category : 'tests' } VMSimpleStackBasedCogitRememberedSetTest >> testStoringOldObjectInPermObjectDoesCallTrampoline [ | permObject otherPermObject | diff --git a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st index e2fc08acf9..cdc0ba4a1f 100644 --- a/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulatedEnvironmentBuilder.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSimulatedEnvironmentBuilder, - #superclass : #Object, + #name : 'VMSimulatedEnvironmentBuilder', + #superclass : 'Object', #instVars : [ 'interpreter', 'interpreterClass', @@ -19,17 +19,19 @@ Class { 'allocateMemory', 'useComposedImageFormatAsDefault' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> build [ self doBuildSimulator. self doBuild ] -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> doBuild [ "100 k at least to put the class table in the old space. @@ -86,7 +88,7 @@ VMSimulatedEnvironmentBuilder >> doBuild [ ] -{ #category : #building } +{ #category : 'building' } VMSimulatedEnvironmentBuilder >> doBuildSimulator [ objectMemory := objectMemoryClass simulatorClass new. @@ -103,17 +105,17 @@ VMSimulatedEnvironmentBuilder >> doBuildSimulator [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> initialCodeSize: anInteger [ initialCodeSize := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> initializationOptions: aCollection [ initializationOptions := aCollection ] -{ #category : #initialization } +{ #category : 'initialization' } VMSimulatedEnvironmentBuilder >> initialize [ super initialize. @@ -121,58 +123,58 @@ VMSimulatedEnvironmentBuilder >> initialize [ permSpaceSize := 0. ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> interpreter [ ^ interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> interpreterClass: aClass [ interpreterClass := aClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> memoryInitialAddress [ ^ initialAddress ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> methodCacheSize [ ^ methodCacheSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> newSpaceSize [ ^ newSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> objectMemory [ ^ objectMemory ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> objectMemoryClass: aClass [ objectMemoryClass := aClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> oldSpaceSize [ ^ oldSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> permSpaceSize: anInteger [ permSpaceSize := anInteger ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> primitiveTraceLogSize: anInteger [ primitiveTraceLogSize := anInteger ] -{ #category : #helpers } +{ #category : 'helpers' } VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ "Unicorn simulator requires mapped memory to be multiple of 4096" @@ -184,7 +186,7 @@ VMSimulatedEnvironmentBuilder >> roundToPageSize: anInteger [ ^ anInteger + (pageSize - remainder) ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ^ 4096. @@ -192,18 +194,18 @@ VMSimulatedEnvironmentBuilder >> rumpCStackSize [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> stackSpaceSize [ ^ stackSpaceSize ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> useComposedImageFormatAsDefault: aBoolean [ useComposedImageFormatAsDefault := aBoolean ] -{ #category : #accessing } +{ #category : 'accessing' } VMSimulatedEnvironmentBuilder >> wordSize: anInteger [ wordSize := anInteger ] diff --git a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st index e1da177f74..480b5bbd00 100644 --- a/smalltalksrc/VMMakerTests/VMSimulationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSimulationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSimulationTest, - #superclass : #TestCase, - #category : #'VMMakerTests-Simulation' + #name : 'VMSimulationTest', + #superclass : 'TestCase', + #category : 'VMMakerTests-Simulation', + #package : 'VMMakerTests', + #tag : 'Simulation' } -{ #category : #tests } +{ #category : 'tests' } VMSimulationTest >> testSetUpJITSimulationReadsImage [ | options c | @@ -25,7 +27,7 @@ VMSimulationTest >> testSetUpJITSimulationReadsImage [ extraMemory: 100000. ] -{ #category : #tests } +{ #category : 'tests' } VMSimulationTest >> testSetUpNonJITSimulationReadsImage [ | options c | diff --git a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st index 746c298210..f09dcfb865 100644 --- a/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaSuperSendsTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSistaSuperSendsTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSistaSuperSendsTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSistaSuperSendsTest >> jitOptions [ ^ super jitOptions @@ -12,7 +14,7 @@ VMSistaSuperSendsTest >> jitOptions [ yourself ] -{ #category : #'tests - sends/super' } +{ #category : 'tests - sends/super' } VMSistaSuperSendsTest >> testSuperSendLiteralZeroWithZeroArgsMovesSelectorIndexClassRegisterIn64bits [ | selector binding literalVariableIndex literalSelectorIndex startPC receiver expectedSelector | diff --git a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st index d5644e8ee9..bcaf2eb03b 100644 --- a/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSistaTrampolineTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSistaTrampolineTest, - #superclass : #VMTrampolineTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSistaTrampolineTest', + #superclass : 'VMTrampolineTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMSistaTrampolineTest >> jitOptions [ ^ super jitOptions @@ -12,7 +14,7 @@ VMSistaTrampolineTest >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMSistaTrampolineTest >> testSendTrampolineWithFourArguments [ | trampolineStart receiver | diff --git a/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st b/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st index 1a242ba383..13b0c013b5 100644 --- a/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSnapshotPrimitiveTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSnapshotPrimitiveTest, - #superclass : #VMInterpreterTests, + #name : 'VMSnapshotPrimitiveTest', + #superclass : 'VMInterpreterTests', #instVars : [ 'imageName' ], @@ -9,10 +9,12 @@ Class { 'VMBytecodeConstants', 'VMObjectIndices' ], - #category : #'VMMakerTests-InterpreterTests' + #category : 'VMMakerTests-InterpreterTests', + #package : 'VMMakerTests', + #tag : 'InterpreterTests' } -{ #category : #running } +{ #category : 'running' } VMSnapshotPrimitiveTest >> setUp [ super setUp. @@ -25,14 +27,14 @@ VMSnapshotPrimitiveTest >> setUp [ imageName := self class name ] -{ #category : #running } +{ #category : 'running' } VMSnapshotPrimitiveTest >> tearDown [ imageName ifNotNil: [ imageName asFileReference ensureDeleteAll ]. super tearDown ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ | method frame contextOop contextIdentityHash suspendedContext | @@ -62,7 +64,7 @@ VMSnapshotPrimitiveTest >> testPrimitiveSnapshotContextsShouldBeTenured [ equals: contextIdentityHash ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotCreateImage [ | method | @@ -81,7 +83,7 @@ VMSnapshotPrimitiveTest >> testPrimitiveSnapshotCreateImage [ interpreter imageReaderWriter validateImage: imageName ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotHandlesFormatToUse [ | method | @@ -104,7 +106,7 @@ VMSnapshotPrimitiveTest >> testPrimitiveSnapshotHandlesFormatToUse [ interpreter imageReaderWriter validateImage: imageName ] -{ #category : #'tests - snapshot' } +{ #category : 'tests - snapshot' } VMSnapshotPrimitiveTest >> testPrimitiveSnapshotNewKeptObjectShouldBeTenured [ | method object objectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st index f4a16ac4a2..45d181195e 100644 --- a/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpecialSendArithmethicTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpecialSendArithmethicTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMSpecialSendArithmethicTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpecialSendArithmethicTest class >> testParameters [ ^ super testParameters * { @@ -13,7 +15,7 @@ VMSpecialSendArithmethicTest class >> testParameters [ } ] -{ #category : #running } +{ #category : 'running' } VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop [ self assert: machineSimulator instructionPointerRegisterValue equals: sendTrampolineAddress. @@ -21,7 +23,7 @@ VMSpecialSendArithmethicTest >> assertSpecialSendTo: receiverOop withArg: argOop self assert: machineSimulator arg0RegisterValue equals: argOop. ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTrampoline [ self @@ -31,7 +33,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseArgumentCallsTram shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoline [ self @@ -42,7 +44,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusFalseSelfCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -52,7 +54,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerArgumentCa shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCallsTrampoline [ self @@ -62,7 +64,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerConstCalls shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsTrampoline [ self @@ -73,7 +75,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusSmallIntegerSelfCallsT shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : #'tests - receiver non integer argument' } +{ #category : 'tests - receiver non integer argument' } VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -83,7 +85,7 @@ VMSpecialSendArithmethicTest >> testNonIntegerArgumentPlusTrueConstCallsTrampoli shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSmallInteger [ self @@ -94,7 +96,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusIntegerSelfReturnsSm shouldPerformOperationReturning: expectedResult ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgumentCallsTrampoline [ self @@ -104,7 +106,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerArgument shouldCallTrampolineWith: (memory integerObjectOf: value1) and: (memory integerObjectOf: value2) ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstReturnsSmallInteger [ self @@ -114,7 +116,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusSmallIntegerConstRet shouldPerformOperationReturning: expectedResult. ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTrampoline [ self @@ -124,7 +126,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueArgumentCallsTra shouldCallTrampolineWith: (memory integerObjectOf: value2) and: memory trueObject ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampoline [ self @@ -134,7 +136,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueConstCallsTrampo shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : #'tests - receiver integer argument' } +{ #category : 'tests - receiver integer argument' } VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampoline [ self @@ -145,7 +147,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerArgumentPlusTrueSelfCallsTrampol shouldCallTrampolineWith: (memory integerObjectOf: value1) and: memory trueObject ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -156,7 +158,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerArgumentRet ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturnsSmallInteger [ self @@ -166,7 +168,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerConstReturn ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -177,7 +179,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusSmallIntegerSelfReturns ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampoline [ @@ -188,7 +190,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueArgumentCallsTrampo shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampoline [ self @@ -198,7 +200,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueConstCallsTrampolin ] -{ #category : #'tests - receiver constant integer' } +{ #category : 'tests - receiver constant integer' } VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline [ @@ -209,7 +211,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerConstPlusTrueSelfCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ]. ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentReturnsSmallInteger [ self @@ -220,7 +222,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerArgumentRetu shouldPerformOperationReturning: expectedResult ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturnsSmallInteger [ self @@ -231,7 +233,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerConstReturns ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsSmallInteger [ self @@ -241,7 +243,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusSmallIntegerSelfReturnsS shouldPerformOperationReturning: expectedReflexiveResult ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampoline [ self @@ -252,7 +254,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueArgumentCallsTrampol shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : #'tests - receiver integer self' } +{ #category : 'tests - receiver integer self' } VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline [ self @@ -262,7 +264,7 @@ VMSpecialSendArithmethicTest >> testSmallIntegerSelfPlusTrueConstCallsTrampoline shouldCallTrampolineWith: [ memory integerObjectOf: value1 ] and: [ memory trueObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ self @@ -272,7 +274,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ self @@ -281,7 +283,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ self @@ -291,7 +293,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusFalseSelfCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampoline [ self @@ -301,7 +303,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerArgumentCallsTrampo shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ] ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampoline [ self @@ -310,7 +312,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerConstCallsTrampolin shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver constant not integer' } +{ #category : 'tests - receiver constant not integer' } VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline [ self @@ -320,7 +322,7 @@ VMSpecialSendArithmethicTest >> testTrueConstPlusSmallIntegerSelfCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ (memory integerObjectOf: value1) ] ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ self @@ -331,7 +333,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseArgumentCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ self @@ -341,7 +343,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusFalseConstCallsTrampoline [ shouldCallTrampolineWith: [ memory trueObject ] and: [ memory falseObject ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampoline [ self @@ -352,7 +354,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerArgumentCallsTrampol shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline [ self @@ -362,7 +364,7 @@ VMSpecialSendArithmethicTest >> testTrueSelfPlusSmallIntegerConstCallsTrampoline shouldCallTrampolineWith: [ memory trueObject ] and: [ memory integerObjectOf: value1 ]. ] -{ #category : #'tests - receiver non integer self' } +{ #category : 'tests - receiver non integer self' } VMSpecialSendArithmethicTest >> testTrueSelfPlusTrueSelfCallsTrampoline [ self diff --git a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st index 1965e24efa..6dc630f31b 100644 --- a/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurInitializedOldSpaceTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMSpurInitializedOldSpaceTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurInitializedOldSpaceTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #testing } +{ #category : 'testing' } VMSpurInitializedOldSpaceTest class >> isAbstract [ ^ self == VMSpurInitializedOldSpaceTest ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> assertFreeListEmpty: aFreeListOop [ self assert: aFreeListOop equals: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createEphemeronClass [ ourEphemeronClass := self createEphemeronClassForSlots: 3 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ | theNewClass formatWithSlots hash | @@ -38,7 +40,7 @@ VMSpurInitializedOldSpaceTest >> createEphemeronClassForSlots: fixedSlots [ ^ theNewClass ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ | address | @@ -47,24 +49,24 @@ VMSpurInitializedOldSpaceTest >> createFreeChunkOfSize: aSize [ ^ address ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> denyFreeListEmpty: aFreeListOop [ self deny: aFreeListOop equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurInitializedOldSpaceTest >> forgetObject3 [ memory coInterpreter profileMethod: memory nilObject ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeListForSize: allocationSize [ ^ memory freeLists at: allocationSize / memory allocationUnit ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ "Initially the old space has a single big chunk of free memory and no small free chunks. @@ -77,7 +79,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootOop [ ^ memory freeLists at: 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ "The free tree lists stores the oop of free tree nodes. @@ -88,7 +90,7 @@ VMSpurInitializedOldSpaceTest >> freeTreeRootStartAddress [ ^ memory startOfObject: self freeTreeRootOop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ^ memory @@ -96,7 +98,7 @@ VMSpurInitializedOldSpaceTest >> largerNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ | class | @@ -107,14 +109,14 @@ VMSpurInitializedOldSpaceTest >> newEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" ^ self newOldEphemeronObjectWithSlots: 3 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ | class | @@ -125,7 +127,7 @@ VMSpurInitializedOldSpaceTest >> newOldEphemeronObjectWithSlots: slots [ classIndex: (memory ensureBehaviorHash: class) ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -144,7 +146,7 @@ VMSpurInitializedOldSpaceTest >> newPermanentByteObjectOfSize: byteSize [ ^ oop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ^ memory @@ -152,7 +154,7 @@ VMSpurInitializedOldSpaceTest >> nextNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ^ memory @@ -160,7 +162,7 @@ VMSpurInitializedOldSpaceTest >> parentNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ^ memory @@ -168,7 +170,7 @@ VMSpurInitializedOldSpaceTest >> previousNodeOf: aNode [ ofFreeChunk: aNode ] -{ #category : #running } +{ #category : 'running' } VMSpurInitializedOldSpaceTest >> setUp [ super setUp. @@ -178,7 +180,7 @@ VMSpurInitializedOldSpaceTest >> setUp [ memory classByteArray: (self newClassInOldSpaceWithSlots: 0 instSpec: (memory byteFormatForNumBytes: 0)). ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurInitializedOldSpaceTest >> smallerNodeOf: aNode [ ^ memory diff --git a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st index d44e8be9c7..eff8c524da 100644 --- a/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurMemoryManagerTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMSpurMemoryManagerTest, - #superclass : #ParametrizedTestCase, + #name : 'VMSpurMemoryManagerTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'memory', 'interpreter', @@ -22,10 +22,12 @@ Class { 'VMClassIndices', 'VMObjectIndices' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> imageFormatParameters [ ^ { @@ -34,13 +36,13 @@ VMSpurMemoryManagerTest class >> imageFormatParameters [ } ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> testParameters [ ^ self wordSizeParameters * self imageFormatParameters ] -{ #category : #'building suites' } +{ #category : 'building suites' } VMSpurMemoryManagerTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -48,7 +50,7 @@ VMSpurMemoryManagerTest class >> wordSizeParameters [ yourself ] -{ #category : #configuring } +{ #category : 'configuring' } VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ environmentBuilder @@ -61,7 +63,7 @@ VMSpurMemoryManagerTest >> configureEnvironmentBuilder [ useComposedImageFormatAsDefault: useComposedImageFormat ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createActiveProcess [ | processorOopAssociation processorOop processorListsArray priorities | @@ -83,7 +85,7 @@ VMSpurMemoryManagerTest >> createActiveProcess [ memory storePointer: ActiveProcessIndex ofObject: processorOop withValue: (self newArrayWithSlots: 4). ] -{ #category : #initialization } +{ #category : 'initialization' } VMSpurMemoryManagerTest >> createArrayClass [ | ourArrayClass | @@ -101,7 +103,7 @@ VMSpurMemoryManagerTest >> createArrayClass [ ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createEphemeronClass [ ourEphemeronClass := self newObjectWithSlots: 3. memory @@ -111,7 +113,7 @@ VMSpurMemoryManagerTest >> createEphemeronClass [ memory ensureBehaviorHash: ourEphemeronClass. ] -{ #category : #utils } +{ #category : 'utils' } VMSpurMemoryManagerTest >> createLargeIntegerClasses [ | classLargeInteger classLargeNegativeInteger | @@ -132,7 +134,7 @@ VMSpurMemoryManagerTest >> createLargeIntegerClasses [ withValue: classLargeNegativeInteger. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ | methodOop | @@ -142,7 +144,7 @@ VMSpurMemoryManagerTest >> createMethodOopFromHostMethod: aPharoCompiledMethod [ ^ methodOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> createWeakArrayClass [ ourWeakClass := self newObjectWithSlots: 3. memory @@ -153,19 +155,19 @@ VMSpurMemoryManagerTest >> createWeakArrayClass [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> emptyObjectSize [ "It is the header plus a word, padded to 8 bytes alignment" ^ self objectHeaderSize + "memory wordSize" 8 ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> initialCodeSize [ ^ 0 ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializationOptions [ ^ { @@ -175,7 +177,7 @@ VMSpurMemoryManagerTest >> initializationOptions [ self memoryClass name } ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ | ourArrayClass | @@ -197,7 +199,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForFullGC [ memory flushNewSpace. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ | freeListOop firstClassTablePage | @@ -261,7 +263,7 @@ VMSpurMemoryManagerTest >> initializeOldSpaceForScavenger [ self deny: memory needGCFlag ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> initializeSpecialSelectors [ | specialSelectorsArrayOop | @@ -277,7 +279,7 @@ VMSpurMemoryManagerTest >> initializeSpecialSelectors [ memory splObj: SpecialSelectors put: specialSelectorsArrayOop ] -{ #category : #'tests-simd' } +{ #category : 'tests-simd' } VMSpurMemoryManagerTest >> installFloat64RegisterClass [ | registerClass | @@ -296,7 +298,7 @@ VMSpurMemoryManagerTest >> installFloat64RegisterClass [ ] -{ #category : #'tests - primitiveGreaterOrEqual' } +{ #category : 'tests - primitiveGreaterOrEqual' } VMSpurMemoryManagerTest >> installFloatClass [ | classFloat | @@ -312,52 +314,52 @@ VMSpurMemoryManagerTest >> installFloatClass [ "This simulated classFloat class is necessary because the 32bits VM cannot instanciate boxed floats by itself" ] -{ #category : #accessor } +{ #category : 'accessor' } VMSpurMemoryManagerTest >> interpreter [ ^ interpreter ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> interpreterClass [ ^ StackInterpreterSimulatorLSB ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable1: anOop [ interpreter newMethod: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable2: anOop [ interpreter profileSemaphore: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keepObjectInVMVariable3: anOop [ interpreter profileMethod: anOop ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable1 [ ^ interpreter newMethod ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable2 [ ^ interpreter profileSemaphore ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> keptObjectInVMVariable3 [ ^ interpreter profileMethod ] -{ #category : #accessor } +{ #category : 'accessor' } VMSpurMemoryManagerTest >> memory [ ^ memory ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> memoryClass [ ^ self wordSize = 4 @@ -365,13 +367,13 @@ VMSpurMemoryManagerTest >> memoryClass [ ifFalse: [ Spur64BitMemoryManager ] ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new16BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 2 format: memory firstShortFormat ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ | indexable | @@ -381,13 +383,13 @@ VMSpurMemoryManagerTest >> new32BitIndexableFromArray: array [ ^ indexable ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new32BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 4 format: memory firstLongFormat ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ | indexable | @@ -397,31 +399,31 @@ VMSpurMemoryManagerTest >> new64BitIndexableFromArray: array [ ^ indexable ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new64BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 8 format: memory sixtyFourBitIndexableFormat ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> new8BitIndexableOfSize: aSize [ ^ self newBitIndexableOfSize: aSize bytesPerSlot: 1 format: memory firstByteFormat ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots [ ^ self newArrayWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newArrayWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: memory arrayFormat classIndex: anIndex ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSlot format: format [ | padding numberOfWordSizeSlots desiredByteSize theClass classIndex | @@ -437,7 +439,7 @@ VMSpurMemoryManagerTest >> newBitIndexableOfSize: aSize bytesPerSlot: bytesPerSl classIndex: classIndex ] -{ #category : #asd } +{ #category : 'asd' } VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ | oop | @@ -455,7 +457,7 @@ VMSpurMemoryManagerTest >> newByteArrayWithContent: aCollection [ ^ oop ] -{ #category : #'helpers - classes' } +{ #category : 'helpers - classes' } VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: format [ | newClass formatWithSlots | @@ -473,7 +475,7 @@ VMSpurMemoryManagerTest >> newClassInOldSpaceWithSlots: numberOfSlots instSpec: ^ newClass ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -484,7 +486,7 @@ VMSpurMemoryManagerTest >> newEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : #'helpers - methods' } +{ #category : 'helpers - methods' } VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arguments [ | method methodHeader | @@ -505,13 +507,13 @@ VMSpurMemoryManagerTest >> newMethodWithSmallContext: isSmall WithArguments: arg ^ method ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots [ ^ self newObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ | format | @@ -522,7 +524,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots classIndex: anIndex [ ^ self newObjectWithSlots: slots format: format classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -534,7 +536,7 @@ VMSpurMemoryManagerTest >> newObjectWithSlots: slots format: aFormat classIndex: ^ oop ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ | oop numSlots instSpec | @@ -553,7 +555,7 @@ VMSpurMemoryManagerTest >> newOldByteObjectOfSize: byteSize [ ^ oop ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newOldEphemeronObject [ "In pharo Ephemerons have 3 slots" @@ -564,7 +566,7 @@ VMSpurMemoryManagerTest >> newOldEphemeronObject [ classIndex: (memory ensureBehaviorHash: ourEphemeronClass) ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ ^ self @@ -572,13 +574,13 @@ VMSpurMemoryManagerTest >> newOldSpaceArrayWithSlots: slots [ classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots [ ^ self newOldSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -590,7 +592,7 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots classIndex: anIndex classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -602,13 +604,13 @@ VMSpurMemoryManagerTest >> newOldSpaceObjectWithSlots: slots format: aFormat cla ^ oop ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentObjectWithSlots: slots [ ^ self newPermanentSpaceObjectWithSlots: slots classIndex: memory arrayClassIndexPun ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: anIndex [ | format | @@ -622,7 +624,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots classIndex: a classIndex: anIndex ] -{ #category : #'helpers - objects' } +{ #category : 'helpers - objects' } VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aFormat classIndex: anIndex [ | oop | @@ -634,7 +636,7 @@ VMSpurMemoryManagerTest >> newPermanentSpaceObjectWithSlots: slots format: aForm ^ oop ] -{ #category : #'helpers - frames' } +{ #category : 'helpers - frames' } VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arguments: aCollectionOfArgumentsOop temporaries: aCollectionOfTemporariesOop ip: anIp [ | newCtx numArgs numTemps | @@ -680,7 +682,7 @@ VMSpurMemoryManagerTest >> newSmallContextReceiver: anOop method: aMethodOop arg ^ newCtx ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newString: aString [ | vmString | @@ -699,7 +701,7 @@ VMSpurMemoryManagerTest >> newString: aString [ ^ vmString ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ ^ self @@ -708,7 +710,7 @@ VMSpurMemoryManagerTest >> newWeakObjectOfSize: aSize [ classIndex: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> newZeroSizedObject [ ^ memory @@ -717,7 +719,7 @@ VMSpurMemoryManagerTest >> newZeroSizedObject [ classIndex: self zeroSizedObjectClassIndex. ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ^ nextIndex @@ -725,18 +727,18 @@ VMSpurMemoryManagerTest >> nextOrdinaryClassIndex [ ifNotNil: [ nextIndex := nextIndex + 1 ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> objectHeaderSize [ ^ memory baseHeaderSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> primitiveTraceLogSize [ ^ 0 ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ | aClass | aClass := self @@ -749,7 +751,7 @@ VMSpurMemoryManagerTest >> setContextClassIntoClassTable [ withValue: aClass ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ | aClass | aClass := self @@ -762,7 +764,7 @@ VMSpurMemoryManagerTest >> setMethodClassIntoClassTable [ withValue: aClass ] -{ #category : #tests } +{ #category : 'tests' } VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ | class | @@ -786,7 +788,7 @@ VMSpurMemoryManagerTest >> setSmallIntegerClassIntoClassTable [ ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUp [ super setUp. @@ -813,7 +815,7 @@ VMSpurMemoryManagerTest >> setUp [ memory lastHash: 1. ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUpScheduler [ "The ScheduleAssocation should be initialized to a valid Processor object" @@ -841,7 +843,7 @@ VMSpurMemoryManagerTest >> setUpScheduler [ memory memoryActiveProcess: activeProcessOop. ] -{ #category : #running } +{ #category : 'running' } VMSpurMemoryManagerTest >> setUpUsingImage [ "/!\ Only runnable with a wordsize equals to your image's (needs disabling parametizing of wordsize) /!\" @@ -874,30 +876,30 @@ VMSpurMemoryManagerTest >> setUpUsingImage [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> sizeOfObjectWithSlots: slots [ ^ self objectHeaderSize + ((slots min: 1 "at least one for the forwarder pointer") * memory wordSize "bytes") ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> useComposedImageFormat: aBoolean [ useComposedImageFormat := aBoolean ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> wordSize [ ^ wordSize ifNil: [ 8 ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurMemoryManagerTest >> wordSize: aWordSize [ wordSize := aWordSize ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurMemoryManagerTest >> zeroSizedObjectClassIndex [ ^ zeroSizedObjectClassIndex ifNil: [ self nextOrdinaryClassIndex ] diff --git a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st index db41fee015..2617ab3f77 100644 --- a/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurNewSpaceStructureTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurNewSpaceStructureTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurNewSpaceStructureTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> fillEden [ "Allocate enough objects to fill the eden." @@ -13,7 +15,7 @@ VMSpurNewSpaceStructureTest >> fillEden [ do: [ :index | self newZeroSizedObject ] ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject [ | freeStartBefore | @@ -24,7 +26,7 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectMovesFreeStartAfterObject self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAfterObject [ | freeStartBefore | @@ -35,38 +37,38 @@ VMSpurNewSpaceStructureTest >> testInstantiateNewObjectWithSlotMovesFreeStartAft self assert: memory freeStart equals: freeStartBefore + self emptyObjectSize ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenEndIsAtTheStartOfOldSpace [ self assert: memory scavenger eden limit equals: memory getMemoryMap newSpaceEnd ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryEdenIsRestOfNewSpace [ self assert: memory scavenger eden size > (environmentBuilder newSpaceSize - memory scavenger pastSpace size - memory scavenger futureSpace size - interpreter interpreterAllocationReserveBytes) ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFreeStartIsEdenStart [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceEndIsAtTheStartOfEden [ self assert: memory scavenger futureSpace limit equals: memory scavenger eden start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger futureSpace size equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceStart [ "The future survivor start indicates during the execution of the scavenger, where the next free space in future space starts." @@ -74,13 +76,13 @@ VMSpurNewSpaceStructureTest >> testNewMemoryFutureSurvivorSpaceIsAtFutureSpaceSt self assert: memory scavenger futureSurvivorStart equals: memory scavenger futureSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceEndIsAtTheStartOfFutureSpace [ self assert: memory scavenger pastSpace limit equals: memory scavenger futureSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart [ " - pastSpaceStart points to where the free space in the past space starts => it **does** move @@ -89,19 +91,19 @@ VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceFreeStartIsAtPastSpaceStart self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsAtTheStartOfNewSpace [ self assert: memory scavenger pastSpace start equals: memory getMemoryMap newSpaceStart ] -{ #category : #'tests-1-memory-initialization' } +{ #category : 'tests-1-memory-initialization' } VMSpurNewSpaceStructureTest >> testNewMemoryPastSpaceIsRoughlyOneSeventhOfNewSpace [ self assert: memory scavenger pastSpaceBytes equals: (environmentBuilder newSpaceSize // 7 truncateTo: memory allocationUnit) ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ "Allocate enough objects to fill the eden." @@ -115,7 +117,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectAfterEdenLimitThrowsError [ self assert: error messageText equals: 'no room in eden for allocateNewSpaceSlots:format:classIndex:' ] ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ | futureSpaceStartBefore | @@ -125,7 +127,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyFutureSpace [ self assert: memory scavenger futureSurvivorStart equals: futureSpaceStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ | pastSpaceStartBefore | @@ -135,7 +137,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectInEdenDoesNotModifyPastSpace [ self assert: memory pastSpaceStart equals: pastSpaceStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -146,7 +148,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectPositionIsBeforeObjectHeader [ self assert: oop equals: freeStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeader [ | freeStartBefore oop | @@ -157,7 +159,7 @@ VMSpurNewSpaceStructureTest >> testNewObjectWithSlotsPositionIsBeforeObjectHeade self assert: oop equals: freeStartBefore ] -{ #category : #'tests-2-instantiation' } +{ #category : 'tests-2-instantiation' } VMSpurNewSpaceStructureTest >> testScavengeThresholdIsInsideTheEden [ self assert:(memory scavengeThreshold diff --git a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st index 9eb2876f3f..04a758a911 100644 --- a/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurObjectAllocationTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurObjectAllocationTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurObjectAllocationTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ | oldFreeStart | @@ -14,7 +16,7 @@ VMSpurObjectAllocationTest >> testAllocateObjectInNewSpaceMovesFreeStart [ self assert: memory freeStart > oldFreeStart ] -{ #category : #tests } +{ #category : 'tests' } VMSpurObjectAllocationTest >> testAllocateObjectInOldSpaceMovesFreeStart [ | oldFreeStart | diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st index 2e6576bb9a..b86ff4e514 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceBootstrapTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurOldSpaceBootstrapTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceBootstrapTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ | tableRoot | @@ -29,7 +31,7 @@ VMSpurOldSpaceBootstrapTest >> testClassTableHasTablePagesAndHiddenRoots [ equals: memory classTableRootSlots + memory hiddenRootSlots ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ | freeListOop | @@ -38,7 +40,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListHasAsManySlotsAsRequiredByTheVM [ self assert: (memory numSlotsOf: freeListOop) equals: memory numFreeLists ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ | freeListOop | @@ -47,7 +49,7 @@ VMSpurOldSpaceBootstrapTest >> testFreeListIsWordIndexable [ self assert: (memory formatOf: freeListOop) equals: memory wordIndexableFormat ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ | freeListOop | @@ -57,14 +59,14 @@ VMSpurOldSpaceBootstrapTest >> testNewFreeListHasAllSlotsInitializedInZero [ self assert: (memory fetchPointer: i ofObject: freeListOop) equals: 0 ] ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid [ memory initializeFreeList. memory validFreeTree ] -{ #category : #'tests-memory-bootstrap' } +{ #category : 'tests-memory-bootstrap' } VMSpurOldSpaceBootstrapTest >> testNewFreeListIsValid2 [ memory initializeFreeList. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st index 6331e5ee93..8f584c1825 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceGarbageCollectorTest.class.st @@ -1,18 +1,20 @@ Class { - #name : #VMSpurOldSpaceGarbageCollectorTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurOldSpaceGarbageCollectorTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'objectStackLimit' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #assertion } +{ #category : 'assertion' } VMSpurOldSpaceGarbageCollectorTest >> assertHashOf: anOop equals: aHash [ self assert: (memory hashBitsOf: anOop) equals: aHash ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ | initialSpace lastObjectToBeRemembered sizeOfLastObject | "The planning compactor frees object by sliding, and therefore does not reclaim memory if there is only dead objects in the oldspace." @@ -33,34 +35,34 @@ VMSpurOldSpaceGarbageCollectorTest >> deltaFreeSpaceAfterGC: aBlock [ ^ initialSpace - sizeOfLastObject - memory totalFreeListBytes ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> initializationOptions [ ^ super initializationOptions , { #ObjStackPageSlots . objectStackLimit } ] -{ #category : #testing } +{ #category : 'testing' } VMSpurOldSpaceGarbageCollectorTest >> isValidFirstBridge [ ^ memory segmentManager isValidSegmentBridge: (memory segmentManager bridgeAt: 0) ] -{ #category : #running } +{ #category : 'running' } VMSpurOldSpaceGarbageCollectorTest >> runCaseManaged [ ^ self runCase ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> setUp [ objectStackLimit := 10. super setUp. ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpace [ | anObjectOop slotsNumber | @@ -71,7 +73,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: anObjectOop isNil ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpaceShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -82,7 +84,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectBiggerThanSizeOfFreeSpac self assert: memory needGCFlag ] -{ #category : #testCompactor } +{ #category : 'testCompactor' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFreeChunk [ | chuckSize chunk next object free | @@ -117,7 +119,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectRightBeforeOverflowingFr self assert: (memory isFreeObject: free). ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ | anObjectOop slotsNumber | @@ -128,7 +130,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSize [ self assert: anObjectOop isNotNil ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldBeZero [ | anObjectOop slotsNumber | @@ -139,7 +141,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldB self assert: memory totalFreeOldSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldPlanifyGC [ | anObjectOop slotsNumber | @@ -150,7 +152,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAllocateObjectWithFreeSpaceSizeShouldP self assert: memory needGCFlag ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollected [ | deltaFreeSpace | @@ -160,7 +162,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectNotReferencedShouldBeCollec self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShouldBeCollected [ | deltaFreeSpace | @@ -173,7 +175,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromNewObjectShou self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPermObjectShouldBeKept [ | oldObjectSize deltaFreeSpace | @@ -186,7 +188,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromRememberedPer self assert: deltaFreeSpace equals: oldObjectSize ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedCycleObjectShouldBeCollected [ | deltaFreeSpace | @@ -200,7 +202,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromUnreferencedC self assert: deltaFreeSpace equals: 0 ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeKept [ | oldOop objectSize deltaFreeSpace | @@ -214,7 +216,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assert: deltaFreeSpace equals: objectSize ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableShouldBeMoved [ | anObjectOop hash | @@ -233,7 +235,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testAnOldObjectReferencedFromVMVariableSho self assertHashOf: self keptObjectInVMVariable1 equals: hash ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantained [ | deltaFreeSpace arrayOfPerms objectsSize aPermObject anOldObject originalRememberedSetSize afteRememberedSetSize numberOfObjects originalNewRememberedSetSize afteNewRememberedSetSize | @@ -260,7 +262,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: deltaFreeSpace equals: objectsSize + (afteRememberedSetSize - originalRememberedSetSize) + (afteNewRememberedSetSize - originalNewRememberedSetSize) ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldObjectsIsCorrectlyMantainedWhenObjectsMoved [ | numberOfObjects originalHashes permArray anOldObject | @@ -283,7 +285,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testArrayOfPermanentObjectsPointingToOldOb self assert: (originalHashes at: i) equals: (memory hashBitsOf: (memory fetchPointer: i - 1 ofObject: permArray))] ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemerons [ "This test creates a set of ephemerons on the old space that should be fired because their key is not referenced. @@ -323,7 +325,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemerons [ equals: ephemerons ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithNonFirableHead [ "This test creates a set of ephemerons on the old space that should be fired because their key is not referenced. @@ -373,7 +375,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithNonFirable equals: 5 ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithOldKeys [ "This test creates a set of ephemerons on the old space that should be fired because their key is not referenced. @@ -413,7 +415,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testChainOfFirableEphemeronsWithOldKeys [ equals: ephemerons ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ | ephemeron | @@ -435,7 +437,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass1 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ | ephemeron | @@ -465,7 +467,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testCompactEphemeronQueuePass2 [ self assert: memory dequeueMourner equals: self keptObjectInVMVariable1. ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ memory fullGC. @@ -476,7 +478,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoNotCollectRoots [ self deny: (memory isFreeObject: (memory freeListsObj)). ] -{ #category : #'tests-OldSpaceSize' } +{ #category : 'tests-OldSpaceSize' } VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ | obj1 obj2 obj3 arrFrom arrTo arrFrom2 arrTo2 | @@ -508,7 +510,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testDoubleForwardToYoungs [ self assert: (memory isRemembered: arrTo2). ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ | roots ephemeron1 ephemeron2 ephemeron3 key1 key2 key3 | @@ -571,7 +573,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronDiscoverKey [ ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -609,7 +611,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronOverflowUnscannedEphemeronQue equals: numberJustOverLimit ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail [ | ephemeron1 key | @@ -627,7 +629,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronWithImmediateKeyShouldNotFail equals: 15 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace [ | ephemeronObjectOopOne ephemeronObjectOopTwo nonEphemeronObjectOop | @@ -650,7 +652,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace self keepObjectInVMVariable1: ephemeronObjectOopOne. self keepObjectInVMVariable2: ephemeronObjectOopTwo. - "Collect non ephemeron object that is in the old space" + "Collect non ephemeron object" memory fullGC. ephemeronObjectOopOne := memory remapObj: ephemeronObjectOopOne. ephemeronObjectOopTwo := memory remapObj: ephemeronObjectOopTwo. @@ -659,7 +661,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testEphemeronsWithSameKeyNewSpaceOldSpace self assert: ({ ephemeronObjectOopOne. ephemeronObjectOopTwo } includes: memory dequeueMourner) ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ | freespace freespace2 slotsNumber anObjectOop | @@ -684,7 +686,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testGrowOldSpace [ self assert: freespace equals: memory totalFreeOldSpace ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ | roots keyObj ephemeronObj | @@ -703,7 +705,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue [ self assert: memory dequeueMourner equals: nil. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ | roots keyObj ephemeronObj keyObj2 ephemeronObj2 | @@ -730,7 +732,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMournQueue2 [ self assert: memory dequeueMourner equals: nil. ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. @@ -768,7 +770,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testMultiPageMournQueue [ equals: numberJustOverLimit ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronAsKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -783,7 +785,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsAnotherEphemeronA memory fullGC ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -797,7 +799,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronHoldsOldNonRootEphemer memory fullGC ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEphemeronAsNonKeyThenFullGC [ | ephemeron1 ephemeron2 | @@ -814,7 +816,7 @@ VMSpurOldSpaceGarbageCollectorTest >> testNewRootEphemeronIsHeldsByOldNonRootEph memory fullGC ] -{ #category : #ephemerons } +{ #category : 'ephemerons' } VMSpurOldSpaceGarbageCollectorTest >> testPageLimitMournQueue [ "This test Fires more ephemerons than those that fit in a single page of the mourn queue. diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st index 33212d0b85..11d8661998 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceStructureTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMSpurOldSpaceStructureTest, - #superclass : #VMSpurMemoryManagerTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceStructureTest', + #superclass : 'VMSpurMemoryManagerTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceShouldHaveOneSegment [ self assert: memory segmentManager numSegments equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSameSizeAsOldSpace [ self @@ -18,7 +20,7 @@ VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSingleSegmentShouldBeHaveSam equals: memory oldSpaceSize ] -{ #category : #tests } +{ #category : 'tests' } VMSpurOldSpaceStructureTest >> testNewMemoryOldSpaceSizeShouldBeAskedMemory [ self assert: memory oldSpaceSize equals: oldSpaceSize diff --git a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st index b923eade30..131ffcdd73 100644 --- a/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurOldSpaceTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurOldSpaceTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurOldSpaceTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ memory allocateOldSpaceChunkOfBytes: memory totalFreeListBytes. @@ -12,7 +14,7 @@ VMSpurOldSpaceTest >> testAllocateAllFreeMemoryShouldLeaveNoFreeMemory [ self assert: memory totalFreeListBytes equals: 0 ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self createFreeChunkOfSize: 120. @@ -24,7 +26,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: 24) ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists [ self createFreeChunkOfSize: 120. @@ -36,7 +38,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldRemoveSmallerNodeFromLists self assertFreeListEmpty: (self freeListForSize: 120) ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ | smallerAddress newAddress | @@ -49,7 +51,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldReuseSmallerAddress [ self assert: newAddress equals: smallerAddress ] -{ #category : #'tests-8-allocation-strategy-list-bestfit' } +{ #category : 'tests-8-allocation-strategy-list-bestfit' } VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self createFreeChunkOfSize: 120. @@ -61,7 +63,7 @@ VMSpurOldSpaceTest >> testAllocateBestFitInListShouldUseIgnoreBiggerChunk [ self denyFreeListEmpty: (self freeListForSize: 160) ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ | someBytes freeBytesBefore | @@ -72,7 +74,7 @@ VMSpurOldSpaceTest >> testAllocateChunkOfMemoryShouldHaveSoMuchMemoryLessAfter [ self assert: memory totalFreeListBytes equals: freeBytesBefore - someBytes ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ | secondAddress newAddress | @@ -83,7 +85,7 @@ VMSpurOldSpaceTest >> testAllocateExactBiggerChunkShouldNotReuseSmallFreeChunk [ self deny: newAddress equals: secondAddress ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self createFreeChunkOfSize: 160. @@ -95,7 +97,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldIgnoreBiggerChunks [ self denyFreeListEmpty: (self freeListForSize: 200) ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ | secondAddress | @@ -106,7 +108,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldRemoveNodeFromList [ self assert: (self freeListForSize: 160) equals: 0 ] -{ #category : #'tests-6-allocation-strategy-list-exact' } +{ #category : 'tests-6-allocation-strategy-list-exact' } VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ | secondAddress newAddress | @@ -116,7 +118,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitInListShouldReuseAddress [ self assert: newAddress equals: secondAddress ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ memory allocateOldSpaceChunkOfBytes: (memory bytesInObject: self freeTreeRootOop). @@ -124,7 +126,7 @@ VMSpurOldSpaceTest >> testAllocateExactFitTreeRootShouldRemoveRootFromTree [ self assert: self freeTreeRootOop equals: 0 ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -135,7 +137,7 @@ VMSpurOldSpaceTest >> testAllocateExactTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ | size childAddress smallerChildOop largerChildOop aBitBiggerThanHalf | @@ -154,7 +156,7 @@ VMSpurOldSpaceTest >> testAllocateHalfOfTreeNodeShouldSplitIt [ self assert: (memory bytesInObject: largerChildOop) equals: aBitBiggerThanHalf ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ | freeRootOopBeforeAllocation | @@ -165,7 +167,7 @@ VMSpurOldSpaceTest >> testAllocateInFreeTreeShouldChangeRoot [ self deny: freeRootOopBeforeAllocation equals: self freeTreeRootOop ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ "Allocation should be contiguous because we have a single big chunk of memory to take memory from" @@ -176,7 +178,7 @@ VMSpurOldSpaceTest >> testAllocateManyChunksShouldKeepSingleFreeEntry [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ | address | @@ -185,7 +187,7 @@ VMSpurOldSpaceTest >> testAllocateMoreThanFreeMemoryShouldFailReturningNil [ self assert: address isNil ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRoot [ | leftOverSize | @@ -195,7 +197,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddBigLeftOverAsFreeTreeRo self assert: (memory bytesInObject: self freeTreeRootOop) equals: leftOverSize ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList [ | leftOverSize | @@ -205,7 +207,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldAddSmallLeftOverInFreeList self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : #'tests-9-allocation-strategy-tree' } +{ #category : 'tests-9-allocation-strategy-tree' } VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ | oldRootAddress newAddress | @@ -218,7 +220,7 @@ VMSpurOldSpaceTest >> testAllocatePartOfTreeRootShouldReuseRootAddress [ self assert: newAddress equals: oldRootAddress ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ | sizeToAllocate powerOfSizeToAllocate leftOverSize | @@ -231,7 +233,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldAddLeftoverInList [ self denyFreeListEmpty: (self freeListForSize: leftOverSize) ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ | sizeToAllocate powerOfSizeToAllocate nonMultipleAddress newAddress | @@ -253,7 +255,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldIgnoreNonPowers [ self deny: newAddress equals: nonMultipleAddress. ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ | sizeToAllocate powerOfSizeToAllocate | @@ -265,7 +267,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldRemoveNodeFromList [ self assertFreeListEmpty: (self freeListForSize: powerOfSizeToAllocate) ] -{ #category : #'tests-7-allocation-strategy-list-power' } +{ #category : 'tests-7-allocation-strategy-list-power' } VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ | sizeToAllocate freeMultipleAddress newAddress powerOfSizeToAllocate | @@ -277,7 +279,7 @@ VMSpurOldSpaceTest >> testAllocatePowerInListShouldReuseMultipleAddress [ self assert: newAddress equals: freeMultipleAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ | secondAddress newAddress | @@ -288,7 +290,7 @@ VMSpurOldSpaceTest >> testAllocateSmallerChunkShouldReusePartiallyFreeChunk [ self assert: newAddress equals: secondAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ | secondAddress thirdAddress | @@ -299,7 +301,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkAddressesShouldBeInAllocationOrder [ self assert: secondAddress < thirdAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ | freeChunkStartAddress allocatedSize | @@ -311,7 +313,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldRemoveSpaceFromFreeList [ equals: freeChunkStartAddress + allocatedSize ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted [ | freeChunkStartAddressBeforeAllocation allocatedAddress | @@ -322,7 +324,7 @@ VMSpurOldSpaceTest >> testAllocatedChunkOfMemoryShouldStartWhereFreeChunkStarted equals: freeChunkStartAddressBeforeAllocation ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ | firstAddress byteSize smallerNodeOop | @@ -335,7 +337,7 @@ VMSpurOldSpaceTest >> testAllocationLargerThanFreeListLimitShouldUseFreeTree [ self assert: smallerNodeOop equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian [ | newAddress freeLargeSpaceAddressBeforeAllocation freeAddress | @@ -349,7 +351,7 @@ VMSpurOldSpaceTest >> testAllocationShouldNotLeaveFreeChunkSmallerThanLiliputian self assert: newAddress equals: freeLargeSpaceAddressBeforeAllocation ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ | smallerChild freeTreeRoot parentNode | @@ -362,7 +364,7 @@ VMSpurOldSpaceTest >> testChildNodeShouldHaveRootAsParent [ self assert: parentNode equals: freeTreeRoot ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ | freeTreeRoot size child1 child2 nextChildOop child3 siblingOop previousOop | @@ -389,7 +391,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldHavePrevious [ self assert: previousOop equals: nextChildOop. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ | freeTreeRoot size child1 child2 nextChildOop child3 largerOop largerThanSmaller siblingOop | @@ -421,7 +423,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveLarger [ self assert: largerOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ | freeTreeRoot size child1 child2 nextChild child3 parentOop | @@ -448,7 +450,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveParent [ self assert: parentOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ | freeTreeRoot size child1 child2 nextChildOop child3 smallerOop smallerThanSmaller siblingOop | @@ -480,7 +482,7 @@ VMSpurOldSpaceTest >> testChildSiblingNodesInFreeTreeShouldNotHaveSmaller [ self assert: smallerOop equals: 0. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ | freeRoot address | @@ -492,7 +494,7 @@ VMSpurOldSpaceTest >> testDeallocateShouldNotChangeRoot [ self assert: freeRoot equals: (memory freeLists at: 0) ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead [ | smallerChild freeTreeRoot size child1 child2 nextChild child3 | @@ -514,7 +516,7 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeInFreeTreeShouldBeInsertedAfterHead self assert: nextChild equals: child2. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ | smallerChild freeTreeRoot size child1 child2 nextChild | @@ -532,13 +534,13 @@ VMSpurOldSpaceTest >> testEqualSizeChildNodeShouldBeNextNode [ self assert: nextChild equals: child2. ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testFalseObjectIsNotAnArray [ self deny: (memory isArray: memory falseObject). ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ | firstAddress secondAddress freeListHead chunkSize | chunkSize := 32. @@ -552,7 +554,7 @@ VMSpurOldSpaceTest >> testFreeAChunkShouldBePutAsHeadOfFreeList [ self assert: freeListHead equals: secondAddress ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ | secondAddress | @@ -562,7 +564,7 @@ VMSpurOldSpaceTest >> testFreeChunkDoesNotGetMergedWithExistingFreeChunks [ self assert: memory allFreeObjects size equals: 2 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize | allocationSize := 32. @@ -578,7 +580,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowNextChunkOfSameSize [ self assert: nextFreeChunk equals: firstAddress ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ | firstAddress secondAddress freeListHead nextFreeChunk allocationSize previousFreeChunk | allocationSize := 32. @@ -595,7 +597,7 @@ VMSpurOldSpaceTest >> testFreeChunkShouldKnowPreviousChunkOfSameSize [ self assert: previousFreeChunk equals: freeListHead ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChunks [ | secondAddress newAddress | @@ -607,7 +609,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldBeListedAsDifferentFreeChu self assert: memory allFreeObjects size equals: 3 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ | secondAddress allocationSize firstAddress | allocationSize := 32. @@ -620,7 +622,7 @@ VMSpurOldSpaceTest >> testFreeChunksWithSameSizeShouldShareSingleHead [ self assert: memory allFreeListHeads size equals: 1 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ | firstAddress freeListHead | @@ -636,7 +638,7 @@ VMSpurOldSpaceTest >> testFreeListsShouldBeIndexedBySlotSize [ ] ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ 2 to: memory numFreeLists - 1 do: [ :numberOfSlots | @@ -646,7 +648,7 @@ VMSpurOldSpaceTest >> testInitialFreeListShouldBeEmpty [ ] ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ | bigChunk nextNode | @@ -656,7 +658,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoLargerNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ | bigChunk nextNode | @@ -666,7 +668,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoNextNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ | bigChunk nextNode | @@ -676,7 +678,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoParentNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ | bigChunk nextNode | @@ -686,7 +688,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoPreviousNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ | bigChunk nextNode | @@ -696,13 +698,13 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootHasNoSmallerNode [ self assert: nextNode equals: 0. ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootIsFreeObject [ self assert: (memory isFreeObject: self freeTreeRootOop) ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ self @@ -710,7 +712,7 @@ VMSpurOldSpaceTest >> testInitialFreeTreeRootSizeShouldBeTotalFreeSpace [ equals: memory totalFreeListBytes ] -{ #category : #'tests-4-free-tree' } +{ #category : 'tests-4-free-tree' } VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ | firstAddress byteSize smallerNodeOop | @@ -723,7 +725,7 @@ VMSpurOldSpaceTest >> testLargeFreeChunkInFreeTreeNodeShouldStoreChunkOop [ self assert: (memory startOfObject: smallerNodeOop) equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop | @@ -744,7 +746,7 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldBeFreeTreeChild [ self assert: (memory startOfObject: largerChildOop) equals: firstAddress ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ | firstAddress freeRoot rootSize moreThanHalf newRoot largerChildOop parentNodeOop | @@ -766,13 +768,13 @@ VMSpurOldSpaceTest >> testNewBigFreeChunkShouldHaveRootAsParent [ self assert: parentNodeOop equals: newRoot ] -{ #category : #'tests-1-startup' } +{ #category : 'tests-1-startup' } VMSpurOldSpaceTest >> testNewMemoryShouldHaveSingleFreeObject [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ | oop | @@ -781,19 +783,19 @@ VMSpurOldSpaceTest >> testNewObjectShouldBeOld [ self assert: (memory getMemoryMap isOldObject: oop) ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectIsNotAnArray [ self deny: (memory isArray: memory nilObject). ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testNilObjectObjectFormatIsZero [ self assert: (memory formatOf: memory nilObject) equals: 0. ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFreeList [ | secondAddress freeChunksBefore | @@ -806,7 +808,7 @@ VMSpurOldSpaceTest >> testPartiallyReusingFreeChunkShouldKeepNumberOfEntriesInFr self assert: memory allFreeObjects size equals: freeChunksBefore. ] -{ #category : #'tests-2-allocation-basic' } +{ #category : 'tests-2-allocation-basic' } VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ | secondAddress | @@ -817,7 +819,7 @@ VMSpurOldSpaceTest >> testReuseFreeChunkShouldRemoveEntryFromFreeList [ self assert: memory allFreeObjects size equals: 1 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -829,7 +831,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListNextShouldBeZero [ self assert: (self nextNodeOf: freeListHead) equals: 0 ] -{ #category : #'tests-3-free-lists' } +{ #category : 'tests-3-free-lists' } VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ | firstAddress freeListHead allocationSize | allocationSize := 32. @@ -841,7 +843,7 @@ VMSpurOldSpaceTest >> testSingleFreeChunkListPreviousShouldBeZero [ self assert: (self previousNodeOf: freeListHead) equals: 0 ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ | smallerChild freeTreeRoot parentNode smallerSize rootSize | @@ -858,7 +860,7 @@ VMSpurOldSpaceTest >> testSmallerChildNodeShouldBeFreeTreeChild [ self assert: parentNode equals: freeTreeRoot ] -{ #category : #'tests-5-allocation-strategy' } +{ #category : 'tests-5-allocation-strategy' } VMSpurOldSpaceTest >> testTrueObjectIsNotAnArray [ self deny: (memory isArray: memory trueObject). diff --git a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st index 674b31f591..dd5b734300 100644 --- a/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurRememberedSetTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurRememberedSetTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurRememberedSetTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests - from old to new' } +{ #category : 'tests - from old to new' } VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ | oldObjectAddress rememberedObjectAddress | @@ -22,7 +24,7 @@ VMSpurRememberedSetTest >> testFreeRememberedOldObjectShouldForgetIt [ ] -{ #category : #'tests - from old to perm' } +{ #category : 'tests - from old to perm' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNewRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -40,7 +42,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldNotUseNew ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress referencedOldObjectAddress | @@ -63,7 +65,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldRememberP ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOldRememberedSet [ | oldObjectAddress permObjectAddress referencedOldObjectAddress | @@ -82,7 +84,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceObjectWithOldObjectShouldUpdateOld ] -{ #category : #'tests - from perm to new' } +{ #category : 'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRememberedToo [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -99,7 +101,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldBeRemembered ] -{ #category : #'tests - from perm to new' } +{ #category : 'tests - from perm to new' } VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRememberedSet [ | oldObjectAddress rememberedObjectAddress permObjectAddress | @@ -117,7 +119,7 @@ VMSpurRememberedSetTest >> testMoveToPermSpaceRememberedObjectShouldUpdateNewRem ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ | oldObjectAddress | @@ -126,7 +128,7 @@ VMSpurRememberedSetTest >> testOldObjectIsNotRemembered [ self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ | oldObjectRootAddress originalLimit youngObjectAddress | @@ -156,7 +158,7 @@ VMSpurRememberedSetTest >> testOverflowRememberedSetShouldMakeItGrow [ self assert: memory getFromOldSpaceRememberedSet rememberedSetLimit equals: originalLimit * 2 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone [ | oldObjectAddress storedOldObjectAddress | @@ -170,7 +172,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: storedOldObjectAddress). ] -{ #category : #'tests - from perm to old' } +{ #category : 'tests - from perm to old' } VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress | @@ -186,7 +188,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInPermObjectShouldRememberPermObjec self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyone [ | oldObjectAddress youngObjectAddress | @@ -200,7 +202,7 @@ VMSpurRememberedSetTest >> testStoreOldObjectInYoungObjectShouldNotRememberAnyon self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #'tests - from old to perm' } +{ #category : 'tests - from old to perm' } VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone [ | permObjectAddress oldObjectAddress | @@ -214,7 +216,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInOldObjectShouldNotRememberAnyone self deny: (memory isRemembered: oldObjectAddress). ] -{ #category : #'tests - from perm to perm' } +{ #category : 'tests - from perm to perm' } VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyone [ | permObjectAddress referencedPermObjectAddress | @@ -228,7 +230,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInPermObjectShouldNotRememberAnyon self deny: (memory isRemembered: referencedPermObjectAddress). ] -{ #category : #'tests - from new to perm' } +{ #category : 'tests - from new to perm' } VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyone [ | permObjectAddress youngObjectAddress | @@ -242,7 +244,7 @@ VMSpurRememberedSetTest >> testStorePermObjectInYoungObjectShouldNotRememberAnyo self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberPermObject [ | permObjectAddress oldObjectAddress youngObjectAddress | @@ -267,7 +269,7 @@ VMSpurRememberedSetTest >> testStoreYoungAndOldObjectInPermObjectShouldRememberP ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObject [ | oldObjectAddress youngObjectAddress | @@ -281,7 +283,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInOldObjectShouldRememberOldObjec self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObject [ | permObjectAddress youngObjectAddress | @@ -295,7 +297,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInPermObjectShouldRememberPermObj self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAnyone [ | youngObjectAddress storedYoungObjectAddress | @@ -309,7 +311,7 @@ VMSpurRememberedSetTest >> testStoreYoungObjectInYoungObjectShouldNotRememberAny self deny: (memory isRemembered: youngObjectAddress). ] -{ #category : #tests } +{ #category : 'tests' } VMSpurRememberedSetTest >> testYoungObjectIsNotRemembered [ | newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st index d4b6cbe80f..2d78990862 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeEphemeronTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurScavengeEphemeronTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengeEphemeronTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> pushRoot: anObject [ | link | @@ -20,7 +22,7 @@ VMSpurScavengeEphemeronTest >> pushRoot: anObject [ self keepObjectInVMVariable1: link. ] -{ #category : #initialization } +{ #category : 'initialization' } VMSpurScavengeEphemeronTest >> setUp [ super setUp. @@ -28,7 +30,7 @@ VMSpurScavengeEphemeronTest >> setUp [ self createEphemeronClass ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmptyMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -48,7 +50,7 @@ VMSpurScavengeEphemeronTest >> testDequeueMournerWithOnlyOneEphemeronShouldEmpty self assert: memory dequeueMourner equals: nil ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredDuringEphemeronListIteration [ | ephemeronObjectOop1 ephemeronObjectOop2 dicoveredEphemeron nonSurvivingKey key1 key2 | @@ -96,7 +98,7 @@ VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredDuringEphemeronListIterati memory runLeakCheckerFor: GCModeIncremental ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredTwiceInRememberedSet [ | ephemeronObjectOop oldEphemeronObjectOop1 oldEphemeronObjectOop2 | @@ -118,7 +120,7 @@ VMSpurScavengeEphemeronTest >> testEphemeronDiscoveredTwiceInRememberedSet [ memory runLeakCheckerFor: GCModeIncremental ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ | numberOfEphemerons ephemeronKey | @@ -154,7 +156,7 @@ VMSpurScavengeEphemeronTest >> testFireManyEphemeronWithSameKey [ withValue: memory nilObject ] ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeronClass [ | ephemeronObjectOop | @@ -165,7 +167,7 @@ VMSpurScavengeEphemeronTest >> testNewEphemeronObjectShouldBeInstanceOfEphemeron equals: ourEphemeronClass ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -188,7 +190,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberdSetBecomesNormalO equals: memory nonIndexablePointerFormat ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -209,7 +211,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -236,7 +238,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingDy equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -265,7 +267,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronInRememberedSetReferencingSu equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAfterFinalizationIsFired [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -286,7 +288,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectBecomesNormalObjectAft equals: memory nonIndexablePointerFormat ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldBeAddedInTheMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop | @@ -305,7 +307,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObjectShouldScavengeEphemeronKey [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -327,7 +329,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingDyingObject equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorShouldLeaveEphemeronObjectAsIs [ | ephemeronObjectOop nonEphemeronObjectOop nonEphemeronObjectHash | @@ -351,7 +353,7 @@ VMSpurScavengeEphemeronTest >> testScavengeEphemeronObjectReferencingSurvivorSho equals: nonEphemeronObjectHash ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInEden [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -382,7 +384,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDifferentDyingObjectsShouldBeAddedInTheMournQueueAfterScavengingInPastSpace [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop anotherNonEphemeronObjectOop | @@ -424,7 +426,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingDiffere self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlyOneEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -456,7 +458,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: nil ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldAddOnlySecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -486,7 +488,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: anotherEphemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldBeQueuedAfterConsumingMournQueue [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -524,7 +526,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: memory dequeueMourner equals: ephemeronObjectOop ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldLeaveFirstOneAsEphemeron [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -554,7 +556,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi self assert: (memory isEphemeron: ephemeronObjectOop) ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyingObjectsShouldScavengeKeyOfSecond [ | ephemeronObjectOop nonEphemeronObjectOop anotherEphemeronObjectOop | @@ -586,7 +588,7 @@ VMSpurScavengeEphemeronTest >> testScavengeTwoEphemeronObjectsReferencingSameDyi equals: (memory remapObj: nonEphemeronObjectOop) ] -{ #category : #'tests-ephemerons-globals' } +{ #category : 'tests-ephemerons-globals' } VMSpurScavengeEphemeronTest >> testScavengeZeroSizedEphemeronShouldTreatItAsNormalObject [ | ephemeronObjectOop zeroSizedEphemeronClass hashBefore addressBefore | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st index ae428a6af8..56c08746b3 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengeWeakTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMSpurScavengeWeakTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengeWeakTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'test-format' } +{ #category : 'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ | weakObjectOop | @@ -14,7 +16,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldBeInstanceOfWeakClass [ self assert: (memory fetchClassOfNonImm: weakObjectOop) equals: ourWeakClass ] -{ #category : #'test-format' } +{ #category : 'test-format' } VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ | weakObjectOop classIndex | @@ -26,7 +28,7 @@ VMSpurScavengeWeakTest >> testNewWeakObjectShouldHaveClassIndexOfItsClass [ self assert: classIndex equals: (memory ensureBehaviorHash: ourWeakClass) ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash nilHash | @@ -50,7 +52,7 @@ VMSpurScavengeWeakTest >> testScavengeOldWeakObjectReferencingNonSurvivorShouldB equals: nilHash ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNilled [ | weakObjectOop nonWeakObjectOop nilHash | @@ -70,7 +72,7 @@ VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingNonSurvivorShouldBeNi equals: nilHash ] -{ #category : #tests } +{ #category : 'tests' } VMSpurScavengeWeakTest >> testScavengeWeakObjectReferencingSurvivorShouldLeaveWeakObjectAsIs [ | weakObjectOop nonWeakObjectOop nonWeakObjectHash | diff --git a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st index 94f56ee281..08ac1152d9 100644 --- a/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurScavengerTest.class.st @@ -1,17 +1,19 @@ Class { - #name : #VMSpurScavengerTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurScavengerTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #asserting } +{ #category : 'asserting' } VMSpurScavengerTest >> assertPastSpaceIsEmpty [ self assert: memory pastSpaceStart equals: memory scavenger pastSpace start ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurScavengerTest >> fullNewSpace [ | rootObjectAddress referencedObjectAddress freeStartAtBeginning | @@ -37,7 +39,7 @@ VMSpurScavengerTest >> fullNewSpace [ self error: 'New space is not full!' ] -{ #category : #helpers } +{ #category : 'helpers' } VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop receiver: aReceiverOop args: argsOops andStack: stackOops [ | page pointer | @@ -85,7 +87,7 @@ VMSpurScavengerTest >> makeBaseFrameWithMethod: aMethodOop context: aContextOop withValue: (memory coInterpreter withSmallIntegerTags: page baseFP) ] ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScavenge [ | times | @@ -97,7 +99,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdDoesNotScheduleScaveng self deny: memory needGCFlag ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ | times anObjectOop | @@ -108,7 +110,7 @@ VMSpurScavengerTest >> testAllocatingObjectsBelowThresholdShouldBeYoung [ self assert: (memory getMemoryMap isYoungObject: anObjectOop) ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ | times anObject | @@ -126,7 +128,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldBeOld [ self assert: (memory getMemoryMap isOldObject: anObject) ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge [ | times | @@ -144,7 +146,7 @@ VMSpurScavengerTest >> testAllocatingObjectsOverThresholdShouldScheduleScavenge self assert: memory needGCFlag ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -165,7 +167,7 @@ VMSpurScavengerTest >> testArgumentInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ | rootObjectAddress | @@ -181,7 +183,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithFewSurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0 "Past space keep not full -> Not tenure next pass" ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ | rootObjectAddress | @@ -196,7 +198,7 @@ VMSpurScavengerTest >> testComputeTenuringThresholdWithManySurvivors [ self assert: memory scavenger scavengerTenuringProportion closeTo: 0.1 "Past space is full -> Tenure next pass" ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -219,7 +221,7 @@ VMSpurScavengerTest >> testContextInStackShouldSurviveScanvenge [ equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -238,7 +240,7 @@ VMSpurScavengerTest >> testInterpreterMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -257,7 +259,7 @@ VMSpurScavengerTest >> testInterpreterNewMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -276,7 +278,7 @@ VMSpurScavengerTest >> testInterpreterProfileMethodShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -295,7 +297,7 @@ VMSpurScavengerTest >> testInterpreterProfileProcessShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-5-scavenge-specialObjects' } +{ #category : 'tests-5-scavenge-specialObjects' } VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -314,7 +316,7 @@ VMSpurScavengerTest >> testInterpreterProfileSemaphoreShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -336,7 +338,7 @@ VMSpurScavengerTest >> testMethodInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ | rootObjectAddress newRootObjectAddress referencedObjectAddress referencedObjectHash | @@ -359,7 +361,7 @@ VMSpurScavengerTest >> testMovingReferencedObjectShouldUpdateReference [ equals: referencedObjectHash ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -379,7 +381,7 @@ VMSpurScavengerTest >> testObjectInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress maybeMappedReferenceToYoungObject | @@ -399,7 +401,7 @@ VMSpurScavengerTest >> testOldObjectReferenceToYoungObjectShouldBeRemappedAfterS self assert: maybeMappedReferenceToYoungObject equals: newRememberedObjectAddress ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferencedObjectIsInTheOldSpace [ | permObjectAddress youngObject otherOldObjectAddress | @@ -426,7 +428,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeKeptWhenTheReferenced ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceWhenMutatedToPointAPermObject [ | permObjectAddress youngObject otherPermObjectAddress | @@ -450,7 +452,7 @@ VMSpurScavengerTest >> testPermObjectInRemeberedSetShouldBeRemovedFromPermSpaceW ] -{ #category : #'tests-4-scavenge-stack' } +{ #category : 'tests-4-scavenge-stack' } VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ | newObjectOop newObjectHash newObjectAddress | @@ -470,7 +472,7 @@ VMSpurScavengerTest >> testReceiverInStackShouldSurviveScanvenge [ self assert: (memory hashBitsOf: newObjectAddress) equals: newObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ | rootObjectAddress rootObjectHash newRootObjectAddress referencedObjectAddress referencedObjectHash newReferencedObjectAddress | @@ -493,7 +495,7 @@ VMSpurScavengerTest >> testReferencedObjectShouldSurviveScavenge [ self assert: (memory hashBitsOf: newReferencedObjectAddress) equals: referencedObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ | youngObjectAddress oneOldObjectAddress otherOldObjectAddress | @@ -518,7 +520,7 @@ VMSpurScavengerTest >> testScanvengeTenureByAgeWithRSInRedZoneShouldShrink [ ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces [ | oldPastSpaceStart oldFutureSpaceStart | @@ -531,7 +533,7 @@ VMSpurScavengerTest >> testScavengeEmptyMemoryShouldExchangePastAndFutureSpaces self assert: memory scavenger futureSpace start equals: oldPastSpaceStart. ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ "Nil should survive." "A new object not referenced should not survive." @@ -542,7 +544,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPastSpace [ "Only Nil should survive." @@ -554,7 +556,7 @@ VMSpurScavengerTest >> testScavengeNonSurvivorShouldOnlyCopySurvivorObjectToPast self assertPastSpaceIsEmpty ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -579,7 +581,7 @@ VMSpurScavengerTest >> testScavengeObjectInRememberedSetShouldBeInvertedToBeBefo self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInStack [ | objectInTheStack oldObjectAddress objectInRememberedSet | @@ -604,7 +606,7 @@ VMSpurScavengerTest >> testScavengeObjectInRemembererdSetShouldBeBeforeObjectInS self assert: (memory remapObj: objectInRememberedSet) < (memory remapObj: objectInTheStack) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -621,7 +623,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeBeforeObjectInSpecialVar self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObjectInSpecialVariable [ | objectInTheStack objectInSpecialVariable | @@ -638,7 +640,7 @@ VMSpurScavengerTest >> testScavengeObjectInStackShouldBeInvertedToBeBeforeObject self assert: (memory remapObj: objectInTheStack) < (memory remapObj: objectInSpecialVariable) ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ "Nil should survive. It is referenced by the roots because many of their slots are nilled." @@ -647,7 +649,7 @@ VMSpurScavengerTest >> testScavengeShouldCopySurvivorObjectToPastSpace [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ memory doScavenge: 1 "TenureByAge". @@ -655,7 +657,7 @@ VMSpurScavengerTest >> testScavengeSurvivorShouldEmptyEden [ self assert: memory freeStart equals: memory scavenger eden start ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAndForth [ | oldPastSpaceStart oldFutureSpaceStart | @@ -668,7 +670,7 @@ VMSpurScavengerTest >> testScavengeTwiceShouldExchangePastAndFutureSpacesBackAnd self assert: memory scavenger futureSpace start equals: oldFutureSpaceStart. ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder [ | rootObjectAddress objectThatShouldGoSecond objectThatShouldGoFirst | @@ -686,7 +688,7 @@ VMSpurScavengerTest >> testScavengedObjectsShouldBeCopiedInInstanceVariableOrder self assert: (memory remapObj: objectThatShouldGoFirst) < (memory remapObj: objectThatShouldGoSecond) ] -{ #category : #'tests-7-scavenge-order' } +{ #category : 'tests-7-scavenge-order' } VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects [ | firstRootObjectAddress nonRootObjectAddress secondRootObjectAddress | @@ -704,7 +706,7 @@ VMSpurScavengerTest >> testScavengedRootObjectsShouldBeCopiedBeforeOtherObjects self assert: (memory remapObj: secondRootObjectAddress) < (memory remapObj: nonRootObjectAddress) ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ | firstObjectAddress secondObjectAddress | @@ -736,7 +738,7 @@ VMSpurScavengerTest >> testShouldTenureBasedOnTheThreshold [ ] -{ #category : #'tests-8-scavenge-tenuring' } +{ #category : 'tests-8-scavenge-tenuring' } VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ | rootObjectAddress newRootObjectAddress | @@ -760,7 +762,7 @@ VMSpurScavengerTest >> testShouldTenureObjectsWhenPastSpaceIsFull [ self assert: (memory isInOldSpace: newRootObjectAddress) ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ | objectA objectB | objectA := self newObjectWithSlots: 1. @@ -779,7 +781,7 @@ VMSpurScavengerTest >> testUnreferencedObjectCycleShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ | unreferencedRootObjectAddress referencedObjectAddress | unreferencedRootObjectAddress := self newObjectWithSlots: 1. @@ -794,7 +796,7 @@ VMSpurScavengerTest >> testUnreferencedObjectGraphShouldNotSurviveScavenge [ self assertPastSpaceIsEmpty ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanvenge [ | oldObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -812,7 +814,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromOldObjectShouldSurviveScanve self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : #'tests-6-scavenge-rememberedset' } +{ #category : 'tests-6-scavenge-rememberedset' } VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurviveScanvenge [ | permObjectAddress rememberedObjectAddress rememberedObjectHash newRememberedObjectAddress | @@ -830,7 +832,7 @@ VMSpurScavengerTest >> testYoungObjectRememberedFromPermanentObjectShouldSurvive self assert: (memory hashBitsOf: newRememberedObjectAddress) equals: rememberedObjectHash ] -{ #category : #'tests-3-scavenge-basic' } +{ #category : 'tests-3-scavenge-basic' } VMSpurScavengerTest >> testYoungObjectsFromPermanentSpaceAreRemapped [ | newObjectOop newObjectHash permObject newObjectAddress | diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st index 3b597fa124..6c7bc93c59 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForLargeTreeTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #VMSpurTreeAllocationStrategyForLargeTreeTest, - #superclass : #VMSpurTreeAllocationStrategyForSmallTreeTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMSpurTreeAllocationStrategyForLargeTreeTest', + #superclass : 'VMSpurTreeAllocationStrategyForSmallTreeTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ " 1120 @@ -52,7 +54,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -60,7 +62,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test01AllocateBestFitTreeRootWit self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -68,7 +70,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test02AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -76,7 +78,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test03AllocateBestFitTreeRootWit self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWithChildrenShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 16. @@ -84,7 +86,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test04AllocateBestFitTreeRootWit self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -92,7 +94,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test05AllocateBestFitSmallerTree self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -102,7 +104,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test06AllocateBestFitSmallerTree self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 16. @@ -110,7 +112,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test07AllocateBestFitSmallerTree self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -118,7 +120,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test15AllocateBestFitBiggerTreeN self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -128,7 +130,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test16AllocateBestFitBiggerTreeN self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 16. @@ -136,7 +138,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test17AllocateBestFitLargerTreeN self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -144,7 +146,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test20AllocateBestFitSmallerOfSm self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -154,7 +156,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test21AllocateBestFitSmallerOfSm self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSmallerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 16. @@ -162,7 +164,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test22AllocateBestFitSmallerOfSm self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -170,7 +172,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test25AllocateBestFitLargerOfSma self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -179,7 +181,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test26AllocateBestFitLargerOfSma self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSmallerLeafTreeNodeShouldShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 16. @@ -187,7 +189,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test27AllocateBestFitLargerOfSma self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -195,7 +197,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test30AllocateBestFitSmallerOfLa self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -205,7 +207,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test31AllocateBestFitSmallerOfLa self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 16. @@ -213,7 +215,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test32AllocateBestFitSmallerOfLa self denyFreeListEmpty: (self freeListForSize: 16) ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. @@ -221,7 +223,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test35AllocateBestFitLargerOfLar self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -231,7 +233,7 @@ VMSpurTreeAllocationStrategyForLargeTreeTest >> test36AllocateBestFitLargerOfLar self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-10-bestfit-liliputian-leftovers' } +{ #category : 'tests-10-bestfit-liliputian-leftovers' } VMSpurTreeAllocationStrategyForLargeTreeTest >> test37AllocateBestFitLargerOfLargerLeafTreeNodeShouldInsertLiliputianInFreeList [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 16. diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st index 8fe74cb50a..4340d04dd7 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationStrategyForSmallTreeTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #VMSpurTreeAllocationStrategyForSmallTreeTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurTreeAllocationStrategyForSmallTreeTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationStrategyForSmallTreeTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUp [ super setUp. self setUpTree. ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ " 560 @@ -61,13 +63,13 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> setUpTree [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationStrategyForSmallTreeTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithChildrenShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -75,7 +77,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateExactTreeRootWithC self assert: (memory bytesInObject: self freeTreeRootOop) equals: (self sizeOfChildInBreadthFirstOrder: 2) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) - 8. @@ -84,7 +86,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test01AllocateSmallerThanLiliput self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithChildrenShouldReInsertSmallerLargerChildFromRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -92,7 +94,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -103,7 +105,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test02AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1152 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithChildrenShouldReplaceSmallerChildWithSmallerSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1). @@ -111,7 +113,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateExactTreeRootWithC self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliputianDiffFromTreeRootWithChildrenShouldUseLargerThanRootAddress [ | desiredAddress allocatedAddress | @@ -121,7 +123,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test03AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2). @@ -129,7 +131,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateExactSmallerTreeNo self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 4) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseLargestSmallerThanRoot [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 2) - 8. @@ -138,7 +140,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test04AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -148,7 +150,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateExactSmallerTreeNo self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -159,7 +161,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test05AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1088 - allocatedSize) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNodeShouldReplaceNodeWithSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3). @@ -167,7 +169,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateExactBiggerTreeNod self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliputianDiffFromSmallerWithChildrenShouldUseSmallerThanRootAddress [ | desiredAddress allocatedAddress | @@ -177,7 +179,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test06AllocateSmallerThanLiliput self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -187,7 +189,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateExactBiggerTreeNod self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldUseIntermediateNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -197,7 +199,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test07AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 5) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 4). @@ -205,7 +207,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateExactSmallerOfSmal self assert: (self smallerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | allocatedSize := (self sizeOfChildInBreadthFirstOrder: 4) - 8. @@ -215,7 +217,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test08AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1056 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -225,7 +227,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateExactSmallerOfSmal self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldUseRootNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5) - 8. @@ -235,7 +237,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test09AllocateSecondSmallerThanL self assert: (memory bytesInObject: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop))) equals: (self sizeOfChildInBreadthFirstOrder: 3) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmallerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 5). @@ -243,7 +245,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateExactLargerOfSmall self assert: (self largerNodeOf: (self smallerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanLiliputianDiffFromSmallerLeafShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -254,7 +256,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test10AllocateSecondSmallerThanL self denyFreeListEmpty: (self freeListForSize: 1120 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmallerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -263,7 +265,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateExactLargerOfSmall self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldUseLargestLeafNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 3) - 8. @@ -272,7 +274,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test11AllocateSmallerThanLiliput self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLargerLeafTreeNodeShouldRemoveNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6). @@ -280,7 +282,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateExactSmallerOfLarg self assert: (self smallerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliputianDiffFromLargerWithChildrenShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -292,7 +294,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test12AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1216 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -302,7 +304,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateExactSmallerOfLarg self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldUseIntermediateLargerNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 6) - 8. @@ -311,7 +313,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test13AllocateSmallerThanLiliput self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: (self sizeOfChildInBreadthFirstOrder: 6) ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLargerLeafTreeNodeShouldRemoveChildNode [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7). @@ -319,7 +321,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateExactLargerOfLarge self assert: (self largerNodeOf: (self largerNodeOf: self freeTreeRootOop)) equals: 0 ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliputianDiffFromSmallerLeafInLargerSideShouldInsertLeftOverInFreeList [ | allocatedSize | @@ -331,7 +333,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test14AllocateSmallerThanLiliput self denyFreeListEmpty: (self freeListForSize: 1184 - allocatedSize). ] -{ #category : #'tests-09-exact-fit' } +{ #category : 'tests-09-exact-fit' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLargerLeafTreeNodeShouldReuseNodeAddress [ | desiredAddress allocatedAddress | @@ -341,7 +343,7 @@ VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateExactLargerOfLarge self assert: allocatedAddress equals: desiredAddress ] -{ #category : #'tests-11-bestfit-smaller-than-liliputian-leftovers' } +{ #category : 'tests-11-bestfit-smaller-than-liliputian-leftovers' } VMSpurTreeAllocationStrategyForSmallTreeTest >> test15AllocateSmallerThanLiliputianDiffFromLargestLeaShouldFindNoMemory [ self assert: (memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 7) - 8) equals: nil diff --git a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st index de185856c6..09933d96de 100644 --- a/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st +++ b/smalltalksrc/VMMakerTests/VMSpurTreeAllocationWithBigNodesTest.class.st @@ -1,20 +1,22 @@ Class { - #name : #VMSpurTreeAllocationWithBigNodesTest, - #superclass : #VMSpurInitializedOldSpaceTest, + #name : 'VMSpurTreeAllocationWithBigNodesTest', + #superclass : 'VMSpurInitializedOldSpaceTest', #instVars : [ 'sizesInBreadthFirstOrder', 'chunkAddresses' ], - #category : #'VMMakerTests-MemoryTests' + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationWithBigNodesTest >> addressOfChunkOf: aSize [ ^ chunkAddresses at: aSize ] -{ #category : #running } +{ #category : 'running' } VMSpurTreeAllocationWithBigNodesTest >> setUp [ " Allocate a tree that has a large child large enough so a remainder could still be larger than the root @@ -45,13 +47,13 @@ VMSpurTreeAllocationWithBigNodesTest >> setUp [ self assert: (memory bytesInObject: (self largerNodeOf: parent)) equals: (sizesInBreadthFirstOrder at: childNumber * 2 + 1). ] -{ #category : #accessing } +{ #category : 'accessing' } VMSpurTreeAllocationWithBigNodesTest >> sizeOfChildInBreadthFirstOrder: anInteger [ ^ sizesInBreadthFirstOrder at: anInteger ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: 16. @@ -60,7 +62,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test01LargeLeftoverSmallerThanRootShould self assert: (memory bytesInObject: (self smallerNodeOf: self freeTreeRootOop)) equals: 1008 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShouldBeInsertedInLarger [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) + 16. @@ -69,7 +71,7 @@ VMSpurTreeAllocationWithBigNodesTest >> test02LargeLeftoverSmallerThanLargerShou self assert: (memory bytesInObject: (self largerNodeOf: self freeTreeRootOop)) equals: 4080 ] -{ #category : #tests } +{ #category : 'tests' } VMSpurTreeAllocationWithBigNodesTest >> test03LargeLeftoverSmallerThanRootShouldBeInsertedInSmaller [ memory allocateOldSpaceChunkOfBytes: (self sizeOfChildInBreadthFirstOrder: 1) * 2 + 16. diff --git a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st index 03868c02d3..bd476b58e7 100644 --- a/smalltalksrc/VMMakerTests/VMStackBuilder.class.st +++ b/smalltalksrc/VMMakerTests/VMStackBuilder.class.st @@ -27,23 +27,25 @@ Types are not the exact types used. " Class { - #name : #VMStackBuilder, - #superclass : #VMAbstractBuilder, + #name : 'VMStackBuilder', + #superclass : 'VMAbstractBuilder', #instVars : [ 'page', 'frames', 'args', 'methodBuilder' ], - #category : #'VMMakerTests-Builders' + #category : 'VMMakerTests-Builders', + #package : 'VMMakerTests', + #tag : 'Builders' } -{ #category : #frames } +{ #category : 'frames' } VMStackBuilder >> addFrame: aFrame [ frames add: aFrame ] -{ #category : #frames } +{ #category : 'frames' } VMStackBuilder >> addNewFrame [ | frame | "'add' a new frame in the sense of an OrderedCollection, which will be iterated with #do: @@ -53,17 +55,17 @@ VMStackBuilder >> addNewFrame [ ^ frame "the frame is then configured by the caller" ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> args [ ^ args ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> args: anObject [ args := anObject ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> buildStack [ self createStackPage. self preparePage. @@ -72,7 +74,7 @@ VMStackBuilder >> buildStack [ ^ frames last ] -{ #category : #stack } +{ #category : 'stack' } VMStackBuilder >> createStackPage [ | sp | frames ifEmpty:[ self error ]. @@ -83,17 +85,17 @@ VMStackBuilder >> createStackPage [ interpreter stackPointer: sp. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> frames [ ^ frames ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> frames: anObject [ frames := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } VMStackBuilder >> initialize [ super initialize. frames := OrderedCollection new. "will be treated in reverse" @@ -103,35 +105,35 @@ VMStackBuilder >> initialize [ page := nil. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> lastFrame [ ^ frames last ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> methodBuilder [ ^ methodBuilder ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> methodBuilder: anObject [ methodBuilder := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> page [ ^ page ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> page: anObject [ page := anObject ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> preparePage [ "Page setup before the base frame" interpreter push: memory nilObject. "receiver" @@ -142,7 +144,7 @@ VMStackBuilder >> preparePage [ ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushAllButFirstFrames [ 2 to: frames size do: [ :anIndex | | aFrame | aFrame := frames at: anIndex. @@ -156,19 +158,19 @@ VMStackBuilder >> pushAllButFirstFrames [ ] ] -{ #category : #initialization } +{ #category : 'initialization' } VMStackBuilder >> pushArgs [ args do: [ :anArg | interpreter push: anArg ] ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushBaseFrame [ frames first previousFrameArgsSize: args size. self pushFrame: frames first. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushFrame: aFrame [ interpreter framePointer: interpreter stackPointer. @@ -178,18 +180,18 @@ VMStackBuilder >> pushFrame: aFrame [ page headSP: interpreter stackPointer. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> pushFrames [ self pushBaseFrame. self pushAllButFirstFrames. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } VMStackBuilder >> reset [ self initialize. ] -{ #category : #build } +{ #category : 'build' } VMStackBuilder >> setInterpreterVariables [ | lastFrame | interpreter setStackPageAndLimit: page. @@ -204,7 +206,7 @@ VMStackBuilder >> setInterpreterVariables [ ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackBuilder >> topFrame [ ^ frames last ] diff --git a/smalltalksrc/VMMakerTests/VMStackFrame.class.st b/smalltalksrc/VMMakerTests/VMStackFrame.class.st index ec06607f85..81b9be1e5e 100644 --- a/smalltalksrc/VMMakerTests/VMStackFrame.class.st +++ b/smalltalksrc/VMMakerTests/VMStackFrame.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMStackFrame, - #superclass : #Object, + #name : 'VMStackFrame', + #superclass : 'Object', #instVars : [ 'framePointer', 'interpreter' @@ -8,10 +8,12 @@ Class { #pools : [ 'VMStackFrameOffsets' ], - #category : #'VMMakerTests-Visualisation' + #category : 'VMMakerTests-Visualisation', + #package : 'VMMakerTests', + #tag : 'Visualisation' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpreterSimulatorLSB [ ^self new framePointer: anInteger; @@ -19,19 +21,19 @@ VMStackFrame class >> newFramePointer: anInteger withInterpreter: aStackInterpre yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } VMStackFrame class >> virtualMachine: aVirtualMachine fp: anInteger [ ^ self newFramePointer: anInteger withInterpreter: aVirtualMachine ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> bytecodeMethod [ ^ VMBytecodeMethod newOnInterpreter: interpreter methodOop: self method ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> caller [ | callerContext | @@ -65,41 +67,41 @@ VMStackFrame >> caller [ ^ VMContext newOnContext: callerContext withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> callerContext [ ^ interpreter frameCallerContext: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> callerFP [ ^ interpreter frameCallerFP: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> context [ ^VMContext newOnContext: (interpreter frameContext: framePointer) withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> description [ | selector | selector := interpreter findSelectorOfMethod: self methodOop. ^ interpreter stringOf: selector ] -{ #category : #accesing } +{ #category : 'accesing' } VMStackFrame >> framePointer: anInteger [ framePointer := anInteger ] -{ #category : #testing } +{ #category : 'testing' } VMStackFrame >> hasContext [ ^interpreter frameHasContext: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> instructionPointer [ ^ interpreter framePointer = framePointer @@ -107,50 +109,50 @@ VMStackFrame >> instructionPointer [ ifFalse: [ interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : #acccessing } +{ #category : 'acccessing' } VMStackFrame >> interpreter: aStackInterpreterSimulatorLSB [ interpreter := aStackInterpreterSimulatorLSB ] -{ #category : #testing } +{ #category : 'testing' } VMStackFrame >> isMachineCodeFrame [ ^ interpreter isMachineCodeFrame: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> machineCodeMethod [ | methodSurrogate | methodSurrogate := interpreter cogMethodZone methodFor: self method. ^ VMMachineCodeMethod newOnInterpreter: interpreter cogMethodSurrogate: methodSurrogate ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> method [ ^ interpreter iframeMethod: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> methodOop [ ^ interpreter frameMethodObject: framePointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> receiver [ ^ interpreter framePointer = framePointer ifTrue: [ interpreter receiver ] ifFalse: [ self halt. interpreter frameCallerSavedIP: ( interpreter findFrameAbove: framePointer inPage: self stackPage) ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> sender [ ^ VMStackFrame newFramePointer:(interpreter frameCallerFP: framePointer) withInterpreter: interpreter ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> sourceCode [ ^ self isMachineCodeFrame @@ -158,7 +160,7 @@ VMStackFrame >> sourceCode [ ifFalse: [ self bytecodeMethod disassemble ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> stack [ | stack currentFrame | stack := OrderedCollection new. @@ -169,7 +171,7 @@ VMStackFrame >> stack [ ^ stack ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackFrame >> stackPage [ ^interpreter stackPages stackPageFor: framePointer. ] diff --git a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st index 4a73d7c65e..2e9960b95e 100644 --- a/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackInterpreterTest.class.st @@ -1,32 +1,34 @@ Class { - #name : #VMStackInterpreterTest, - #superclass : #TestCase, + #name : 'VMStackInterpreterTest', + #superclass : 'TestCase', #instVars : [ 'stackInterpreterClass' ], - #category : #'VMMakerTests-StackInterpreter' + #category : 'VMMakerTests-StackInterpreter', + #package : 'VMMakerTests', + #tag : 'StackInterpreter' } -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> setUp [ super setUp. stackInterpreterClass := StackInterpreter. ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackInterpreterTest >> stackInterpreterClass [ ^ stackInterpreterClass ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackInterpreterTest >> stackInterpreterClass: anObject [ stackInterpreterClass := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> testIsObjectAccessor [ self @@ -35,7 +37,7 @@ VMStackInterpreterTest >> testIsObjectAccessor [ assert: (self stackInterpreterClass isObjectAccessor: #fetchClassOf:) ] -{ #category : #running } +{ #category : 'running' } VMStackInterpreterTest >> testIsStackAccessor [ self diff --git a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st index e36709438e..c643d5e0b8 100644 --- a/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackMappingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMStackMappingTest, - #superclass : #VMSpurInitializedOldSpaceTest, - #category : #'VMMakerTests-MemoryTests' + #name : 'VMStackMappingTest', + #superclass : 'VMSpurInitializedOldSpaceTest', + #category : 'VMMakerTests-MemoryTests', + #package : 'VMMakerTests', + #tag : 'MemoryTests' } -{ #category : #helpers } +{ #category : 'helpers' } VMStackMappingTest >> buildStackFromFrames [ 3 timesRepeat: [ @@ -17,7 +19,7 @@ VMStackMappingTest >> buildStackFromFrames [ stackBuilder buildStack ] -{ #category : #helpers } +{ #category : 'helpers' } VMStackMappingTest >> newContext [ | method | @@ -30,13 +32,13 @@ VMStackMappingTest >> newContext [ ip: 10 ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testCreatingNewContextByHandShouldbeSingle [ self assert: (interpreter isSingleContext: self newContext) ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ | context fp | context := self newContext. @@ -46,7 +48,7 @@ VMStackMappingTest >> testDivorceAMarriedContextShuoldMakeItSingle [ self assert: (interpreter isSingleContext: context) ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testDivorceFramesInPage [ | page | self buildStackFromFrames. @@ -67,7 +69,7 @@ VMStackMappingTest >> testDivorceFramesInPage [ ] -{ #category : #tests } +{ #category : 'tests' } VMStackMappingTest >> testMarryNewContextIsMarried [ | context | context := self newContext. @@ -75,7 +77,7 @@ VMStackMappingTest >> testMarryNewContextIsMarried [ self assert: (interpreter isStillMarriedContext: context) ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ | aContext framePointerToMarry stackPointerToMarry oldPage | self buildStackFromFrames. @@ -89,7 +91,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldFreeOldPage [ self assert: oldPage isFree ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext | self buildStackFromFrames. @@ -103,7 +105,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSetDivorcedContextAsSen self assert: expectedDivorcedContext equals: aContext. ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry oldPage newPage | self buildStackFromFrames. @@ -117,7 +119,7 @@ VMStackMappingTest >> testMarryThenDivorceBaseFrameShouldSplitPage [ self deny: oldPage equals: newPage ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -129,7 +131,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsSenderContextInNewPage [ | aContext framePointerToMarry stackPointerToMarry expectedDivorcedContext oldBaseFramePointer callerContext | self buildStackFromFrames. @@ -149,7 +151,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSetDivorcedContextAsS ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ | aContext framePointerToMarry stackPointerToMarry initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -163,7 +165,7 @@ VMStackMappingTest >> testMarryThenDivorceMiddleFrameShouldSplitPage [ self assert: initialiNumberOfusedPages + 1 equals: newNumberOfUsedPages ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrame [ | aContext framePointerToMarry stackPointerToMarry | self buildStackFromFrames. @@ -175,7 +177,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrame [ self assert: (interpreter isSingleContext: aContext). ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ | aContext initialiNumberOfusedPages newNumberOfUsedPages | self buildStackFromFrames. @@ -187,7 +189,7 @@ VMStackMappingTest >> testMarryThenDivorceTopFrameShouldNotSplitPage [ self assert: initialiNumberOfusedPages equals: newNumberOfUsedPages ] -{ #category : #'test-context-tomove' } +{ #category : 'test-context-tomove' } VMStackMappingTest >> testMarryTopFrame [ | aContext | self buildStackFromFrames. diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st index 076488f560..fd296015d6 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingCogitTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMStackToRegisterMappingCogitTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMStackToRegisterMappingCogitTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'methodReceiver', 'receiverOperationBlock', @@ -15,21 +15,23 @@ Class { 'expectedResult', 'expectedReflexiveResult' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> argumentOperation: aFullBlockClosure [ argumentOperation := aFullBlockClosure ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> arguments: aCollection [ arguments := aCollection ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> buildStackFrame [ "Let's prepare the trampoline in case of non-optimized path" self createSpecialSelectorArray. @@ -49,7 +51,7 @@ VMStackToRegisterMappingCogitTest >> buildStackFrame [ ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> compileMethod [ codeAddress := self compile: [ @@ -61,54 +63,54 @@ VMStackToRegisterMappingCogitTest >> compileMethod [ cogit genReturnTopFromMethod ] ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult [ ^ expectedReflexiveResult ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedReflexiveResult: anObject [ expectedReflexiveResult := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedResult [ ^ expectedResult ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> expectedResult: anObject [ expectedResult := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingCogitTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> methodReceiver: anOop [ methodReceiver := anOop ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> receiverOperation: aFullBlockClosure [ receiverOperationBlock := aFullBlockClosure ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> sendBytecode [ ^ sendBytecode ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> sendBytecode: anObject [ sendBytecode := anObject ] -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingCogitTest >> setUp [ super setUp. @@ -116,7 +118,7 @@ VMStackToRegisterMappingCogitTest >> setUp [ arguments := #(). ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperation and: argumentOfOperation [ self buildStackFrame. @@ -126,7 +128,7 @@ VMStackToRegisterMappingCogitTest >> shouldCallTrampolineWith: receiverOfOperati self assertSpecialSendTo: receiverOfOperation value withArg: argumentOfOperation value ] -{ #category : #builder } +{ #category : 'builder' } VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self buildStackFrame. @@ -136,22 +138,22 @@ VMStackToRegisterMappingCogitTest >> shouldPerformOperationReturning: aValue [ self assert: machineSimulator receiverRegisterValue equals: (memory integerObjectOf: aValue). ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value1 [ ^ value1 ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value1: anObject [ value1 := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value2 [ ^ value2 ] -{ #category : #accessing } +{ #category : 'accessing' } VMStackToRegisterMappingCogitTest >> value2: anObject [ value2 := anObject ] diff --git a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st index 1033cc50ad..f67ef4a755 100644 --- a/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStackToRegisterMappingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMStackToRegisterMappingTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMStackToRegisterMappingTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMStackToRegisterMappingTest >> setUp [ super setUp. @@ -29,7 +31,7 @@ VMStackToRegisterMappingTest >> setUp [ cogit needsFrame: true ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testFlushBelowTop [ | stop stackPointerBefore framePointer | @@ -57,7 +59,7 @@ VMStackToRegisterMappingTest >> testFlushBelowTop [ self assert: self popAddress equals: (memory integerObjectOf: 17) ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopConstant [ cogit ssPushConstant: 1. @@ -67,7 +69,7 @@ VMStackToRegisterMappingTest >> testPopConstant [ self assert: cogit ssTop equals: cogit simSelf. ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -94,7 +96,7 @@ VMStackToRegisterMappingTest >> testPopNonSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopRegister [ cogit ssPushRegister: TempReg. @@ -104,7 +106,7 @@ VMStackToRegisterMappingTest >> testPopRegister [ self assert: cogit ssTop equals: cogit simSelf ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ | stop stackPointerBefore framePointer | @@ -130,7 +132,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantShouldPopFromStack [ self assert: self machineSimulator smalltalkStackPointerRegisterValue equals: stackPointerBefore ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPopFromStack [ | stop stackPointerBefore framePointer | @@ -157,7 +159,7 @@ VMStackToRegisterMappingTest >> testPopSpilledConstantWithoutPoppingShouldNotPop self assert: self popAddress equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ | stop stackPointerBefore framePointer | @@ -184,7 +186,7 @@ VMStackToRegisterMappingTest >> testPopSpilledTopToRegister [ self assert: self machineSimulator receiverRegisterValue equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPushConstant [ cogit ssPushConstant: 1. @@ -195,7 +197,7 @@ VMStackToRegisterMappingTest >> testPushConstant [ self deny: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testPushRegister [ cogit ssPushRegister: TempReg. @@ -206,7 +208,7 @@ VMStackToRegisterMappingTest >> testPushRegister [ self deny: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testSpillConstant [ cogit ssPushConstant: 1. @@ -223,7 +225,7 @@ VMStackToRegisterMappingTest >> testSpillConstant [ self assert: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testSpillRegister [ cogit ssPushRegister: TempReg. @@ -242,7 +244,7 @@ VMStackToRegisterMappingTest >> testSpillRegister [ self assert: cogit ssTop spilled ] -{ #category : #tests } +{ #category : 'tests' } VMStackToRegisterMappingTest >> testTopOfEmptyIsSimSelf [ self assert: cogit ssSize equals: 1. diff --git a/smalltalksrc/VMMakerTests/VMStorePopTest.class.st b/smalltalksrc/VMMakerTests/VMStorePopTest.class.st index d5e7c8c90f..663d96f508 100644 --- a/smalltalksrc/VMMakerTests/VMStorePopTest.class.st +++ b/smalltalksrc/VMMakerTests/VMStorePopTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #VMStorePopTest, - #superclass : #VMStackToRegisterMappingCogitTest, - #category : #'VMMakerTests-JitTests' + #name : 'VMStorePopTest', + #superclass : 'VMStackToRegisterMappingCogitTest', + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #running } +{ #category : 'running' } VMStorePopTest >> jitOptions [ ^ super jitOptions @@ -12,7 +14,7 @@ VMStorePopTest >> jitOptions [ yourself ] -{ #category : #tests } +{ #category : 'tests' } VMStorePopTest >> testExtendedStoreAndPopIV1ImmutableObjectCallingConvention [ | instanceVariableToWrite stopAddress methodWithStoreCheck storeTrampoline | @@ -57,7 +59,7 @@ VMStorePopTest >> testExtendedStoreAndPopIV1ImmutableObjectCallingConvention [ self assert: machineSimulator classRegisterValue equals: memory falseObject ] -{ #category : #tests } +{ #category : 'tests' } VMStorePopTest >> testStoreAndPopIV1ImmutableObjectCallingConvention [ | instanceVariableToWrite stopAddress methodWithStoreCheck | diff --git a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st index 267fd1873e..e1964ec1c5 100644 --- a/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st +++ b/smalltalksrc/VMMakerTests/VMTestMockInterpreter.class.st @@ -1,14 +1,15 @@ Class { - #name : #VMTestMockInterpreter, - #superclass : #StackInterpreterSimulatorLSB, + #name : 'VMTestMockInterpreter', + #superclass : 'StackInterpreterSimulatorLSB', #instVars : [ 'interpreteBlock', 'allocatedElements' ], - #category : #VMMakerTests + #category : 'VMMakerTests', + #package : 'VMMakerTests' } -{ #category : #'memory testing' } +{ #category : 'memory testing' } VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ | allocated | @@ -19,43 +20,43 @@ VMTestMockInterpreter >> allocateParameters: anInteger using: allocationBlock [ ^ allocated ] -{ #category : #'memory testing' } +{ #category : 'memory testing' } VMTestMockInterpreter >> allocatedElements [ ^ allocatedElements ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> basicInitialize [ super basicInitialize. allocatedElements := Set new ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> enterSmalltalkExecutiveImplementation [ interpreteBlock value ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> free: aPointer [ allocatedElements remove: aPointer. ^ super free: aPointer ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> interpreteBlock [ ^ interpreteBlock ] -{ #category : #accessing } +{ #category : 'accessing' } VMTestMockInterpreter >> interpreteBlock: anObject [ interpreteBlock := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } VMTestMockInterpreter >> malloc: aSize [ ^ allocatedElements add: (super malloc: aSize) diff --git a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st index dd1e43a5cc..22b52f0abb 100644 --- a/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st +++ b/smalltalksrc/VMMakerTests/VMTrampolineTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #VMTrampolineTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMTrampolineTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #instVars : [ 'registerMask', 'isAligned', @@ -10,10 +10,12 @@ Class { 'CogAbstractRegisters', 'VMClassIndices' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMTrampolineTest class >> testParameters [ ^ super testParameters * { @@ -22,25 +24,25 @@ VMTrampolineTest class >> testParameters [ } ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> isAligned [ ^ isAligned ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> isAligned: aBoolean [ isAligned := aBoolean ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> jitCompilerClass [ ^ StackToRegisterMappingCogit ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> setUp [ super setUp. @@ -60,7 +62,7 @@ VMTrampolineTest >> setUp [ ] ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ | inc baseMethod baseMethodIP ctx page | @@ -123,7 +125,7 @@ VMTrampolineTest >> testCallEnilopmartSucceedsExecution [ equals: (memory integerObjectOf: 3) ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testDetectFrameNotPointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -138,7 +140,7 @@ VMTrampolineTest >> testDetectFrameNotPointerInUse [ self deny: cogit isCFramePointerInUse ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testDetectFramePointerInUse [ "The code in generateStackPointerCapture detects if the C Frame pointer is in use. @@ -153,7 +155,7 @@ VMTrampolineTest >> testDetectFramePointerInUse [ self assert: cogit isCFramePointerInUse ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -171,7 +173,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadFramePointer [ self assert: self framePointerRegisterValue equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self compile: [ cogit backend genLoadStackPointers ]. @@ -189,7 +191,7 @@ VMTrampolineTest >> testLoadStackPointersShouldLoadStackPointer [ self assert: machineSimulator smalltalkStackPointerRegisterValue equals: 17 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ | initialStackPointer | @@ -207,7 +209,7 @@ VMTrampolineTest >> testRestoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue equals: initialStackPointer ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDereferenceSelectorRoutine [ | dereferenceRoutine previousLinkRegister trampoline | @@ -238,7 +240,7 @@ VMTrampolineTest >> testSendTrampolineShouldNotOverrideLinkRegisterWhenCallDeref self assert: self interpreter stackTop equals: previousLinkRegister ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -252,7 +254,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCFramePointer [ self assert: machineSimulator framePointerRegisterValue equals: 888 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -266,7 +268,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldLoadCStackPointer [ self assert: machineSimulator stackPointerRegisterValue equals: 777 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ cogit backend hasLinkRegister ifFalse: [ ^ self skip ]. @@ -282,7 +284,7 @@ VMTrampolineTest >> testSmalltalkToCStackShouldPushLinkRegister [ self assert: self interpreter stackTop equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -299,7 +301,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterFramePoint self assert: self interpreter framePointer equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPointer [ self compile: [ cogit genSmalltalkToCStackSwitch: false "do not push link register" ]. @@ -316,7 +318,7 @@ VMTrampolineTest >> testSmalltalkToCStackSwitchShouldUpdateInterpreterStackPoint self assert: self interpreter stackPointer equals: 42 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ "Some architectures such as ARMv8 require that the SP is always aligned to some value even in between calls. @@ -329,7 +331,7 @@ VMTrampolineTest >> testStoreRegistersProducesAlignedStackPointer [ self assert: self stackPointerRegisterValue \\ cogit stackPointerAlignment equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } VMTrampolineTest >> testStoreRegistersPushesValuesToStack [ | initialStackPointer actualPushedBytes | diff --git a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st index 9827cf8874..1951d51644 100644 --- a/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st +++ b/smalltalksrc/VMMakerTests/VMX64InstructionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #VMX64InstructionTest, - #superclass : #VMSimpleStackBasedCogitAbstractTest, + #name : 'VMX64InstructionTest', + #superclass : 'VMSimpleStackBasedCogitAbstractTest', #pools : [ 'CogRTLOpcodes' ], - #category : #'VMMakerTests-JitTests' + #category : 'VMMakerTests-JitTests', + #package : 'VMMakerTests', + #tag : 'JitTests' } -{ #category : #'building suites' } +{ #category : 'building suites' } VMX64InstructionTest class >> wordSizeParameters [ ^ ParametrizedTestMatrix new @@ -15,13 +17,13 @@ VMX64InstructionTest class >> wordSizeParameters [ yourself ] -{ #category : #configuration } +{ #category : 'configuration' } VMX64InstructionTest >> generateCaptureCStackPointers [ ^ false ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ | mem | @@ -45,7 +47,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegister [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ | mem | @@ -70,7 +72,7 @@ VMX64InstructionTest >> testDupAndStoreFromVectorRegisterUnAligned [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testDupSRVr [ @@ -86,7 +88,7 @@ VMX64InstructionTest >> testDupSRVr [ ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFaddSRvRvRv [ | result | @@ -105,7 +107,7 @@ VMX64InstructionTest >> testFaddSRvRvRv [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ | result | @@ -124,7 +126,7 @@ VMX64InstructionTest >> testFaddSRvRvRvWithThreeDifferentRegisters [ self assert: (result doubleAt: 9) equals: 3.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFsubSRvRvRv [ | result | @@ -143,7 +145,7 @@ VMX64InstructionTest >> testFsubSRvRvRv [ self assert: (result doubleAt: 9) equals: -1.0. ] -{ #category : #tests } +{ #category : 'tests' } VMX64InstructionTest >> testFsubSRvRvRvWithThreeDifferentRegisters [ | result | diff --git a/smalltalksrc/VMMakerTests/package.st b/smalltalksrc/VMMakerTests/package.st index 328d153d5f..285bf148e9 100644 --- a/smalltalksrc/VMMakerTests/package.st +++ b/smalltalksrc/VMMakerTests/package.st @@ -1 +1 @@ -Package { #name : #VMMakerTests } +Package { #name : 'VMMakerTests' }