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

com.oracle.truffle.sl.nodes.expression.SLLogicalNotNodeGen Maven / Gradle / Ivy

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

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 SLLogicalNotNode#doBoolean}
 *     Activation probability: 0.65000
 *     With/without class size: 11/0 bytes
 *   Specialization {@link SLLogicalNotNode#typeError}
 *     Activation probability: 0.35000
 *     With/without class size: 8/0 bytes
 * 
*/ @GeneratedBy(SLLogicalNotNode.class) @SuppressWarnings("javadoc") public final class SLLogicalNotNodeGen extends SLLogicalNotNode { @Child private SLExpressionNode valueNode_; /** * State Info:
     *   0: SpecializationActive {@link SLLogicalNotNode#doBoolean}
     *   1: SpecializationActive {@link SLLogicalNotNode#typeError}
     * 
*/ @CompilationFinal private int state_0_; private SLLogicalNotNodeGen(SLExpressionNode valueNode) { this.valueNode_ = valueNode; } @SuppressWarnings("static-method") private boolean fallbackGuard_(int state_0, Object valueNodeValue) { if (!((state_0 & 0b1) != 0 /* is SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] */) && valueNodeValue instanceof Boolean) { return false; } return true; } @Override public Object executeGeneric(VirtualFrame frameValue) { int state_0 = this.state_0_; if ((state_0 & 0b10) == 0 /* only-active SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] */ && (state_0 != 0 /* is-not SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] && SpecializationActive[SLLogicalNotNode.typeError(Object)] */)) { return executeGeneric_boolean0(state_0, frameValue); } else { return executeGeneric_generic1(state_0, frameValue); } } private Object executeGeneric_boolean0(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(ex.getResult()); } assert (state_0 & 0b1) != 0 /* is SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] */; return doBoolean(valueNodeValue_); } private Object executeGeneric_generic1(int state_0__, VirtualFrame frameValue) { int state_0 = state_0__; Object valueNodeValue_ = this.valueNode_.executeGeneric(frameValue); if (state_0 != 0 /* is SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] || SpecializationActive[SLLogicalNotNode.typeError(Object)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] */ && valueNodeValue_ instanceof Boolean) { boolean valueNodeValue__ = (boolean) valueNodeValue_; return doBoolean(valueNodeValue__); } if ((state_0 & 0b10) != 0 /* is SpecializationActive[SLLogicalNotNode.typeError(Object)] */) { if (fallbackGuard_(state_0, valueNodeValue_)) { return typeError(valueNodeValue_); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(valueNodeValue_); } @Override public boolean executeBoolean(VirtualFrame frameValue) throws UnexpectedResultException { int state_0 = this.state_0_; if ((state_0 & 0b10) != 0 /* is SpecializationActive[SLLogicalNotNode.typeError(Object)] */) { return SLTypesGen.expectBoolean(executeGeneric(frameValue)); } boolean valueNodeValue_; try { valueNodeValue_ = this.valueNode_.executeBoolean(frameValue); } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return SLTypesGen.expectBoolean(executeAndSpecialize(ex.getResult())); } if ((state_0 & 0b1) != 0 /* is SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] */) { return doBoolean(valueNodeValue_); } CompilerDirectives.transferToInterpreterAndInvalidate(); return SLTypesGen.expectBoolean(executeAndSpecialize(valueNodeValue_)); } @Override public void executeVoid(VirtualFrame frameValue) { int state_0 = this.state_0_; try { if ((state_0 & 0b10) == 0 /* only-active SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] */ && (state_0 != 0 /* is-not SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] && SpecializationActive[SLLogicalNotNode.typeError(Object)] */)) { executeBoolean(frameValue); return; } executeGeneric(frameValue); return; } catch (UnexpectedResultException ex) { CompilerDirectives.transferToInterpreterAndInvalidate(); return; } } private Object executeAndSpecialize(Object valueNodeValue) { int state_0 = this.state_0_; if (valueNodeValue instanceof Boolean) { boolean valueNodeValue_ = (boolean) valueNodeValue; state_0 = state_0 | 0b1 /* add SpecializationActive[SLLogicalNotNode.doBoolean(boolean)] */; this.state_0_ = state_0; return doBoolean(valueNodeValue_); } state_0 = state_0 | 0b10 /* add SpecializationActive[SLLogicalNotNode.typeError(Object)] */; this.state_0_ = state_0; return typeError(valueNodeValue); } @NeverDefault public static SLLogicalNotNode create(SLExpressionNode valueNode) { return new SLLogicalNotNodeGen(valueNode); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy