Skip to content

Commit

Permalink
Fix unwrapping of far references for self sends
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Apr 27, 2020
1 parent 02da734 commit e1e3d26
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/som/interpreter/actors/WrapReferenceNode.java
Expand Up @@ -13,7 +13,11 @@ public abstract class WrapReferenceNode extends Node {

public abstract Object execute(Object ref, Actor target, Actor owner);

@Specialization(guards = "target == owner")
protected static final boolean notFarRef(final Object ref) {
return !(ref instanceof SFarReference);
}

@Specialization(guards = {"target == owner", "notFarRef(ref)"})
public Object inSameActor(final Object ref, final Actor target, final Actor owner) {
return ref;
}
Expand Down

0 comments on commit e1e3d26

Please sign in to comment.