Skip to content
Snippets Groups Projects
Commit db3a771c authored by Lukas Stadler's avatar Lukas Stadler
Browse files

synchronize on FSCM

parent c27bec19
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@ import com.oracle.truffle.r.runtime.data.RLanguage;
import com.oracle.truffle.r.runtime.data.RShareable;
import com.oracle.truffle.r.runtime.data.RSharingAttributeStorage;
import com.oracle.truffle.r.runtime.data.model.RAbstractContainer;
import com.oracle.truffle.r.runtime.env.frame.FrameSlotChangeMonitor;
/**
* A {@link ArgumentStatePush} is used to bump up state transition for function arguments.
......@@ -98,7 +99,9 @@ public abstract class ArgumentStatePush extends Node {
if (writeArgMask != -1 && !FastROptions.RefCountIncrementOnly.getBooleanValue()) {
if (frameSlot == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
frameSlot = frame.getFrameDescriptor().findOrAddFrameSlot(writeArgMask, FrameSlotKind.Object);
synchronized (FrameSlotChangeMonitor.class) {
frameSlot = frame.getFrameDescriptor().findOrAddFrameSlot(writeArgMask, FrameSlotKind.Object);
}
}
frame.setObject(frameSlot, shareable);
}
......
......@@ -34,6 +34,7 @@ import com.oracle.truffle.api.utilities.AssumedValue;
import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.data.RNull;
import com.oracle.truffle.r.runtime.data.RShareable;
import com.oracle.truffle.r.runtime.env.frame.FrameSlotChangeMonitor;
import com.oracle.truffle.r.runtime.nodes.RNode;
/**
......@@ -73,7 +74,9 @@ public final class PostProcessArgumentsNode extends RNode {
if ((bits & mask) != 0) {
if (frameSlots[i] == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
frameSlots[i] = frame.getFrameDescriptor().findOrAddFrameSlot(mask, FrameSlotKind.Object);
synchronized (FrameSlotChangeMonitor.class) {
frameSlots[i] = frame.getFrameDescriptor().findOrAddFrameSlot(mask, FrameSlotKind.Object);
}
}
RShareable s;
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment