Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusDenker committed Oct 7, 2019
1 parent 99b2396 commit 7a92567
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/OpalCompiler-Core/OCVectorTempVariable.class.st
Expand Up @@ -54,18 +54,16 @@ OCVectorTempVariable >> readFromContext: aContext scope: contextScope [
{ #category : #debugging }
OCVectorTempVariable >> readVectorFromContext: aContext scope: contextScope [
| tempVectorVar theVector |
"We need to first read the temp vector. We use the closest copied var up the stack possible
The whole point of using the vector is for everything to be accessible locally, the definition
context could be already garbage collected)"
"We need to first read the temp vector. We use the closest copied var up the stack possible as
as the definition context could be already garbage collected"
tempVectorVar := contextScope lookupVar: vectorName.
"We might be called from the debugger for a context that actually does not access the temp vector,
so we need to read possibly from a context above aContext"
theVector := tempVectorVar readFromContext: aContext scope: contextScope.
"Cache the index in the temp vecor (for speed and easy debugging)"
index := index ifNil: [ tempVectorVar indexInTempVectorFromIR: name ].

"We can call this method on a context in any state, e.g. even when the copied var is not yet initialized.
In this case, we lookup in the outer context with the corresponding outer scope"
In this case, we lookup in the outer context with the corresponding outer scope"
^ theVector ifNil: [ self readVectorFromContext: aContext outerContext scope: contextScope outerScope ]
]

Expand Down

0 comments on commit 7a92567

Please sign in to comment.