Java Code Examples for com.oracle.truffle.api.frame.FrameSlotKind#Illegal

The following examples show how to use com.oracle.truffle.api.frame.FrameSlotKind#Illegal . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefineNode.java    From mumbler with GNU General Public License v3.0 5 votes vote down vote up
private boolean isKind(FrameSlot slot, FrameSlotKind kind) {
	if (slot.getKind() == kind) {
		return true;
	}
	if (slot.getKind() == FrameSlotKind.Illegal) {
		CompilerDirectives.transferToInterpreterAndInvalidate();
		slot.setKind(kind);
		return true;
	}
	return false;
}
 
Example 2
Source File: HashemWriteLocalVariableNode.java    From mr-hashemi with Universal Permissive License v1.0 4 votes vote down vote up
protected boolean isBooleanOrIllegal(VirtualFrame frame) {
    final FrameSlotKind kind = frame.getFrameDescriptor().getFrameSlotKind(getSlot());
    return kind == FrameSlotKind.Boolean || kind == FrameSlotKind.Illegal;
}
 
Example 3
Source File: FrameSlotWriteNode.java    From trufflesqueak with MIT License 4 votes vote down vote up
protected final boolean isBooleanOrIllegal(final Frame frame) {
    final FrameSlotKind kind = frame.getFrameDescriptor().getFrameSlotKind(getSlot());
    return kind == FrameSlotKind.Boolean || kind == FrameSlotKind.Illegal;
}
 
Example 4
Source File: FrameSlotWriteNode.java    From trufflesqueak with MIT License 4 votes vote down vote up
protected final boolean isLongOrIllegal(final Frame frame) {
    final FrameSlotKind kind = frame.getFrameDescriptor().getFrameSlotKind(getSlot());
    return kind == FrameSlotKind.Long || kind == FrameSlotKind.Illegal;
}
 
Example 5
Source File: FrameSlotWriteNode.java    From trufflesqueak with MIT License 4 votes vote down vote up
protected final boolean isDoubleOrIllegal(final Frame frame) {
    final FrameSlotKind kind = frame.getFrameDescriptor().getFrameSlotKind(getSlot());
    return kind == FrameSlotKind.Double || kind == FrameSlotKind.Illegal;
}
 
Example 6
Source File: HashemWriteLocalVariableNode.java    From mr-hashemi with Universal Permissive License v1.0 2 votes vote down vote up
/**
 * Guard function that the local variable has the type {@code long}.
 *
 * @param frame The parameter seems unnecessary, but it is required: Without the parameter, the
 *            Truffle DSL would not check the guard on every execution of the specialization.
 *            Guards without parameters are assumed to be pure, but our guard depends on the
 *            slot kind which can change.
 */
protected boolean isLongOrIllegal(VirtualFrame frame) {
    final FrameSlotKind kind = frame.getFrameDescriptor().getFrameSlotKind(getSlot());
    return kind == FrameSlotKind.Long || kind == FrameSlotKind.Illegal;
}