com.oracle.truffle.js.nodes.function.SetFunctionNameNodeGen Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.truffle.js.nodes.function;
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.strings.TruffleString;
import com.oracle.truffle.js.runtime.Strings;
import com.oracle.truffle.js.runtime.Symbol;
import com.oracle.truffle.js.runtime.builtins.JSFunctionObject;
/**
* Debug Info:
* Specialization {@link SetFunctionNameNode#doJSFunctionNoPrefix(JSFunctionObject, TruffleString, TruffleString)}
* Activation probability: 0.32000
* With/without class size: 7/0 bytes
* Specialization {@link SetFunctionNameNode#doJSFunctionNoPrefix(JSFunctionObject, Symbol, TruffleString)}
* Activation probability: 0.26000
* With/without class size: 7/0 bytes
* Specialization {@link SetFunctionNameNode#doJSFunctionWithPrefix(JSFunctionObject, TruffleString, TruffleString)}
* Activation probability: 0.20000
* With/without class size: 6/0 bytes
* Specialization {@link SetFunctionNameNode#doJSFunctionWithPrefix(JSFunctionObject, Symbol, TruffleString)}
* Activation probability: 0.14000
* With/without class size: 5/0 bytes
* Specialization {@link SetFunctionNameNode#doUnsupported}
* Activation probability: 0.08000
* With/without class size: 4/0 bytes
*
*/
@GeneratedBy(SetFunctionNameNode.class)
@SuppressWarnings("javadoc")
public final class SetFunctionNameNodeGen extends SetFunctionNameNode {
/**
* State Info:
* 0: SpecializationActive {@link SetFunctionNameNode#doJSFunctionNoPrefix(JSFunctionObject, TruffleString, TruffleString)}
* 1: SpecializationActive {@link SetFunctionNameNode#doJSFunctionNoPrefix(JSFunctionObject, Symbol, TruffleString)}
* 2: SpecializationActive {@link SetFunctionNameNode#doJSFunctionWithPrefix(JSFunctionObject, TruffleString, TruffleString)}
* 3: SpecializationActive {@link SetFunctionNameNode#doJSFunctionWithPrefix(JSFunctionObject, Symbol, TruffleString)}
* 4: SpecializationActive {@link SetFunctionNameNode#doUnsupported}
*
*/
@CompilationFinal private int state_0_;
private SetFunctionNameNodeGen() {
}
@SuppressWarnings("static-method")
private boolean fallbackGuard_(int state_0, Object arg0Value, Object arg1Value, TruffleString arg2Value) {
if (arg0Value instanceof JSFunctionObject) {
if (!((state_0 & 0b1) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, TruffleString, TruffleString)] */) && arg1Value instanceof TruffleString && (arg2Value == null || Strings.isEmpty(arg2Value))) {
return false;
}
if (!((state_0 & 0b10) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, Symbol, TruffleString)] */) && arg1Value instanceof Symbol && (arg2Value == null || Strings.isEmpty(arg2Value))) {
return false;
}
if (!((state_0 & 0b100) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, TruffleString, TruffleString)] */) && arg1Value instanceof TruffleString && (arg2Value != null) && (!(Strings.isEmpty(arg2Value)))) {
return false;
}
if (!((state_0 & 0b1000) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, Symbol, TruffleString)] */) && arg1Value instanceof Symbol && (arg2Value != null) && (!(Strings.isEmpty(arg2Value)))) {
return false;
}
}
return true;
}
@Override
public void execute(Object arg0Value, Object arg1Value, TruffleString arg2Value) {
int state_0 = this.state_0_;
if (state_0 != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, TruffleString, TruffleString)] || SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, Symbol, TruffleString)] || SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, TruffleString, TruffleString)] || SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, Symbol, TruffleString)] || SpecializationActive[SetFunctionNameNode.doUnsupported(Object, Object, TruffleString)] */) {
if ((state_0 & 0b1111) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, TruffleString, TruffleString)] || SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, Symbol, TruffleString)] || SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, TruffleString, TruffleString)] || SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, Symbol, TruffleString)] */ && arg0Value instanceof JSFunctionObject) {
JSFunctionObject arg0Value_ = (JSFunctionObject) arg0Value;
if ((state_0 & 0b1) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, TruffleString, TruffleString)] */ && arg1Value instanceof TruffleString) {
TruffleString arg1Value_ = (TruffleString) arg1Value;
if ((arg2Value == null || Strings.isEmpty(arg2Value))) {
SetFunctionNameNode.doJSFunctionNoPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
if ((state_0 & 0b10) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, Symbol, TruffleString)] */ && arg1Value instanceof Symbol) {
Symbol arg1Value_ = (Symbol) arg1Value;
if ((arg2Value == null || Strings.isEmpty(arg2Value))) {
SetFunctionNameNode.doJSFunctionNoPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
if ((state_0 & 0b100) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, TruffleString, TruffleString)] */ && arg1Value instanceof TruffleString) {
TruffleString arg1Value_ = (TruffleString) arg1Value;
if ((arg2Value != null) && (!(Strings.isEmpty(arg2Value)))) {
SetFunctionNameNode.doJSFunctionWithPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
if ((state_0 & 0b1000) != 0 /* is SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, Symbol, TruffleString)] */ && arg1Value instanceof Symbol) {
Symbol arg1Value_ = (Symbol) arg1Value;
if ((arg2Value != null) && (!(Strings.isEmpty(arg2Value)))) {
SetFunctionNameNode.doJSFunctionWithPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
}
if ((state_0 & 0b10000) != 0 /* is SpecializationActive[SetFunctionNameNode.doUnsupported(Object, Object, TruffleString)] */) {
if (fallbackGuard_(state_0, arg0Value, arg1Value, arg2Value)) {
SetFunctionNameNode.doUnsupported(arg0Value, arg1Value, arg2Value);
return;
}
}
}
CompilerDirectives.transferToInterpreterAndInvalidate();
executeAndSpecialize(arg0Value, arg1Value, arg2Value);
return;
}
private void executeAndSpecialize(Object arg0Value, Object arg1Value, TruffleString arg2Value) {
int state_0 = this.state_0_;
if (arg0Value instanceof JSFunctionObject) {
JSFunctionObject arg0Value_ = (JSFunctionObject) arg0Value;
if (arg1Value instanceof TruffleString) {
TruffleString arg1Value_ = (TruffleString) arg1Value;
if ((arg2Value == null || Strings.isEmpty(arg2Value))) {
state_0 = state_0 | 0b1 /* add SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, TruffleString, TruffleString)] */;
this.state_0_ = state_0;
SetFunctionNameNode.doJSFunctionNoPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
if (arg1Value instanceof Symbol) {
Symbol arg1Value_ = (Symbol) arg1Value;
if ((arg2Value == null || Strings.isEmpty(arg2Value))) {
state_0 = state_0 | 0b10 /* add SpecializationActive[SetFunctionNameNode.doJSFunctionNoPrefix(JSFunctionObject, Symbol, TruffleString)] */;
this.state_0_ = state_0;
SetFunctionNameNode.doJSFunctionNoPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
if (arg1Value instanceof TruffleString) {
TruffleString arg1Value_ = (TruffleString) arg1Value;
if ((arg2Value != null) && (!(Strings.isEmpty(arg2Value)))) {
state_0 = state_0 | 0b100 /* add SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, TruffleString, TruffleString)] */;
this.state_0_ = state_0;
SetFunctionNameNode.doJSFunctionWithPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
if (arg1Value instanceof Symbol) {
Symbol arg1Value_ = (Symbol) arg1Value;
if ((arg2Value != null) && (!(Strings.isEmpty(arg2Value)))) {
state_0 = state_0 | 0b1000 /* add SpecializationActive[SetFunctionNameNode.doJSFunctionWithPrefix(JSFunctionObject, Symbol, TruffleString)] */;
this.state_0_ = state_0;
SetFunctionNameNode.doJSFunctionWithPrefix(arg0Value_, arg1Value_, arg2Value);
return;
}
}
}
state_0 = state_0 | 0b10000 /* add SpecializationActive[SetFunctionNameNode.doUnsupported(Object, Object, TruffleString)] */;
this.state_0_ = state_0;
SetFunctionNameNode.doUnsupported(arg0Value, arg1Value, arg2Value);
return;
}
@NeverDefault
public static SetFunctionNameNode create() {
return new SetFunctionNameNodeGen();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy