diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/AboutToReturnNode.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/AboutToReturnNode.java index 4efa8d59f..222fe1a36 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/AboutToReturnNode.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/AboutToReturnNode.java @@ -10,6 +10,7 @@ import com.oracle.truffle.api.dsl.ImportStatic; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.VirtualFrame; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.profiles.ValueProfile; @@ -78,6 +79,7 @@ protected static final void doAboutToReturn(final VirtualFrame frame, final NonL } } + @DenyReplace private static final class AboutToReturnNoopNode extends AboutToReturnNode { private static final AboutToReturnNoopNode SINGLETON = new AboutToReturnNoopNode(); diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/HandlePrimitiveFailedNode.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/HandlePrimitiveFailedNode.java index 4139c52c7..1c19db08b 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/HandlePrimitiveFailedNode.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/HandlePrimitiveFailedNode.java @@ -10,6 +10,7 @@ import com.oracle.truffle.api.dsl.Cached.Shared; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.VirtualFrame; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeInfo; @@ -53,6 +54,7 @@ protected static final void doHandleRawValue(final VirtualFrame frame, final int } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) private static final class HandlePrimitiveFailedNoopNode extends HandlePrimitiveFailedNode { private static final HandlePrimitiveFailedNoopNode SINGLETON = new HandlePrimitiveFailedNoopNode(); diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackReadNode.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackReadNode.java index 2ca3d4d79..259af4a88 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackReadNode.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackReadNode.java @@ -16,6 +16,7 @@ import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.api.frame.FrameSlotKind; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.Node; import de.hpi.swa.trufflesqueak.model.BlockClosureObject; @@ -145,6 +146,7 @@ protected final Object readAndClearObject(final Frame frame) { } } + @DenyReplace private static final class FrameArgumentReadNode extends FrameStackReadNode { private static final EconomicMap SINGLETONS = EconomicMap.create(); diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackWriteNode.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackWriteNode.java index 7f50a9631..0e0a398ad 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackWriteNode.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/context/frame/FrameStackWriteNode.java @@ -14,6 +14,7 @@ import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.api.frame.FrameSlotKind; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.Node; import de.hpi.swa.trufflesqueak.nodes.AbstractNode; @@ -87,6 +88,7 @@ protected final boolean isDoubleOrIllegal(final Frame frame) { } } + @DenyReplace private static final class FrameArgumentWriteNode extends FrameStackWriteNode { private static final EconomicMap SINGLETONS = EconomicMap.create(); diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/interrupts/CheckForInterruptsQuickNode.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/interrupts/CheckForInterruptsQuickNode.java index d70bda417..466a20cde 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/interrupts/CheckForInterruptsQuickNode.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/interrupts/CheckForInterruptsQuickNode.java @@ -8,6 +8,7 @@ import com.oracle.truffle.api.CompilerDirectives; import com.oracle.truffle.api.frame.VirtualFrame; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.Node; import de.hpi.swa.trufflesqueak.image.SqueakImageContext; @@ -39,6 +40,7 @@ public static CheckForInterruptsQuickNode create(final CompiledCodeObject code) public abstract void execute(VirtualFrame frame); + @DenyReplace private static final class NoCheckForInterruptsNode extends CheckForInterruptsQuickNode { private static final NoCheckForInterruptsNode SINGLETON = new NoCheckForInterruptsNode(); diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java index ef992f97c..971adf5ac 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/NullPlugin.java @@ -15,6 +15,7 @@ import com.oracle.truffle.api.dsl.GenerateNodeFactory; import com.oracle.truffle.api.dsl.NodeFactory; import com.oracle.truffle.api.dsl.Specialization; +import com.oracle.truffle.api.nodes.DenyReplace; import de.hpi.swa.trufflesqueak.image.SqueakImageConstants; import de.hpi.swa.trufflesqueak.model.ArrayObject; @@ -31,6 +32,7 @@ import de.hpi.swa.trufflesqueak.util.MiscUtils; public final class NullPlugin extends AbstractPrimitiveFactoryHolder { + @DenyReplace @SqueakPrimitive(names = "primitiveScreenScaleFactor") public static final class PrimScreenScaleFactorNode extends AbstractSingletonPrimitiveNode { @Override @@ -39,6 +41,7 @@ public Object execute() { } } + @DenyReplace @SqueakPrimitive(names = "primitiveHighResClock") public static final class PrimHighResClockNode extends AbstractSingletonPrimitiveNode { @Override @@ -47,6 +50,7 @@ public Object execute() { } } + @DenyReplace @SqueakPrimitive(names = "primitiveMultipleBytecodeSetsActive") public static final class PrimMultipleBytecodeSetsActive0Node extends AbstractSingletonPrimitiveNode { @Override @@ -66,6 +70,7 @@ protected final boolean doSet(@SuppressWarnings("unused") final Object receiver, } } + @DenyReplace @SqueakPrimitive(names = "primitiveUtcWithOffset") public static final class PrimUtcWithOffset1Node extends AbstractSingletonPrimitiveNode { @Override diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/SecurityPlugin.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/SecurityPlugin.java index 7eb42a5f3..acce0be5f 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/SecurityPlugin.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/plugins/SecurityPlugin.java @@ -12,6 +12,7 @@ import com.oracle.truffle.api.dsl.GenerateNodeFactory; import com.oracle.truffle.api.dsl.NodeFactory; import com.oracle.truffle.api.dsl.Specialization; +import com.oracle.truffle.api.nodes.DenyReplace; import de.hpi.swa.trufflesqueak.exceptions.PrimitiveExceptions.PrimitiveFailed; import de.hpi.swa.trufflesqueak.model.BooleanObject; @@ -21,6 +22,8 @@ import de.hpi.swa.trufflesqueak.nodes.primitives.SqueakPrimitive; public final class SecurityPlugin extends AbstractPrimitiveFactoryHolder { + + @DenyReplace @SqueakPrimitive(names = "primitiveCanWriteImage") public static final class PrimCanWriteImageNode extends AbstractSingletonPrimitiveNode { @Override @@ -47,6 +50,7 @@ protected static final Object doGet(@SuppressWarnings("unused") final Object rec } } + @DenyReplace @SqueakPrimitive(names = "primitiveGetUntrustedUserDirectory") public static final class PrimGetUntrustedUserDirectoryNode extends AbstractSingletonPrimitiveNode { @Override diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ControlPrimitives.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ControlPrimitives.java index 429a0e41f..d10d5d49b 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ControlPrimitives.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/ControlPrimitives.java @@ -30,6 +30,7 @@ import com.oracle.truffle.api.dsl.NodeFactory; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.VirtualFrame; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeInfo; @@ -572,6 +573,7 @@ protected static final ClassObject doClass(@SuppressWarnings("unused") final Obj } } + @DenyReplace @SqueakPrimitive(indices = 112) public static final class PrimBytesLeftNode extends AbstractSingletonPrimitiveNode { @Override @@ -787,6 +789,7 @@ private static boolean hasPendingFinalizationsWithLogging(final SqueakImageConte } } + @DenyReplace @SqueakPrimitive(indices = 131) public static final class PrimIncrementalGCNode extends AbstractSingletonPrimitiveNode { @Override @@ -1186,6 +1189,7 @@ protected static final Object returnValue(final Object receiver) { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 257) public static final class PrimQuickReturnTrueNode extends AbstractSingletonPrimitiveNode { @@ -1195,6 +1199,7 @@ public Object execute() { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 258) public static final class PrimQuickReturnFalseNode extends AbstractSingletonPrimitiveNode { @@ -1204,6 +1209,7 @@ public Object execute() { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 259) public static final class PrimQuickReturnNilNode extends AbstractSingletonPrimitiveNode { @@ -1213,6 +1219,7 @@ public Object execute() { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 260) public static final class PrimQuickReturnMinusOneNode extends AbstractSingletonPrimitiveNode { @@ -1222,6 +1229,7 @@ public Object execute() { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 261) public static final class PrimQuickReturnZeroNode extends AbstractSingletonPrimitiveNode { @@ -1231,6 +1239,7 @@ public Object execute() { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 262) public static final class PrimQuickReturnOneNode extends AbstractSingletonPrimitiveNode { @@ -1240,6 +1249,7 @@ public Object execute() { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 263) public static final class PrimQuickReturnTwoNode extends AbstractSingletonPrimitiveNode { diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/IOPrimitives.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/IOPrimitives.java index 449758384..2891ea5bb 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/IOPrimitives.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/IOPrimitives.java @@ -18,6 +18,7 @@ import com.oracle.truffle.api.dsl.NodeFactory; import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.VirtualFrame; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeInfo; import com.oracle.truffle.api.profiles.BranchProfile; @@ -789,6 +790,7 @@ protected static final void doFail(final WeakVariablePointersObject rcvr, final } } + @DenyReplace @SqueakPrimitive(indices = 106) public static final class PrimScreenSizeNode extends AbstractSingletonPrimitiveNode { @Child AbstractPointersObjectWriteNode writeNode = AbstractPointersObjectWriteNode.create(); diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/MiscellaneousPrimitives.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/MiscellaneousPrimitives.java index 07b9454ad..0024673c4 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/MiscellaneousPrimitives.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/MiscellaneousPrimitives.java @@ -20,6 +20,7 @@ import com.oracle.truffle.api.dsl.NodeFactory; import com.oracle.truffle.api.dsl.ReportPolymorphism; import com.oracle.truffle.api.dsl.Specialization; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeInfo; import com.oracle.truffle.api.profiles.ConditionProfile; @@ -465,6 +466,7 @@ protected final Object doSignal(final Object receiver, final NilObject semaphore } } + @DenyReplace @SqueakPrimitive(indices = 137) public static final class PrimSecondClockNode extends AbstractSingletonPrimitiveNode { @Override @@ -502,6 +504,7 @@ protected final NativeObject setClipboardText(@SuppressWarnings("unused") final } } + @DenyReplace @SqueakPrimitive(indices = 142) public static final class PrimVMPathNode extends AbstractSingletonPrimitiveNode { @Override @@ -717,6 +720,7 @@ protected static final AbstractSqueakObject doCopy(final AbstractSqueakObjectWit } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 176) public static final class PrimMaxIdentityHashNode extends AbstractSingletonPrimitiveNode { @@ -748,6 +752,7 @@ protected final ArrayObject allInstances(final ClassObject classObject, } } + @DenyReplace @SqueakPrimitive(indices = 240) public static final class PrimUTCClockNode extends AbstractSingletonPrimitiveNode { @Override @@ -756,6 +761,7 @@ public Object execute() { } } + @DenyReplace @SqueakPrimitive(indices = 241) public static final class PrimLocalMicrosecondsClockNode extends AbstractSingletonPrimitiveNode { @Override diff --git a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/StoragePrimitives.java b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/StoragePrimitives.java index 34371741d..8d17f5405 100644 --- a/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/StoragePrimitives.java +++ b/src/de.hpi.swa.trufflesqueak/src/de/hpi/swa/trufflesqueak/nodes/primitives/impl/StoragePrimitives.java @@ -21,6 +21,7 @@ import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.frame.Frame; import com.oracle.truffle.api.frame.FrameInstance; +import com.oracle.truffle.api.nodes.DenyReplace; import com.oracle.truffle.api.nodes.NodeCost; import com.oracle.truffle.api.nodes.NodeInfo; import com.oracle.truffle.api.profiles.BranchProfile; @@ -412,6 +413,7 @@ protected static final ArrayObject doBadArgument(final ArrayObject receiver, fin } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 129) public static final class PrimSpecialObjectsArrayNode extends AbstractSingletonPrimitiveNode { @@ -421,6 +423,7 @@ public Object execute() { } } + @DenyReplace @NodeInfo(cost = NodeCost.NONE) @SqueakPrimitive(indices = 138) public static final class PrimSomeObjectNode extends AbstractSingletonPrimitiveNode {