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

com.oracle.truffle.js.nodes.access.DeclareGlobalLexicalVariableNodeGen Maven / Gradle / Ivy

// CheckStyle: start generated
package com.oracle.truffle.js.nodes.access;

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.JSContext;
import com.oracle.truffle.js.runtime.objects.JSDynamicObject;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link DeclareGlobalLexicalVariableNode#doCached}
 *     Activation probability: 0.65000
 *     With/without class size: 17/4 bytes
 *   Specialization {@link DeclareGlobalLexicalVariableNode#doUncached}
 *     Activation probability: 0.35000
 *     With/without class size: 8/0 bytes
 * 
*/ @GeneratedBy(DeclareGlobalLexicalVariableNode.class) @SuppressWarnings("javadoc") public final class DeclareGlobalLexicalVariableNodeGen extends DeclareGlobalLexicalVariableNode { /** * State Info:
     *   0: SpecializationActive {@link DeclareGlobalLexicalVariableNode#doCached}
     *   1: SpecializationActive {@link DeclareGlobalLexicalVariableNode#doUncached}
     * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
     *   Specialization: {@link DeclareGlobalLexicalVariableNode#doCached}
     *   Parameter: {@link PropertySetNode} cache
*/ @Child private PropertySetNode cached_cache_; private DeclareGlobalLexicalVariableNodeGen(TruffleString varName, boolean isConst) { super(varName, isConst); } @Override protected void executeVoid(JSDynamicObject arg0Value, JSContext arg1Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[DeclareGlobalLexicalVariableNode.doCached(JSDynamicObject, JSContext, PropertySetNode)] || SpecializationActive[DeclareGlobalLexicalVariableNode.doUncached(JSDynamicObject, JSContext)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[DeclareGlobalLexicalVariableNode.doCached(JSDynamicObject, JSContext, PropertySetNode)] */) { { PropertySetNode cache__ = this.cached_cache_; if (cache__ != null) { if ((arg1Value.getPropertyCacheLimit() > 0)) { doCached(arg0Value, arg1Value, cache__); return; } } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[DeclareGlobalLexicalVariableNode.doUncached(JSDynamicObject, JSContext)] */) { doUncached(arg0Value, arg1Value); return; } } CompilerDirectives.transferToInterpreterAndInvalidate(); executeAndSpecialize(arg0Value, arg1Value); return; } private void executeAndSpecialize(JSDynamicObject arg0Value, JSContext arg1Value) { int state_0 = this.state_0_; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[DeclareGlobalLexicalVariableNode.doUncached(JSDynamicObject, JSContext)] */) { if ((arg1Value.getPropertyCacheLimit() > 0)) { PropertySetNode cache__ = this.insert((makeDefineOwnPropertyCache(arg1Value))); Objects.requireNonNull(cache__, "A specialization cache returned a default value. The cache initializer must never return a default value for this cache. Use @Cached(neverDefault=false) to allow default values for this cached value or make sure the cache initializer never returns the default value."); VarHandle.storeStoreFence(); this.cached_cache_ = cache__; state_0 = state_0 | 0b1 /* add SpecializationActive[DeclareGlobalLexicalVariableNode.doCached(JSDynamicObject, JSContext, PropertySetNode)] */; this.state_0_ = state_0; doCached(arg0Value, arg1Value, cache__); return; } } this.cached_cache_ = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[DeclareGlobalLexicalVariableNode.doCached(JSDynamicObject, JSContext, PropertySetNode)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[DeclareGlobalLexicalVariableNode.doUncached(JSDynamicObject, JSContext)] */; this.state_0_ = state_0; doUncached(arg0Value, arg1Value); return; } @NeverDefault public static DeclareGlobalLexicalVariableNode create(TruffleString varName, boolean isConst) { return new DeclareGlobalLexicalVariableNodeGen(varName, isConst); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy