We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11abeb3 commit a72b6f6Copy full SHA for a72b6f6
truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/DynamicObjectSupport.java
@@ -45,6 +45,7 @@
45
import java.util.Map;
46
import java.util.Objects;
47
48
+import com.oracle.truffle.api.CompilerDirectives;
49
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
50
51
final class DynamicObjectSupport {
@@ -53,7 +54,8 @@ private DynamicObjectSupport() {
53
54
}
55
56
static void setShapeWithStoreFence(DynamicObject object, Shape shape) {
- if (shape.isShared()) {
57
+ // unconditional fence in the interpreter to avoid an extra shared shape branch
58
+ if (CompilerDirectives.inInterpreter() || shape.isShared()) {
59
VarHandle.storeStoreFence();
60
61
object.setShape(shape);
0 commit comments