Skip to content
Failed

Changes

Summary

  1. The OCTempVariables used to cache the index after the first access. The (details)
Commit 8b662a9acac1dde72e8a69522e77085c7b4964a8 by marcus.denker
The OCTempVariables used to cache the index after the first access. The
index itself was taken from the IR.
We can do it differently: every time a temp is created on the IR level,
we can backfill the offset in the OCTempVariables.
This PR:
- IRBuilder now fills the index of semantic variables on #addTemp:
- This allows to not search for the offsets in the IR when accesing
temps reflectively (#readFromLocalContext: and similar)
Fixes:
- some improvements to #lookupVar: (so we can call it with non-string
var names)
- map the node correctly when generating inlined blocks and full blocks
Cleanups:
- remove #tempVectorNamed: #indexFromIRForVarNamed: #indexFromIR and
#indexInTempVectorFromIR:
Accessing the index of OCTempVariables continues to do a nil check. This
allows us to call it even if the IR has not yet been generated.
The file was modified src/OpalCompiler-Core/OCClassScope.class.st (diff)
The file was modified src/OpalCompiler-Core/OCCopyingTempVariable.class.st (diff)
The file was modified src/OpalCompiler-Core/IRBuilder.class.st (diff)
The file was modified src/OpalCompiler-Core/OCASTTranslator.class.st (diff)
The file was modified src/OpalCompiler-Core/IRMethod.class.st (diff)
The file was modified src/OpalCompiler-Core/OCAbstractMethodScope.class.st (diff)
The file was modified src/OpalCompiler-Core/OCTempVariable.class.st (diff)
The file was modified src/OpalCompiler-Core/OCEnvironmentScope.class.st (diff)
The file was modified src/OpalCompiler-Core/IRPushClosureCopy.class.st (diff)
The file was modified src/OpalCompiler-Core/IRSequence.class.st (diff)
The file was modified src/OpalCompiler-Core/OCVectorTempVariable.class.st (diff)
The file was modified src/Reflectivity/RFASTTranslator.class.st (diff)

Summary

  1. The OCTempVariables used to cache the index after the first access. The (details)
Commit 8b662a9acac1dde72e8a69522e77085c7b4964a8 by marcus.denker
The OCTempVariables used to cache the index after the first access. The
index itself was taken from the IR.
We can do it differently: every time a temp is created on the IR level,
we can backfill the offset in the OCTempVariables.
This PR:
- IRBuilder now fills the index of semantic variables on #addTemp:
- This allows to not search for the offsets in the IR when accesing
temps reflectively (#readFromLocalContext: and similar)
Fixes:
- some improvements to #lookupVar: (so we can call it with non-string
var names)
- map the node correctly when generating inlined blocks and full blocks
Cleanups:
- remove #tempVectorNamed: #indexFromIRForVarNamed: #indexFromIR and
#indexInTempVectorFromIR:
Accessing the index of OCTempVariables continues to do a nil check. This
allows us to call it even if the IR has not yet been generated.
The file was modified src/OpalCompiler-Core/IRPushClosureCopy.class.st (diff)
The file was modified src/OpalCompiler-Core/OCEnvironmentScope.class.st (diff)
The file was modified src/OpalCompiler-Core/IRBuilder.class.st (diff)
The file was modified src/OpalCompiler-Core/IRSequence.class.st (diff)
The file was modified src/OpalCompiler-Core/OCVectorTempVariable.class.st (diff)
The file was modified src/OpalCompiler-Core/OCASTTranslator.class.st (diff)
The file was modified src/Reflectivity/RFASTTranslator.class.st (diff)
The file was modified src/OpalCompiler-Core/OCCopyingTempVariable.class.st (diff)
The file was modified src/OpalCompiler-Core/OCAbstractMethodScope.class.st (diff)
The file was modified src/OpalCompiler-Core/OCTempVariable.class.st (diff)
The file was modified src/OpalCompiler-Core/IRMethod.class.st (diff)
The file was modified src/OpalCompiler-Core/OCClassScope.class.st (diff)