Skip to content

Commit

Permalink
tempNamed: and #tempNamed:put: where implemented in terms of #namedTe…
Browse files Browse the repository at this point in the history
…mpAt:, which means that they call the debugger map twice.

We can instead use #tempNamed:in: directly
  • Loading branch information
MarcusDenker committed Sep 23, 2019
1 parent d6ae900 commit c5b627a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Debugging-Core/Context.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,12 @@ Context >> tempNamed: aName [
And when we check self asContext pc we get 17, which is *before* the nil is pushed. Therefore we should pay attention when querying a temporary if the temporary allocation was executed."

| index |
index := self tempNames indexOf: aName.
^ self namedTempAt: index
^self debuggerMap tempNamed: aName in: self
]

{ #category : #'*Debugging-Core' }
Context >> tempNamed: aName put: anObject [
^self namedTempAt: (self tempNames indexOf: aName) put: anObject
^self debuggerMap tempNamed: aName in: self put: anObject
]

{ #category : #'*Debugging-Core' }
Expand Down

0 comments on commit c5b627a

Please sign in to comment.