All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.truffle.sl.nodes.local.SLWriteLocalVariableNodeGen Maven / Gradle / Ivy

The newest version!
// CheckStyle: start generated
package com.oracle.truffle.sl.nodes.local;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.sl.nodes.SLExpressionNode;
import com.oracle.truffle.sl.nodes.SLTypesGen;

/**
 * Debug Info: 
 *   Specialization {@link SLWriteLocalVariableNode#writeLong}
 *     Activation probability: 0.48333
 *     With/without class size: 9/0 bytes
 *   Specialization {@link SLWriteLocalVariableNode#writeBoolean}
 *     Activation probability: 0.33333
 *     With/without class size: 8/0 bytes
 *   Specialization {@link SLWriteLocalVariableNode#write}
 *     Activation probability: 0.18333
 *     With/without class size: 6/0 bytes
 * 
*/ @GeneratedBy(SLWriteLocalVariableNode.class) @SuppressWarnings("javadoc") public final class SLWriteLocalVariableNodeGen extends SLWriteLocalVariableNode { private final int slot; private final SLExpressionNode nameNode; private final boolean declaration; @Child private SLExpressionNode valueNode_; /** * State Info:
     *   0: SpecializationActive {@link SLWriteLocalVariableNode#writeLong}
     *   1: SpecializationActive {@link SLWriteLocalVariableNode#write}
     *   2: SpecializationActive {@link SLWriteLocalVariableNode#writeBoolean}
     * 
*/ @CompilationFinal private int state_0_; private SLWriteLocalVariableNodeGen(SLExpressionNode valueNode, int slot, SLExpressionNode nameNode, boolean declaration) { this.slot = slot; this.nameNode = nameNode; this.declaration = declaration; this.valueNode_ = valueNode; } @Override protected int getSlot() { return this.slot; } @Override protected SLExpressionNode getNameNode() { return this.nameNode; } @Override public boolean isDeclaration() { return this.declaration; } @Override public Object executeGeneric(VirtualFrame frameValue) { int state_0 = this.state_0_; if ((state_0 & 0b110) == 0 /* only-active SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] */ && (state_0 != 0 /* is-not SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] && SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] && SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */)) { return executeGeneric_long0(state_0, frameValue); } else if ((state_0 & 0b11) == 0 /* only-active SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */ && (state_0 != 0 /* is-not SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] && SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] && SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */)) { return executeGeneric_boolean1(state_0, frameValue); } else { return executeGeneric_generic2(state_0, frameValue); } } private Object executeGeneric_long0(int state_0__, VirtualFrame frameValue) { int state_0 = state_0__; long valueNodeValue_; try { valueNodeValue_ = this.valueNode_.executeLong(frameValue); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, ex.getResult()); } assert (state_0 & 0b1) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] */; if ((isLongOrIllegal(frameValue))) { return writeLong(frameValue, valueNodeValue_); } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, valueNodeValue_); } private Object executeGeneric_boolean1(int state_0__, VirtualFrame frameValue) { int state_0 = state_0__; boolean valueNodeValue_; try { valueNodeValue_ = this.valueNode_.executeBoolean(frameValue); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, ex.getResult()); } assert (state_0 & 0b100) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */; if ((isBooleanOrIllegal(frameValue))) { return writeBoolean(frameValue, valueNodeValue_); } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, valueNodeValue_); } private Object executeGeneric_generic2(int state_0__, VirtualFrame frameValue) { int state_0 = state_0__; Object valueNodeValue_ = this.valueNode_.executeGeneric(frameValue); if (state_0 != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] || SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] || SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] */ && valueNodeValue_ instanceof Long) { long valueNodeValue__ = (long) valueNodeValue_; if ((isLongOrIllegal(frameValue))) { return writeLong(frameValue, valueNodeValue__); } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */ && valueNodeValue_ instanceof Boolean) { boolean valueNodeValue__ = (boolean) valueNodeValue_; if ((isBooleanOrIllegal(frameValue))) { return writeBoolean(frameValue, valueNodeValue__); } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */) { return write(frameValue, valueNodeValue_); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue, valueNodeValue_); } @Override public boolean executeBoolean(VirtualFrame frameValue) throws UnexpectedResultException { int state_0 = this.state_0_; if ((state_0 & 0b10) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */) { return SLTypesGen.expectBoolean(executeGeneric(frameValue)); } boolean valueNodeValue_; try { valueNodeValue_ = this.valueNode_.executeBoolean(frameValue); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return SLTypesGen.expectBoolean(executeAndSpecialize(frameValue, ex.getResult())); } if ((state_0 & 0b100) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */) { if ((isBooleanOrIllegal(frameValue))) { return writeBoolean(frameValue, valueNodeValue_); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return SLTypesGen.expectBoolean(executeAndSpecialize(frameValue, valueNodeValue_)); } @Override public long executeLong(VirtualFrame frameValue) throws UnexpectedResultException { int state_0 = this.state_0_; if ((state_0 & 0b10) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */) { return SLTypesGen.expectLong(executeGeneric(frameValue)); } long valueNodeValue_; try { valueNodeValue_ = this.valueNode_.executeLong(frameValue); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return SLTypesGen.expectLong(executeAndSpecialize(frameValue, ex.getResult())); } if ((state_0 & 0b1) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] */) { if ((isLongOrIllegal(frameValue))) { return writeLong(frameValue, valueNodeValue_); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return SLTypesGen.expectLong(executeAndSpecialize(frameValue, valueNodeValue_)); } @Override public void executeWrite(VirtualFrame frameValue, Object valueNodeValue) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] || SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] || SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] */ && valueNodeValue instanceof Long) { long valueNodeValue_ = (long) valueNodeValue; if ((isLongOrIllegal(frameValue))) { writeLong(frameValue, valueNodeValue_); return; } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */ && valueNodeValue instanceof Boolean) { boolean valueNodeValue_ = (boolean) valueNodeValue; if ((isBooleanOrIllegal(frameValue))) { writeBoolean(frameValue, valueNodeValue_); return; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */) { write(frameValue, valueNodeValue); return; } } CompilerDirectives.transferToInterpreterAndInvalidate(); executeAndSpecialize(frameValue, valueNodeValue); return; } @Override public void executeVoid(VirtualFrame frameValue) { int state_0 = this.state_0_; try { if ((state_0 & 0b110) == 0 /* only-active SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] */ && (state_0 != 0 /* is-not SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] && SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] && SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */)) { executeLong(frameValue); return; } else if ((state_0 & 0b11) == 0 /* only-active SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */ && (state_0 != 0 /* is-not SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] && SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] && SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */)) { executeBoolean(frameValue); return; } executeGeneric(frameValue); return; } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return; } } private Object executeAndSpecialize(VirtualFrame frameValue, Object valueNodeValue) { int state_0 = this.state_0_; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */ && valueNodeValue instanceof Long) { long valueNodeValue_ = (long) valueNodeValue; if ((isLongOrIllegal(frameValue))) { state_0 = state_0 | 0b1 /* add SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)] */; this.state_0_ = state_0; return writeLong(frameValue, valueNodeValue_); } } if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */ && valueNodeValue instanceof Boolean) { boolean valueNodeValue_ = (boolean) valueNodeValue; if ((isBooleanOrIllegal(frameValue))) { state_0 = state_0 | 0b100 /* add SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */; this.state_0_ = state_0; return writeBoolean(frameValue, valueNodeValue_); } } state_0 = state_0 & 0xfffffffa /* remove SpecializationActive[SLWriteLocalVariableNode.writeLong(VirtualFrame, long)], SpecializationActive[SLWriteLocalVariableNode.writeBoolean(VirtualFrame, boolean)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[SLWriteLocalVariableNode.write(VirtualFrame, Object)] */; this.state_0_ = state_0; return write(frameValue, valueNodeValue); } @NeverDefault public static SLWriteLocalVariableNode create(SLExpressionNode valueNode, int slot, SLExpressionNode nameNode, boolean declaration) { return new SLWriteLocalVariableNodeGen(valueNode, slot, nameNode, declaration); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy