Skip to content

Commit

Permalink
minor refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmontt committed Dec 12, 2024
1 parent fb7e372 commit 3d73710
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/IllimaniProfiler-Experiment/IllCodeRewriter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Class {
{ #category : 'private' }
IllCodeRewriter >> cloneMethodWithTenureSelector: anIllSender [

| compiledMethod newSelector |
compiledMethod := anIllSender method copy.
newSelector := self defaultTenureSelector: compiledMethod selector.
| clonedMethod newSelector |
clonedMethod := anIllSender method copy.
newSelector := self defaultTenureSelector: clonedMethod selector.

compiledMethod selector: newSelector.
clonedMethod selector: newSelector.

^ compiledMethod
^ clonedMethod
]

{ #category : 'private' }
Expand Down Expand Up @@ -50,17 +50,17 @@ IllCodeRewriter >> storeBackupSenders: senders caller: initialCaller [
{ #category : 'api' }
IllCodeRewriter >> tenureCallingSenders: senders initialCaller: initialCaller [

| compiledMethod |
| clonedMethod |
self storeBackupSenders: senders caller: initialCaller.

initialCaller method methodClass methodDict
at: initialCaller selector
put: (self tenureMessageSendFor: initialCaller method offset: initialCaller offset).

senders do: [ :anIllSender |
compiledMethod := self cloneMethodWithTenureSelector: anIllSender.
compiledMethod := self tenureMessageSendFor: compiledMethod offset: anIllSender offset.
self installMethod: compiledMethod ]
clonedMethod := self cloneMethodWithTenureSelector: anIllSender.
clonedMethod := self tenureMessageSendFor: clonedMethod offset: anIllSender offset.
self installMethod: clonedMethod ]
]

{ #category : 'private' }
Expand All @@ -75,8 +75,8 @@ IllCodeRewriter >> tenureMessageSendFor: compiledMethod offset: offset [
irSendNode := (irSequences select: #isSend) detect: [ :e | e selector = messageSendSelector ].
irSendNode selector: newMessageSendSelector.

newMessageSendSelector := ir generate selector: compiledMethod selector; yourself.
^ newMessageSendSelector
newCompiledMethod := ir generate selector: compiledMethod selector; yourself.
^ newCompiledMethod
]

{ #category : 'private' }
Expand Down

0 comments on commit 3d73710

Please sign in to comment.