Skip to content

Commit

Permalink
[cleanup] random protocol cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hogoww committed Oct 25, 2024
1 parent ecf2995 commit 8e29896
Show file tree
Hide file tree
Showing 133 changed files with 3,433 additions and 3,658 deletions.
6 changes: 3 additions & 3 deletions smalltalksrc/VMMakerTests/Array.extension.st
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions smalltalksrc/VMMakerTests/ByteSymbol.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : 'ByteSymbol' }
Extension { #name : #ByteSymbol }

{ #category : '*VMMakerTests' }
{ #category : #'*VMMakerTests' }
ByteSymbol >> forMemory: aMemory inMethod: anObject [

| vmString instSpec numSlots |
Expand All @@ -27,7 +27,7 @@ ByteSymbol >> forMemory: aMemory inMethod: anObject [
^ vmString
]

{ #category : '*VMMakerTests' }
{ #category : #'*VMMakerTests' }
ByteSymbol >> forMethodBuilder: aBuilder [

^ self forMemory: aBuilder memory
Expand Down
6 changes: 3 additions & 3 deletions smalltalksrc/VMMakerTests/Character.extension.st
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions smalltalksrc/VMMakerTests/Cogit.extension.st
Original file line number Diff line number Diff line change
@@ -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
]
4 changes: 2 additions & 2 deletions smalltalksrc/VMMakerTests/CompiledBlock.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : 'CompiledBlock' }
Extension { #name : #CompiledBlock }

{ #category : '*VMMakerTests' }
{ #category : #'*VMMakerTests' }
CompiledBlock >> forMemory: memory inMethod: aMethodBuilder [

| methodBuilder |
Expand Down
56 changes: 27 additions & 29 deletions smalltalksrc/VMMakerTests/DummyProcessor.class.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Class {
#name : 'DummyProcessor',
#superclass : 'Object',
#name : #DummyProcessor,
#superclass : #Object,
#instVars : [
'stackPointer',
'framePointer',
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions smalltalksrc/VMMakerTests/ExitInterpreter.class.st
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions smalltalksrc/VMMakerTests/LiteralVariable.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : 'LiteralVariable' }
Extension { #name : #LiteralVariable }

{ #category : '*VMMakerTests' }
{ #category : #'*VMMakerTests' }
LiteralVariable >> forMemory: aMemory inMethod: anObject [

| aVariable |
Expand Down
14 changes: 6 additions & 8 deletions smalltalksrc/VMMakerTests/ManifestVMMakerTests.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 [

<ignoreForCoverage>
^ #(#(#(#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 [

<ignoreForCoverage>
^ #(#(#(#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') )
]
Loading

0 comments on commit 8e29896

Please sign in to comment.