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

com.oracle.truffle.js.nodes.access.HasOnlyShapePropertiesNodeGen 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.DSLSupport;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.dsl.NeverDefault;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.UnsafeAccessedField;
import com.oracle.truffle.api.nodes.DenyReplace;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.js.runtime.JSConfig;
import com.oracle.truffle.js.runtime.JSContext;
import com.oracle.truffle.js.runtime.builtins.JSClass;
import com.oracle.truffle.js.runtime.objects.JSDynamicObject;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link HasOnlyShapePropertiesNode#doCached}
 *     Activation probability: 0.48333
 *     With/without class size: 13/4 bytes
 *   Specialization {@link HasOnlyShapePropertiesNode#doObjectPrototype}
 *     Activation probability: 0.33333
 *     With/without class size: 9/4 bytes
 *   Specialization {@link HasOnlyShapePropertiesNode#doUncached}
 *     Activation probability: 0.18333
 *     With/without class size: 6/0 bytes
 * 
*/ @GeneratedBy(HasOnlyShapePropertiesNode.class) @SuppressWarnings("javadoc") public final class HasOnlyShapePropertiesNodeGen extends HasOnlyShapePropertiesNode { static final ReferenceField CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached_cache", CachedData.class); /** * State Info:
     *   0: SpecializationActive {@link HasOnlyShapePropertiesNode#doCached}
     *   1: SpecializationActive {@link HasOnlyShapePropertiesNode#doUncached}
     *   2: SpecializationActive {@link HasOnlyShapePropertiesNode#doObjectPrototype}
     * 
*/ @CompilationFinal private int state_0_; @UnsafeAccessedField @CompilationFinal private CachedData cached_cache; /** * Source Info:
     *   Specialization: {@link HasOnlyShapePropertiesNode#doObjectPrototype}
     *   Parameter: {@link JSContext} context
*/ @CompilationFinal private JSContext objectPrototype_context_; private HasOnlyShapePropertiesNodeGen() { } @ExplodeLoop @Override public boolean execute(JSDynamicObject arg0Value, JSClass arg1Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[HasOnlyShapePropertiesNode.doCached(JSDynamicObject, JSClass, JSClass)] || SpecializationActive[HasOnlyShapePropertiesNode.doObjectPrototype(JSDynamicObject, JSClass, JSContext)] || SpecializationActive[HasOnlyShapePropertiesNode.doUncached(JSDynamicObject, JSClass)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[HasOnlyShapePropertiesNode.doCached(JSDynamicObject, JSClass, JSClass)] */) { CachedData s0_ = this.cached_cache; while (s0_ != null) { if ((arg1Value == s0_.cachedJSClass_)) { assert DSLSupport.assertIdempotence((!(HasOnlyShapePropertiesNode.isJSObjectPrototype(s0_.cachedJSClass_)))); return HasOnlyShapePropertiesNode.doCached(arg0Value, arg1Value, s0_.cachedJSClass_); } s0_ = s0_.next_; } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[HasOnlyShapePropertiesNode.doObjectPrototype(JSDynamicObject, JSClass, JSContext)] */) { { JSContext context__ = this.objectPrototype_context_; if (context__ != null) { if ((HasOnlyShapePropertiesNode.isJSObjectPrototype(arg1Value))) { return HasOnlyShapePropertiesNode.doObjectPrototype(arg0Value, arg1Value, context__); } } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[HasOnlyShapePropertiesNode.doUncached(JSDynamicObject, JSClass)] */) { return HasOnlyShapePropertiesNode.doUncached(arg0Value, arg1Value); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value); } private boolean executeAndSpecialize(JSDynamicObject arg0Value, JSClass arg1Value) { int state_0 = this.state_0_; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[HasOnlyShapePropertiesNode.doUncached(JSDynamicObject, JSClass)] */) { while (true) { int count0_ = 0; CachedData s0_ = CACHED_CACHE_UPDATER.getVolatile(this); CachedData s0_original = s0_; while (s0_ != null) { if ((arg1Value == s0_.cachedJSClass_)) { assert DSLSupport.assertIdempotence((!(HasOnlyShapePropertiesNode.isJSObjectPrototype(s0_.cachedJSClass_)))); break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { { JSClass cachedJSClass__ = (arg1Value); // assert (arg1Value == s0_.cachedJSClass_); if ((!(HasOnlyShapePropertiesNode.isJSObjectPrototype(cachedJSClass__))) && count0_ < (JSConfig.InteropLibraryLimit)) { s0_ = new CachedData(s0_original); s0_.cachedJSClass_ = cachedJSClass__; if (!CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[HasOnlyShapePropertiesNode.doCached(JSDynamicObject, JSClass, JSClass)] */; this.state_0_ = state_0; } } } if (s0_ != null) { return HasOnlyShapePropertiesNode.doCached(arg0Value, arg1Value, s0_.cachedJSClass_); } break; } } if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[HasOnlyShapePropertiesNode.doUncached(JSDynamicObject, JSClass)] */) { if ((HasOnlyShapePropertiesNode.isJSObjectPrototype(arg1Value))) { JSContext context__ = (getLanguage().getJSContext()); Objects.requireNonNull(context__, "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.objectPrototype_context_ = context__; state_0 = state_0 | 0b100 /* add SpecializationActive[HasOnlyShapePropertiesNode.doObjectPrototype(JSDynamicObject, JSClass, JSContext)] */; this.state_0_ = state_0; return HasOnlyShapePropertiesNode.doObjectPrototype(arg0Value, arg1Value, context__); } } this.cached_cache = null; this.objectPrototype_context_ = null; state_0 = state_0 & 0xfffffffa /* remove SpecializationActive[HasOnlyShapePropertiesNode.doCached(JSDynamicObject, JSClass, JSClass)], SpecializationActive[HasOnlyShapePropertiesNode.doObjectPrototype(JSDynamicObject, JSClass, JSContext)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[HasOnlyShapePropertiesNode.doUncached(JSDynamicObject, JSClass)] */; this.state_0_ = state_0; return HasOnlyShapePropertiesNode.doUncached(arg0Value, arg1Value); } @NeverDefault public static HasOnlyShapePropertiesNode create() { return new HasOnlyShapePropertiesNodeGen(); } @GeneratedBy(HasOnlyShapePropertiesNode.class) @DenyReplace private static final class CachedData implements SpecializationDataNode { @CompilationFinal final CachedData next_; /** * Source Info:
         *   Specialization: {@link HasOnlyShapePropertiesNode#doCached}
         *   Parameter: {@link JSClass} cachedJSClass
*/ @CompilationFinal JSClass cachedJSClass_; CachedData(CachedData next_) { this.next_ = next_; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy