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

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

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

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

/**
 * Debug Info: 
 *   Specialization {@link GetTemplateObjectNode#doCached}
 *     Activation probability: 0.65000
 *     With/without class size: 14/4 bytes
 *   Specialization {@link GetTemplateObjectNode#doUncached}
 *     Activation probability: 0.35000
 *     With/without class size: 8/0 bytes
 * 
*/ @GeneratedBy(GetTemplateObjectNode.class) @SuppressWarnings("javadoc") public final class GetTemplateObjectNodeGen extends GetTemplateObjectNode { /** * State Info:
     *   0: SpecializationActive {@link GetTemplateObjectNode#doCached}
     *   1: SpecializationActive {@link GetTemplateObjectNode#doUncached}
     * 
*/ @CompilationFinal private int state_0_; /** * Source Info:
     *   Specialization: {@link GetTemplateObjectNode#doCached}
     *   Parameter: {@link JSDynamicObject} cachedTemplate
*/ @CompilationFinal private JSDynamicObject cached_cachedTemplate_; @CompilationFinal private Assumption cached_assumption0_; private GetTemplateObjectNodeGen(JSContext context, ArrayLiteralNode rawStrings, ArrayLiteralNode cookedStrings) { super(context, rawStrings, cookedStrings); } private GetTemplateObjectNodeGen(JSContext context, ArrayLiteralNode rawStrings, ArrayLiteralNode cookedStrings, Object identity) { super(context, rawStrings, cookedStrings, identity); } @Override public Object execute(VirtualFrame frameValue) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[GetTemplateObjectNode.doCached(VirtualFrame, JSDynamicObject)] || SpecializationActive[GetTemplateObjectNode.doUncached(VirtualFrame)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetTemplateObjectNode.doCached(VirtualFrame, JSDynamicObject)] */) { if (!Assumption.isValidAssumption(this.cached_assumption0_)) { CompilerDirectives.transferToInterpreterAndInvalidate(); removeCached_(); return executeAndSpecialize(frameValue); } { JSDynamicObject cachedTemplate__ = this.cached_cachedTemplate_; if (cachedTemplate__ != null) { assert DSLSupport.assertIdempotence((!(context.isMultiContext()))); return doCached(frameValue, cachedTemplate__); } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[GetTemplateObjectNode.doUncached(VirtualFrame)] */) { return doUncached(frameValue); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(frameValue); } @Override public void executeVoid(VirtualFrame frameValue) { execute(frameValue); return; } private JSDynamicObject executeAndSpecialize(VirtualFrame frameValue) { int state_0 = this.state_0_; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[GetTemplateObjectNode.doUncached(VirtualFrame)] */) { if ((!(context.isMultiContext()))) { Assumption cached_assumption0 = (context.getSingleRealmAssumption()); if (Assumption.isValidAssumption(cached_assumption0)) { JSDynamicObject cachedTemplate__ = (doUncached(frameValue)); Objects.requireNonNull(cachedTemplate__, "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_cachedTemplate_ = cachedTemplate__; this.cached_assumption0_ = cached_assumption0; state_0 = state_0 | 0b1 /* add SpecializationActive[GetTemplateObjectNode.doCached(VirtualFrame, JSDynamicObject)] */; this.state_0_ = state_0; return doCached(frameValue, cachedTemplate__); } } } this.cached_cachedTemplate_ = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[GetTemplateObjectNode.doCached(VirtualFrame, JSDynamicObject)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[GetTemplateObjectNode.doUncached(VirtualFrame)] */; this.state_0_ = state_0; return doUncached(frameValue); } void removeCached_() { this.state_0_ = state_0_ & 0xfffffffe /* remove SpecializationActive[GetTemplateObjectNode.doCached(VirtualFrame, JSDynamicObject)] */; } @NeverDefault public static GetTemplateObjectNode create(JSContext context, ArrayLiteralNode rawStrings, ArrayLiteralNode cookedStrings) { return new GetTemplateObjectNodeGen(context, rawStrings, cookedStrings); } @NeverDefault public static GetTemplateObjectNode create(JSContext context, ArrayLiteralNode rawStrings, ArrayLiteralNode cookedStrings, Object identity) { return new GetTemplateObjectNodeGen(context, rawStrings, cookedStrings, identity); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy