Skip to content
Permalink
Browse files

simplify even more: setCopyingTempToAllScopesUpToDefTemp:... sets the…

… current copy, too!
  • Loading branch information
MarcusDenker committed Oct 1, 2019
1 parent 4c5dee5 commit 1989c8544eebd2f1573abdfdbc240901e298d41e
Showing with 5 additions and 10 deletions.
  1. +5 −10 src/OpalCompiler-Core/OCCopyingTempVariable.class.st
@@ -51,15 +51,10 @@ OCCopyingTempVariable >> tempVectorForTempStoringIt [

{ #category : #debugging }
OCCopyingTempVariable >> writeFromContext: aContext scope: contextScope value: aValue [

| definitionContext |
definitionContext := contextScope lookupDefiningContextForVariable: self startingFrom: aContext.
"we need to change all the copies, too"

"we need to change this var all the copies, too"
contextScope setCopyingTempToAllScopesUpToDefTemp: originalVar to: aValue from: aContext.
"and the original temp"
originalVar writeFromContext: aContext scope: contextScope value: aValue.

^definitionContext
tempAt: self indexFromIR
put: aValue
"the original temp"
^originalVar writeFromContext: aContext scope: contextScope value: aValue.

]

0 comments on commit 1989c85

Please sign in to comment.
You can’t perform that action at this time.