Skip to content

Commit 2bb7142

Browse files
committed
Avoid dynamic findFrameSlot
- this gave an error with the Graal optimizer, because it wasn't clear that the slot can't be null. [TODO-REPORT: FrameDescriptor.findFrameSlot should not be used in fast-path code, try to standardize frame layout] Signed-off-by: Stefan Marr <git@stefan-marr.de>
1 parent 3319511 commit 2bb7142

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/som/interpreter/nodes/ContextualNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
package som.interpreter.nodes;
2323

24+
import som.compiler.MethodGenerationContext;
2425
import som.vmobjects.Block;
2526

2627
import com.oracle.truffle.api.frame.FrameSlot;
@@ -42,7 +43,7 @@ protected MaterializedFrame determineContext(MaterializedFrame frame) {
4243

4344
while (i > 0) {
4445
try {
45-
FrameSlot blockSelfSlot = ctx.getFrameDescriptor().findFrameSlot("self");
46+
FrameSlot blockSelfSlot = MethodGenerationContext.getStandardSelfSlot();
4647
Block block = (Block) ctx.getObject(blockSelfSlot);
4748
ctx = block.getContext();
4849
i--;

0 commit comments

Comments
 (0)