Skip to content

Commit

Permalink
Rename Specialization.contains to replaces
Browse files Browse the repository at this point in the history
`contains` was deprecated, and seems to have caused compilation issues with Graal.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Jan 14, 2017
1 parent c4f66c1 commit e23541c
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/som/interpreter/nodes/LocalVariableNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public final double doDouble(final VirtualFrame frame) throws FrameSlotTypeExcep
}

@Specialization(guards = {"isObject(frame)"},
contains = {"doBoolean", "doLong", "doDouble"},
replaces = {"doBoolean", "doLong", "doDouble"},
rewriteOn = {FrameSlotTypeException.class})
public final Object doObject(final VirtualFrame frame) throws FrameSlotTypeException {
return frame.getObject(slot);
Expand Down Expand Up @@ -144,7 +144,7 @@ public final double writeDouble(final VirtualFrame frame, final double expValue)
return expValue;
}

@Specialization(contains = {"writeBoolean", "writeLong", "writeDouble"})
@Specialization(replaces = {"writeBoolean", "writeLong", "writeDouble"})
public final Object writeGeneric(final VirtualFrame frame, final Object expValue) {
slot.setKind(FrameSlotKind.Object);
frame.setObject(slot, expValue);
Expand Down
4 changes: 2 additions & 2 deletions src/som/interpreter/nodes/NonLocalVariableNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public final double doDouble(final VirtualFrame frame) throws FrameSlotTypeExcep
}

@Specialization(guards = {"isObject(frame)"},
contains = {"doBoolean", "doLong", "doDouble"},
replaces = {"doBoolean", "doLong", "doDouble"},
rewriteOn = {FrameSlotTypeException.class})
public final Object doObject(final VirtualFrame frame) throws FrameSlotTypeException {
return determineContext(frame).getObject(slot);
Expand Down Expand Up @@ -144,7 +144,7 @@ public final double writeDouble(final VirtualFrame frame, final double expValue)
return expValue;
}

@Specialization(contains = {"writeBoolean", "writeLong", "writeDouble"})
@Specialization(replaces = {"writeBoolean", "writeLong", "writeDouble"})
public final Object writeGeneric(final VirtualFrame frame, final Object expValue) {
ensureObjectKind();
determineContext(frame).setObject(slot, expValue);
Expand Down
4 changes: 2 additions & 2 deletions src/som/interpreter/nodes/OuterObjectRead.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ protected boolean isSameEnclosingGroup(final SObjectWithClass receiver,
}

@Specialization(guards = {"isSameEnclosingGroup(receiver, superclassIdx, factory)"},
contains = "doForFurtherOuter")
replaces = "doForFurtherOuter")
public final Object fixedLookup(final SObjectWithClass receiver,
@Cached("getIdx(receiver)") final int superclassIdx,
@Cached("getEnclosingClass(receiver).getInstanceFactory()") final ClassFactory factory) {
assert factory != null;
return getEnclosingObject(getEnclosingClassWithPotentialFailure(receiver, superclassIdx));
}

@Specialization(contains = "fixedLookup")
@Specialization(replaces = "fixedLookup")
public final Object fallback(final SObjectWithClass receiver) {
return getEnclosingObject(getEnclosingClass(receiver));
}
Expand Down
2 changes: 1 addition & 1 deletion src/som/interpreter/nodes/specialized/IfMessageNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public final Object cachedBlock(final VirtualFrame frame, final boolean rcvr, fi
}
}

@Specialization(contains = "cachedBlock")
@Specialization(replaces = "cachedBlock")
public final Object fallback(final VirtualFrame frame, final boolean rcvr,
final SBlock arg,
@Cached("createIndirect()") final IndirectCallNode callNode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public final Object doIfTrueIfFalseWithInliningTwoBlocks(final VirtualFrame fram
}
}

@Specialization(contains = {"doIfTrueIfFalseWithInliningTwoBlocks"})
@Specialization(replaces = {"doIfTrueIfFalseWithInliningTwoBlocks"})
public final Object doIfTrueIfFalse(final VirtualFrame frame,
final boolean receiver, final SBlock trueBlock, final SBlock falseBlock) {
CompilerAsserts.neverPartOfCompilation("IfTrueIfFalseMessageNode.10");
Expand Down Expand Up @@ -121,7 +121,7 @@ public final Object doIfTrueIfFalseWithInliningFalseValue(final VirtualFrame fra
}
}

@Specialization(contains = {"doIfTrueIfFalseWithInliningTrueValue"})
@Specialization(replaces = {"doIfTrueIfFalseWithInliningTrueValue"})
public final Object doIfTrueIfFalseTrueValue(final VirtualFrame frame,
final boolean receiver, final Object trueValue, final SBlock falseBlock) {
if (condProf.profile(receiver)) {
Expand All @@ -132,7 +132,7 @@ public final Object doIfTrueIfFalseTrueValue(final VirtualFrame frame,
}
}

@Specialization(contains = {"doIfTrueIfFalseWithInliningFalseValue"})
@Specialization(replaces = {"doIfTrueIfFalseWithInliningFalseValue"})
public final Object doIfTrueIfFalseFalseValue(final VirtualFrame frame,
final boolean receiver, final SBlock trueBlock, final Object falseValue) {
if (condProf.profile(receiver)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private boolean obj2bool(final Object o) {
throw new RuntimeException("should never get here");
}

@Specialization(contains = "doCached")
@Specialization(replaces = "doCached")
public final Object doUncached(final VirtualFrame frame, final SBlock loopCondition,
final SBlock loopBody) {
CompilerAsserts.neverPartOfCompilation("WhileCache.GenericDispatch"); // no caching, direct invokes, no loop count reporting...
Expand Down
8 changes: 4 additions & 4 deletions src/som/interpreter/objectstorage/InitializerFieldWrite.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public final long longValueSet(final SImmutableObject rcvr, final long value,
assumptions = {"isLatestLayout"},
guards = {"location != null",
"cachedLayout == rcvr.getObjectLayout()"},
contains = "longValueSet",
replaces = "longValueSet",
limit = "LIMIT")
public final long longValueSetOrUnset(final SImmutableObject rcvr, final long value,
@Cached("rcvr.getObjectLayout()") final ObjectLayout cachedLayout,
Expand Down Expand Up @@ -126,7 +126,7 @@ public final long longValueSet(final SMutableObject rcvr, final long value,
assumptions = {"isLatestLayout"},
guards = {"location != null",
"cachedLayout == rcvr.getObjectLayout()"},
contains = "longValueSet",
replaces = "longValueSet",
limit = "LIMIT")
public final long longValueSetOrUnset(final SMutableObject rcvr, final long value,
@Cached("rcvr.getObjectLayout()") final ObjectLayout cachedLayout,
Expand Down Expand Up @@ -156,7 +156,7 @@ public final double doubleValueSet(final SMutableObject rcvr, final double value
assumptions = {"isLatestLayout"},
guards = {"location != null",
"cachedLayout == rcvr.getObjectLayout()"},
contains = "doubleValueSet",
replaces = "doubleValueSet",
limit = "LIMIT")
public final double doubleValueSetOrUnset(final SMutableObject rcvr, final double value,
@Cached("rcvr.getObjectLayout()") final ObjectLayout cachedLayout,
Expand Down Expand Up @@ -186,7 +186,7 @@ public final double doubleValueSet(final SImmutableObject rcvr, final double val
assumptions = {"isLatestLayout"},
guards = {"location != null",
"cachedLayout == rcvr.getObjectLayout()"},
contains = "doubleValueSet",
replaces = "doubleValueSet",
limit = "LIMIT")
public final double doubleValueSetOrUnset(final SImmutableObject rcvr, final double value,
@Cached("rcvr.getObjectLayout()") final ObjectLayout cachedLayout,
Expand Down
6 changes: 3 additions & 3 deletions src/som/primitives/BlockPrims.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public final Object doCachedBlock(final VirtualFrame frame,
return call.call(frame, new Object[] {receiver});
}

@Specialization(contains = "doCachedBlock")
@Specialization(replaces = "doCachedBlock")
public final Object doGeneric(final VirtualFrame frame,
final SBlock receiver, @Cached("create()") final IndirectCallNode call) {
return receiver.getMethod().invoke(call, frame, new Object[] {receiver});
Expand Down Expand Up @@ -124,7 +124,7 @@ public final Object doCachedBlock(final VirtualFrame frame,
return call.call(frame, new Object[] {receiver, arg});
}

@Specialization(contains = "doCachedBlock")
@Specialization(replaces = "doCachedBlock")
public final Object doGeneric(final VirtualFrame frame,
final SBlock receiver, final Object arg,
@Cached("create()") final IndirectCallNode call) {
Expand Down Expand Up @@ -156,7 +156,7 @@ public final Object doCachedBlock(final VirtualFrame frame,
return call.call(frame, new Object[] {receiver, arg1, arg2});
}

@Specialization(contains = "doCachedBlock")
@Specialization(replaces = "doCachedBlock")
public final Object doGeneric(final VirtualFrame frame,
final SBlock receiver, final Object arg1, final Object arg2,
@Cached("create()") final IndirectCallNode call) {
Expand Down
2 changes: 1 addition & 1 deletion src/som/primitives/ExceptionsPrims.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public final Object doException(final VirtualFrame frame, final SBlock body,
}
}

@Specialization(contains = "doException")
@Specialization(replaces = "doException")
public final Object doExceptionUncached(final VirtualFrame frame, final SBlock body,
final SClass exceptionClass, final SBlock exceptionHandler) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/som/primitives/actors/PromisePrims.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public final SPromise whenResolved(final SPromise promise,
return whenResolved(promise, callback, blockCallTarget, registerNode);
}

@Specialization(contains = "whenResolved")
@Specialization(replaces = "whenResolved")
public final SPromise whenResolvedUncached(final SPromise promise, final SBlock callback) {
return whenResolved(promise, callback, createReceived(callback), registerNode);
}
Expand Down
2 changes: 1 addition & 1 deletion src/som/primitives/arrays/PutAllNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public SMutableArray doPutNilInEmptyArray(final SMutableArray rcvr, final Object
return rcvr;
}

@Specialization(guards = {"valueIsNil(nil)"}, contains = {"doPutNilInEmptyArray"})
@Specialization(guards = {"valueIsNil(nil)"}, replaces = {"doPutNilInEmptyArray"})
public SMutableArray doPutNilInOtherArray(final SMutableArray rcvr, final SObjectWithClass nil,
final long length) {
rcvr.transitionToEmpty(length);
Expand Down
4 changes: 2 additions & 2 deletions src/som/primitives/reflection/AbstractSymbolDispatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public Object doCached(final VirtualFrame frame,
return realCachedSend.doPreEvaluated(frame, arguments);
}

@Specialization(contains = "doCachedWithoutArgArr", guards = "argsArr == null")
@Specialization(replaces = "doCachedWithoutArgArr", guards = "argsArr == null")
public Object doUncached(final VirtualFrame frame,
final Object receiver, final SSymbol selector, final Object argsArr,
@Cached("create()") final IndirectCallNode call) {
Expand All @@ -95,7 +95,7 @@ public Object doUncached(final VirtualFrame frame,
}
}

@Specialization(contains = "doCached")
@Specialization(replaces = "doCached")
public Object doUncached(final VirtualFrame frame,
final Object receiver, final SSymbol selector, final SArray argsArr,
@Cached("create()") final IndirectCallNode call,
Expand Down

0 comments on commit e23541c

Please sign in to comment.