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

com.oracle.truffle.js.builtins.helper.JSRegExpExecIntlNodeGen Maven / Gradle / Ivy

// CheckStyle: start generated
package com.oracle.truffle.js.builtins.helper;

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.dsl.UnsupportedSpecializationException;
import com.oracle.truffle.api.dsl.DSLSupport.SpecializationDataNode;
import com.oracle.truffle.api.dsl.InlineSupport.InlineTarget;
import com.oracle.truffle.api.dsl.InlineSupport.IntField;
import com.oracle.truffle.api.dsl.InlineSupport.ReferenceField;
import com.oracle.truffle.api.dsl.InlineSupport.StateField;
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.api.nodes.Node;
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
import com.oracle.truffle.api.profiles.InlinedCountingConditionProfile;
import com.oracle.truffle.api.strings.TruffleString;
import com.oracle.truffle.js.nodes.access.IsJSClassNode;
import com.oracle.truffle.js.runtime.JSContext;
import com.oracle.truffle.js.runtime.builtins.JSObjectFactory;
import com.oracle.truffle.js.runtime.builtins.JSRegExp;
import com.oracle.truffle.js.runtime.builtins.JSRegExpObject;
import com.oracle.truffle.js.runtime.objects.JSDynamicObject;
import com.oracle.truffle.js.runtime.util.TRegexUtil.InteropReadBooleanMemberNode;
import com.oracle.truffle.js.runtime.util.TRegexUtil.InteropReadIntMemberNode;
import com.oracle.truffle.js.runtime.util.TRegexUtil.InteropReadMemberNode;
import com.oracle.truffle.js.runtime.util.TRegexUtil.InvokeExecMethodNode;
import com.oracle.truffle.js.runtime.util.TRegexUtil.InvokeGetGroupBoundariesMethodNode;
import com.oracle.truffle.js.runtime.util.TRegexUtilFactory.InteropReadBooleanMemberNodeGen;
import com.oracle.truffle.js.runtime.util.TRegexUtilFactory.InteropReadIntMemberNodeGen;
import com.oracle.truffle.js.runtime.util.TRegexUtilFactory.InteropReadMemberNodeGen;
import com.oracle.truffle.js.runtime.util.TRegexUtilFactory.InvokeExecMethodNodeGen;
import com.oracle.truffle.js.runtime.util.TRegexUtilFactory.InvokeGetGroupBoundariesMethodNodeGen;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.util.Objects;

/**
 * Debug Info: 
 *   Specialization {@link JSRegExpExecIntlNode#doRegExp}
 *     Activation probability: 0.65000
 *     With/without class size: 19/5 bytes
 *   Specialization {@link JSRegExpExecIntlNode#doOther}
 *     Activation probability: 0.35000
 *     With/without class size: 9/0 bytes
 * 
*/ @GeneratedBy(JSRegExpExecIntlNode.class) @SuppressWarnings({"javadoc", "unused"}) public final class JSRegExpExecIntlNodeGen extends JSRegExpExecIntlNode { private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); private static final StateField STATE_0_JSRegExpExecIntlNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
     *   Specialization: {@link JSRegExpExecIntlNode#doRegExp}
     *   Parameter: {@link InlinedConditionProfile} isCallableProfile
     *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_IS_CALLABLE_PROFILE = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_UPDATER.subUpdater(4, 2))); /** * Source Info:
     *   Specialization: {@link JSRegExpExecIntlNode#doRegExp}
     *   Parameter: {@link InlinedConditionProfile} validResultProfile
     *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_VALID_RESULT_PROFILE = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_UPDATER.subUpdater(6, 2))); /** * Source Info:
     *   Specialization: {@link JSRegExpExecIntlNode#doRegExp}
     *   Parameter: {@link InlinedConditionProfile} isPristineProfile
     *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_REG_EXP_IS_PRISTINE_PROFILE_ = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_JSRegExpExecIntlNode_UPDATER.subUpdater(2, 2))); /** * State Info:
     *   0: SpecializationActive {@link JSRegExpExecIntlNode#doRegExp}
     *   1: SpecializationActive {@link JSRegExpExecIntlNode#doOther}
     *   2-3: InlinedCache
     *        Specialization: {@link JSRegExpExecIntlNode#doRegExp}
     *        Parameter: {@link InlinedConditionProfile} isPristineProfile
     *        Inline method: {@link InlinedConditionProfile#inline}
     *   4-5: InlinedCache
     *        Specialization: {@link JSRegExpExecIntlNode#doRegExp}
     *        Parameter: {@link InlinedConditionProfile} isCallableProfile
     *        Inline method: {@link InlinedConditionProfile#inline}
     *   6-7: InlinedCache
     *        Specialization: {@link JSRegExpExecIntlNode#doRegExp}
     *        Parameter: {@link InlinedConditionProfile} validResultProfile
     *        Inline method: {@link InlinedConditionProfile#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
     *   Specialization: {@link JSRegExpExecIntlNode#doRegExp}
     *   Parameter: {@link JSRegExpExecBuiltinNode} builtinExec
*/ @Child private JSRegExpExecBuiltinNode regExp_builtinExec_; private JSRegExpExecIntlNodeGen(JSContext context) { super(context); } @SuppressWarnings("static-method") private boolean fallbackGuard_(int state_0, Object arg0Value, TruffleString arg1Value) { if (!((state_0 & 0b1) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.doRegExp(JSRegExpObject, TruffleString, JSRegExpExecBuiltinNode, InlinedConditionProfile, InlinedConditionProfile, InlinedConditionProfile)] */) && arg0Value instanceof JSRegExpObject) { return false; } return true; } @Override public Object execute(Object arg0Value, TruffleString arg1Value) { int state_0 = this.state_0_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.doRegExp(JSRegExpObject, TruffleString, JSRegExpExecBuiltinNode, InlinedConditionProfile, InlinedConditionProfile, InlinedConditionProfile)] || SpecializationActive[JSRegExpExecIntlNode.doOther(Object, TruffleString, InlinedConditionProfile, InlinedConditionProfile)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.doRegExp(JSRegExpObject, TruffleString, JSRegExpExecBuiltinNode, InlinedConditionProfile, InlinedConditionProfile, InlinedConditionProfile)] */ && arg0Value instanceof JSRegExpObject) { JSRegExpObject arg0Value_ = (JSRegExpObject) arg0Value; { JSRegExpExecBuiltinNode builtinExec__ = this.regExp_builtinExec_; if (builtinExec__ != null) { return doRegExp(arg0Value_, arg1Value, builtinExec__, INLINED_REG_EXP_IS_PRISTINE_PROFILE_, INLINED_IS_CALLABLE_PROFILE, INLINED_VALID_RESULT_PROFILE); } } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.doOther(Object, TruffleString, InlinedConditionProfile, InlinedConditionProfile)] */) { if (fallbackGuard_(state_0, arg0Value, arg1Value)) { return doOther(arg0Value, arg1Value, INLINED_IS_CALLABLE_PROFILE, INLINED_VALID_RESULT_PROFILE); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value); } private Object executeAndSpecialize(Object arg0Value, TruffleString arg1Value) { int state_0 = this.state_0_; if (arg0Value instanceof JSRegExpObject) { JSRegExpObject arg0Value_ = (JSRegExpObject) arg0Value; JSRegExpExecBuiltinNode builtinExec__ = this.insert((JSRegExpExecBuiltinNode.create(context))); Objects.requireNonNull(builtinExec__, "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.regExp_builtinExec_ = builtinExec__; state_0 = state_0 | 0b1 /* add SpecializationActive[JSRegExpExecIntlNode.doRegExp(JSRegExpObject, TruffleString, JSRegExpExecBuiltinNode, InlinedConditionProfile, InlinedConditionProfile, InlinedConditionProfile)] */; this.state_0_ = state_0; return doRegExp(arg0Value_, arg1Value, builtinExec__, INLINED_REG_EXP_IS_PRISTINE_PROFILE_, INLINED_IS_CALLABLE_PROFILE, INLINED_VALID_RESULT_PROFILE); } state_0 = state_0 | 0b10 /* add SpecializationActive[JSRegExpExecIntlNode.doOther(Object, TruffleString, InlinedConditionProfile, InlinedConditionProfile)] */; this.state_0_ = state_0; return doOther(arg0Value, arg1Value, INLINED_IS_CALLABLE_PROFILE, INLINED_VALID_RESULT_PROFILE); } @NeverDefault public static JSRegExpExecIntlNode create(JSContext context) { return new JSRegExpExecIntlNodeGen(context); } /** * Debug Info:
     *   Specialization {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
     *     Activation probability: 0.65000
     *     With/without class size: 19/4 bytes
     *   Specialization {@link JSRegExpExecIntlIgnoreLastIndexNode#doUncached}
     *     Activation probability: 0.35000
     *     With/without class size: 9/0 bytes
     * 
*/ @GeneratedBy(JSRegExpExecIntlIgnoreLastIndexNode.class) @SuppressWarnings("javadoc") public static final class JSRegExpExecIntlIgnoreLastIndexNodeGen extends JSRegExpExecIntlIgnoreLastIndexNode { private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); static final ReferenceField CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached_cache", CachedData.class); /** * Source Info:
         *   Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *   Parameter: {@link InlinedConditionProfile} areLegacyFeaturesEnabled
         *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_ARE_LEGACY_FEATURES_ENABLED = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_UPDATER.subUpdater(2, 2))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *   Parameter: {@link InvokeExecMethodNode} invokeExec
         *   Inline method: {@link InvokeExecMethodNodeGen#inline}
*/ private static final InvokeExecMethodNode INLINED_INVOKE_EXEC = InvokeExecMethodNodeGen.inline(InlineTarget.create(InvokeExecMethodNode.class, STATE_0_UPDATER.subUpdater(4, 2), ReferenceField.create(MethodHandles.lookup(), "invokeExec_field1_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
*/ private static final InteropReadBooleanMemberNode INLINED_READ_IS_MATCH = InteropReadBooleanMemberNodeGen.inline(InlineTarget.create(InteropReadBooleanMemberNode.class, STATE_0_UPDATER.subUpdater(6, 5), ReferenceField.create(MethodHandles.lookup(), "readIsMatch_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "readIsMatch_field2_", Node.class))); /** * State Info:
         *   0: SpecializationActive {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *   1: SpecializationActive {@link JSRegExpExecIntlIgnoreLastIndexNode#doUncached}
         *   2-3: InlinedCache
         *        Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *        Parameter: {@link InlinedConditionProfile} areLegacyFeaturesEnabled
         *        Inline method: {@link InlinedConditionProfile#inline}
         *   4-5: InlinedCache
         *        Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *        Parameter: {@link InvokeExecMethodNode} invokeExec
         *        Inline method: {@link InvokeExecMethodNodeGen#inline}
         *   6-10: InlinedCache
         *        Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *        Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *        Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *   Parameter: {@link InvokeExecMethodNode} invokeExec
         *   Inline method: {@link InvokeExecMethodNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node invokeExec_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readIsMatch_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readIsMatch_field2_; @UnsafeAccessedField @Child private CachedData cached_cache; private JSRegExpExecIntlIgnoreLastIndexNodeGen(JSContext context, boolean doStaticResultUpdate) { super(context, doStaticResultUpdate); } @ExplodeLoop @Override public Object execute(JSRegExpObject arg0Value, Object arg1Value, long arg2Value) { int state_0 = this.state_0_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doCached(JSRegExpObject, TruffleString, long, Object, Node, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] || SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doUncached(JSRegExpObject, TruffleString, long, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] */ && arg1Value instanceof TruffleString) { TruffleString arg1Value_ = (TruffleString) arg1Value; if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doCached(JSRegExpObject, TruffleString, long, Object, Node, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] */) { CachedData s0_ = this.cached_cache; while (s0_ != null) { if ((JSRegExp.getCompiledRegex(arg0Value) == s0_.cachedCompiledRegex_)) { Node node__ = (this); return doCached(arg0Value, arg1Value_, arg2Value, s0_.cachedCompiledRegex_, node__, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_INVOKE_EXEC, INLINED_READ_IS_MATCH); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doUncached(JSRegExpObject, TruffleString, long, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] */) { return doUncached(arg0Value, arg1Value_, arg2Value, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_INVOKE_EXEC, INLINED_READ_IS_MATCH); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value, arg2Value); } @SuppressWarnings("unused") private Object executeAndSpecialize(JSRegExpObject arg0Value, Object arg1Value, long arg2Value) { int state_0 = this.state_0_; if (arg1Value instanceof TruffleString) { TruffleString arg1Value_ = (TruffleString) arg1Value; { Node node__ = null; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doUncached(JSRegExpObject, TruffleString, long, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] */) { while (true) { int count0_ = 0; CachedData s0_ = CACHED_CACHE_UPDATER.getVolatile(this); CachedData s0_original = s0_; while (s0_ != null) { if ((JSRegExp.getCompiledRegex(arg0Value) == s0_.cachedCompiledRegex_)) { node__ = (this); break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { { Object cachedCompiledRegex__ = (JSRegExp.getCompiledRegex(arg0Value)); if ((JSRegExp.getCompiledRegex(arg0Value) == cachedCompiledRegex__) && count0_ < (JSRegExpExecIntlNode.LIMIT)) { s0_ = this.insert(new CachedData(s0_original)); Objects.requireNonNull(cachedCompiledRegex__, "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."); s0_.cachedCompiledRegex_ = cachedCompiledRegex__; node__ = (this); if (!CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doCached(JSRegExpObject, TruffleString, long, Object, Node, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] */; this.state_0_ = state_0; } } } if (s0_ != null) { return doCached(arg0Value, arg1Value_, arg2Value, s0_.cachedCompiledRegex_, node__, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_INVOKE_EXEC, INLINED_READ_IS_MATCH); } break; } } } this.cached_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doCached(JSRegExpObject, TruffleString, long, Object, Node, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecIntlIgnoreLastIndexNode.doUncached(JSRegExpObject, TruffleString, long, InlinedConditionProfile, InvokeExecMethodNode, InteropReadBooleanMemberNode)] */; this.state_0_ = state_0; return doUncached(arg0Value, arg1Value_, arg2Value, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_INVOKE_EXEC, INLINED_READ_IS_MATCH); } throw new UnsupportedSpecializationException(this, null, arg0Value, arg1Value, arg2Value); } @NeverDefault public static JSRegExpExecIntlIgnoreLastIndexNode create(JSContext context, boolean doStaticResultUpdate) { return new JSRegExpExecIntlIgnoreLastIndexNodeGen(context, doStaticResultUpdate); } @GeneratedBy(JSRegExpExecIntlIgnoreLastIndexNode.class) @DenyReplace private static final class CachedData extends Node implements SpecializationDataNode { @Child CachedData next_; /** * Source Info:
             *   Specialization: {@link JSRegExpExecIntlIgnoreLastIndexNode#doCached}
             *   Parameter: {@link Object} cachedCompiledRegex
*/ @CompilationFinal Object cachedCompiledRegex_; CachedData(CachedData next_) { this.next_ = next_; } } } /** * Debug Info:
     *   Specialization {@link BuildGroupsObjectNode#doCachedGroupsFactory}
     *     Activation probability: 0.65000
     *     With/without class size: 24/12 bytes
     *   Specialization {@link BuildGroupsObjectNode#doVaryingGroupsFactory}
     *     Activation probability: 0.35000
     *     With/without class size: 8/0 bytes
     * 
*/ @GeneratedBy(BuildGroupsObjectNode.class) @SuppressWarnings("javadoc") public static final class BuildGroupsObjectNodeGen extends BuildGroupsObjectNode { static final ReferenceField CACHED_GROUPS_FACTORY_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cachedGroupsFactory_cache", CachedGroupsFactoryData.class); /** * State Info:
         *   0: SpecializationActive {@link BuildGroupsObjectNode#doCachedGroupsFactory}
         *   1: SpecializationActive {@link BuildGroupsObjectNode#doVaryingGroupsFactory}
         * 
*/ @CompilationFinal private int state_0_; @UnsafeAccessedField @Child private CachedGroupsFactoryData cachedGroupsFactory_cache; private BuildGroupsObjectNodeGen() { } @ExplodeLoop @Override public JSDynamicObject execute(JSDynamicObject arg0Value, Object arg1Value, Object arg2Value, boolean arg3Value) { int state_0 = this.state_0_; if (state_0 != 0 /* is SpecializationActive[JSRegExpExecIntlNode.BuildGroupsObjectNode.doCachedGroupsFactory(JSDynamicObject, Object, TruffleString, boolean, Object, JSObjectFactory, IsJSClassNode)] || SpecializationActive[JSRegExpExecIntlNode.BuildGroupsObjectNode.doVaryingGroupsFactory(JSDynamicObject, Object, TruffleString, boolean)] */ && arg2Value instanceof TruffleString) { TruffleString arg2Value_ = (TruffleString) arg2Value; if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.BuildGroupsObjectNode.doCachedGroupsFactory(JSDynamicObject, Object, TruffleString, boolean, Object, JSObjectFactory, IsJSClassNode)] */) { CachedGroupsFactoryData s0_ = this.cachedGroupsFactory_cache; while (s0_ != null) { if ((JSRegExp.getGroupsFactory(arg0Value) == s0_.cachedGroupsFactory_ || JSRegExp.getCompiledRegex(arg0Value) == s0_.cachedCompiledRegex_)) { return doCachedGroupsFactory(arg0Value, arg1Value, arg2Value_, arg3Value, s0_.cachedCompiledRegex_, s0_.cachedGroupsFactory_, s0_.isJSRegExpNode_); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.BuildGroupsObjectNode.doVaryingGroupsFactory(JSDynamicObject, Object, TruffleString, boolean)] */) { return doVaryingGroupsFactory(arg0Value, arg1Value, arg2Value_, arg3Value); } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value, arg2Value, arg3Value); } @SuppressWarnings("unused") private JSDynamicObject executeAndSpecialize(JSDynamicObject arg0Value, Object arg1Value, Object arg2Value, boolean arg3Value) { int state_0 = this.state_0_; if (arg2Value instanceof TruffleString) { TruffleString arg2Value_ = (TruffleString) arg2Value; while (true) { int count0_ = 0; CachedGroupsFactoryData s0_ = CACHED_GROUPS_FACTORY_CACHE_UPDATER.getVolatile(this); CachedGroupsFactoryData s0_original = s0_; while (s0_ != null) { if ((JSRegExp.getGroupsFactory(arg0Value) == s0_.cachedGroupsFactory_ || JSRegExp.getCompiledRegex(arg0Value) == s0_.cachedCompiledRegex_)) { break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { { Object cachedCompiledRegex__ = (JSRegExp.getCompiledRegex(arg0Value)); JSObjectFactory cachedGroupsFactory__ = (JSRegExp.getGroupsFactory(arg0Value)); if ((JSRegExp.getGroupsFactory(arg0Value) == cachedGroupsFactory__ || JSRegExp.getCompiledRegex(arg0Value) == cachedCompiledRegex__) && count0_ < (JSRegExpExecIntlNode.LIMIT)) { s0_ = this.insert(new CachedGroupsFactoryData(s0_original)); Objects.requireNonNull(cachedCompiledRegex__, "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."); s0_.cachedCompiledRegex_ = cachedCompiledRegex__; s0_.cachedGroupsFactory_ = cachedGroupsFactory__; IsJSClassNode isJSRegExpNode__ = s0_.insert((JSRegExpExecIntlNode.createIsJSRegExpNode())); Objects.requireNonNull(isJSRegExpNode__, "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."); s0_.isJSRegExpNode_ = isJSRegExpNode__; if (!CACHED_GROUPS_FACTORY_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[JSRegExpExecIntlNode.BuildGroupsObjectNode.doCachedGroupsFactory(JSDynamicObject, Object, TruffleString, boolean, Object, JSObjectFactory, IsJSClassNode)] */; this.state_0_ = state_0; } } } if (s0_ != null) { return doCachedGroupsFactory(arg0Value, arg1Value, arg2Value_, arg3Value, s0_.cachedCompiledRegex_, s0_.cachedGroupsFactory_, s0_.isJSRegExpNode_); } break; } state_0 = state_0 | 0b10 /* add SpecializationActive[JSRegExpExecIntlNode.BuildGroupsObjectNode.doVaryingGroupsFactory(JSDynamicObject, Object, TruffleString, boolean)] */; this.state_0_ = state_0; return doVaryingGroupsFactory(arg0Value, arg1Value, arg2Value_, arg3Value); } throw new UnsupportedSpecializationException(this, null, arg0Value, arg1Value, arg2Value, arg3Value); } @NeverDefault public static BuildGroupsObjectNode create() { return new BuildGroupsObjectNodeGen(); } @GeneratedBy(BuildGroupsObjectNode.class) @DenyReplace private static final class CachedGroupsFactoryData extends Node implements SpecializationDataNode { @Child CachedGroupsFactoryData next_; /** * Source Info:
             *   Specialization: {@link BuildGroupsObjectNode#doCachedGroupsFactory}
             *   Parameter: {@link Object} cachedCompiledRegex
*/ @CompilationFinal Object cachedCompiledRegex_; /** * Source Info:
             *   Specialization: {@link BuildGroupsObjectNode#doCachedGroupsFactory}
             *   Parameter: {@link JSObjectFactory} cachedGroupsFactory
*/ @CompilationFinal JSObjectFactory cachedGroupsFactory_; /** * Source Info:
             *   Specialization: {@link BuildGroupsObjectNode#doCachedGroupsFactory}
             *   Parameter: {@link IsJSClassNode} isJSRegExpNode
*/ @Child IsJSClassNode isJSRegExpNode_; CachedGroupsFactoryData(CachedGroupsFactoryData next_) { this.next_ = next_; } } } /** * Debug Info:
     *   Specialization {@link JSRegExpExecBuiltinNode#doCached}
     *     Activation probability: 0.65000
     *     With/without class size: 19/4 bytes
     *   Specialization {@link JSRegExpExecBuiltinNode#doDynamic}
     *     Activation probability: 0.35000
     *     With/without class size: 9/0 bytes
     * 
*/ @GeneratedBy(JSRegExpExecBuiltinNode.class) @SuppressWarnings("javadoc") public static final class JSRegExpExecBuiltinNodeGen extends JSRegExpExecBuiltinNode { private static final StateField STATE_0_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); private static final StateField STATE_1_UPDATER = StateField.create(MethodHandles.lookup(), "state_1_"); static final ReferenceField CACHED_CACHE_UPDATER = ReferenceField.create(MethodHandles.lookup(), "cached_cache", CachedData.class); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InlinedConditionProfile} invalidLastIndex
         *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_INVALID_LAST_INDEX = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_UPDATER.subUpdater(2, 2))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InlinedCountingConditionProfile} match
         *   Inline method: {@link InlinedCountingConditionProfile#inline}
*/ private static final InlinedCountingConditionProfile INLINED_MATCH = InlinedCountingConditionProfile.inline(InlineTarget.create(InlinedCountingConditionProfile.class, IntField.create(MethodHandles.lookup(), "match_field0_"), IntField.create(MethodHandles.lookup(), "match_field1_"))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InlinedConditionProfile} areLegacyFeaturesEnabled
         *   Inline method: {@link InlinedConditionProfile#inline}
*/ private static final InlinedConditionProfile INLINED_ARE_LEGACY_FEATURES_ENABLED = InlinedConditionProfile.inline(InlineTarget.create(InlinedConditionProfile.class, STATE_0_UPDATER.subUpdater(4, 2))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
*/ private static final InteropReadBooleanMemberNode INLINED_READ_IS_MATCH = InteropReadBooleanMemberNodeGen.inline(InlineTarget.create(InteropReadBooleanMemberNode.class, STATE_0_UPDATER.subUpdater(6, 5), ReferenceField.create(MethodHandles.lookup(), "readIsMatch_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "readIsMatch_field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeGetGroupBoundariesMethodNode} getStart
         *   Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
*/ private static final InvokeGetGroupBoundariesMethodNode INLINED_GET_START = InvokeGetGroupBoundariesMethodNodeGen.inline(InlineTarget.create(InvokeGetGroupBoundariesMethodNode.class, STATE_0_UPDATER.subUpdater(11, 5), ReferenceField.create(MethodHandles.lookup(), "getStart_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "getStart_field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeGetGroupBoundariesMethodNode} getEnd
         *   Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
*/ private static final InvokeGetGroupBoundariesMethodNode INLINED_GET_END = InvokeGetGroupBoundariesMethodNodeGen.inline(InlineTarget.create(InvokeGetGroupBoundariesMethodNode.class, STATE_0_UPDATER.subUpdater(16, 5), ReferenceField.create(MethodHandles.lookup(), "getEnd_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "getEnd_field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeExecMethodNode} invokeExec
         *   Inline method: {@link InvokeExecMethodNodeGen#inline}
*/ private static final InvokeExecMethodNode INLINED_INVOKE_EXEC = InvokeExecMethodNodeGen.inline(InlineTarget.create(InvokeExecMethodNode.class, STATE_0_UPDATER.subUpdater(21, 2), ReferenceField.create(MethodHandles.lookup(), "invokeExec_field1_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadMemberNode} readFlags
         *   Inline method: {@link InteropReadMemberNodeGen#inline}
*/ private static final InteropReadMemberNode INLINED_READ_FLAGS = InteropReadMemberNodeGen.inline(InlineTarget.create(InteropReadMemberNode.class, STATE_0_UPDATER.subUpdater(23, 2), ReferenceField.create(MethodHandles.lookup(), "readFlags_field1_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readGlobal
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
*/ private static final InteropReadBooleanMemberNode INLINED_READ_GLOBAL = InteropReadBooleanMemberNodeGen.inline(InlineTarget.create(InteropReadBooleanMemberNode.class, STATE_0_UPDATER.subUpdater(25, 5), ReferenceField.create(MethodHandles.lookup(), "readGlobal_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "readGlobal_field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readSticky
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
*/ private static final InteropReadBooleanMemberNode INLINED_READ_STICKY = InteropReadBooleanMemberNodeGen.inline(InlineTarget.create(InteropReadBooleanMemberNode.class, STATE_1_UPDATER.subUpdater(0, 5), ReferenceField.create(MethodHandles.lookup(), "readSticky_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "readSticky_field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readHasIndices
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
*/ private static final InteropReadBooleanMemberNode INLINED_READ_HAS_INDICES = InteropReadBooleanMemberNodeGen.inline(InlineTarget.create(InteropReadBooleanMemberNode.class, STATE_1_UPDATER.subUpdater(5, 5), ReferenceField.create(MethodHandles.lookup(), "readHasIndices_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "readHasIndices_field2_", Node.class))); /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadIntMemberNode} readGroupCount
         *   Inline method: {@link InteropReadIntMemberNodeGen#inline}
*/ private static final InteropReadIntMemberNode INLINED_READ_GROUP_COUNT = InteropReadIntMemberNodeGen.inline(InlineTarget.create(InteropReadIntMemberNode.class, STATE_1_UPDATER.subUpdater(10, 5), ReferenceField.create(MethodHandles.lookup(), "readGroupCount_field1_", Node.class), ReferenceField.create(MethodHandles.lookup(), "readGroupCount_field2_", Node.class))); /** * State Info:
         *   0: SpecializationActive {@link JSRegExpExecBuiltinNode#doCached}
         *   1: SpecializationActive {@link JSRegExpExecBuiltinNode#doDynamic}
         *   2-3: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InlinedConditionProfile} invalidLastIndex
         *        Inline method: {@link InlinedConditionProfile#inline}
         *   4-5: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InlinedConditionProfile} areLegacyFeaturesEnabled
         *        Inline method: {@link InlinedConditionProfile#inline}
         *   6-10: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *        Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   11-15: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InvokeGetGroupBoundariesMethodNode} getStart
         *        Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
         *   16-20: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InvokeGetGroupBoundariesMethodNode} getEnd
         *        Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
         *   21-22: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InvokeExecMethodNode} invokeExec
         *        Inline method: {@link InvokeExecMethodNodeGen#inline}
         *   23-24: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InteropReadMemberNode} readFlags
         *        Inline method: {@link InteropReadMemberNodeGen#inline}
         *   25-29: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InteropReadBooleanMemberNode} readGlobal
         *        Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * State Info:
         *   0-4: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InteropReadBooleanMemberNode} readSticky
         *        Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   5-9: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InteropReadBooleanMemberNode} readHasIndices
         *        Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   10-14: InlinedCache
         *        Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *        Parameter: {@link InteropReadIntMemberNode} readGroupCount
         *        Inline method: {@link InteropReadIntMemberNodeGen#inline}
         * 
*/ @CompilationFinal @UnsafeAccessedField private int state_1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InlinedCountingConditionProfile} match
         *   Inline method: {@link InlinedCountingConditionProfile#inline}
         *   Inline field: int field0
*/ @CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private int match_field0_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InlinedCountingConditionProfile} match
         *   Inline method: {@link InlinedCountingConditionProfile#inline}
         *   Inline field: int field1
*/ @CompilationFinal @UnsafeAccessedField @SuppressWarnings("unused") private int match_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readIsMatch_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readIsMatch
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readIsMatch_field2_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeGetGroupBoundariesMethodNode} getStart
         *   Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getStart_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeGetGroupBoundariesMethodNode} getStart
         *   Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getStart_field2_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeGetGroupBoundariesMethodNode} getEnd
         *   Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getEnd_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeGetGroupBoundariesMethodNode} getEnd
         *   Inline method: {@link InvokeGetGroupBoundariesMethodNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node getEnd_field2_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InvokeExecMethodNode} invokeExec
         *   Inline method: {@link InvokeExecMethodNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node invokeExec_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadMemberNode} readFlags
         *   Inline method: {@link InteropReadMemberNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readFlags_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readGlobal
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readGlobal_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readGlobal
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readGlobal_field2_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readSticky
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readSticky_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readSticky
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readSticky_field2_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readHasIndices
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readHasIndices_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadBooleanMemberNode} readHasIndices
         *   Inline method: {@link InteropReadBooleanMemberNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readHasIndices_field2_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadIntMemberNode} readGroupCount
         *   Inline method: {@link InteropReadIntMemberNodeGen#inline}
         *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readGroupCount_field1_; /** * Source Info:
         *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
         *   Parameter: {@link InteropReadIntMemberNode} readGroupCount
         *   Inline method: {@link InteropReadIntMemberNodeGen#inline}
         *   Inline field: {@link Node} field2
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node readGroupCount_field2_; @UnsafeAccessedField @Child private CachedData cached_cache; private JSRegExpExecBuiltinNodeGen(JSContext context) { super(context); } @ExplodeLoop @Override public Object execute(JSRegExpObject arg0Value, TruffleString arg1Value) { int state_0 = this.state_0_; if ((state_0 & 0b11) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doCached(JSRegExpObject, TruffleString, Node, Object, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] || SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doDynamic(JSRegExpObject, TruffleString, Node, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doCached(JSRegExpObject, TruffleString, Node, Object, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] */) { CachedData s0_ = this.cached_cache; while (s0_ != null) { if ((JSRegExp.getCompiledRegex(arg0Value) == s0_.cachedCompiledRegex_)) { Node node__ = (this); return doCached(arg0Value, arg1Value, node__, s0_.cachedCompiledRegex_, INLINED_INVALID_LAST_INDEX, INLINED_MATCH, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_READ_IS_MATCH, INLINED_GET_START, INLINED_GET_END, INLINED_INVOKE_EXEC, INLINED_READ_FLAGS, INLINED_READ_GLOBAL, INLINED_READ_STICKY, INLINED_READ_HAS_INDICES, INLINED_READ_GROUP_COUNT); } s0_ = s0_.next_; } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doDynamic(JSRegExpObject, TruffleString, Node, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] */) { { Node node__1 = (this); return doDynamic(arg0Value, arg1Value, node__1, INLINED_INVALID_LAST_INDEX, INLINED_MATCH, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_READ_IS_MATCH, INLINED_GET_START, INLINED_GET_END, INLINED_INVOKE_EXEC, INLINED_READ_FLAGS, INLINED_READ_GLOBAL, INLINED_READ_STICKY, INLINED_READ_HAS_INDICES, INLINED_READ_GROUP_COUNT); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value); } @SuppressWarnings("unused") private Object executeAndSpecialize(JSRegExpObject arg0Value, TruffleString arg1Value) { int state_0 = this.state_0_; { Node node__ = null; if (((state_0 & 0b10)) == 0 /* is-not SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doDynamic(JSRegExpObject, TruffleString, Node, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] */) { while (true) { int count0_ = 0; CachedData s0_ = CACHED_CACHE_UPDATER.getVolatile(this); CachedData s0_original = s0_; while (s0_ != null) { if ((JSRegExp.getCompiledRegex(arg0Value) == s0_.cachedCompiledRegex_)) { node__ = (this); break; } count0_++; s0_ = s0_.next_; } if (s0_ == null) { { Object cachedCompiledRegex__ = (JSRegExp.getCompiledRegex(arg0Value)); if ((JSRegExp.getCompiledRegex(arg0Value) == cachedCompiledRegex__) && count0_ < (JSRegExpExecIntlNode.LIMIT)) { s0_ = this.insert(new CachedData(s0_original)); node__ = (this); Objects.requireNonNull(cachedCompiledRegex__, "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."); s0_.cachedCompiledRegex_ = cachedCompiledRegex__; if (!CACHED_CACHE_UPDATER.compareAndSet(this, s0_original, s0_)) { continue; } state_0 = state_0 | 0b1 /* add SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doCached(JSRegExpObject, TruffleString, Node, Object, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] */; this.state_0_ = state_0; } } } if (s0_ != null) { return doCached(arg0Value, arg1Value, node__, s0_.cachedCompiledRegex_, INLINED_INVALID_LAST_INDEX, INLINED_MATCH, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_READ_IS_MATCH, INLINED_GET_START, INLINED_GET_END, INLINED_INVOKE_EXEC, INLINED_READ_FLAGS, INLINED_READ_GLOBAL, INLINED_READ_STICKY, INLINED_READ_HAS_INDICES, INLINED_READ_GROUP_COUNT); } break; } } } { Node node__1 = null; node__1 = (this); this.cached_cache = null; state_0 = state_0 & 0xfffffffe /* remove SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doCached(JSRegExpObject, TruffleString, Node, Object, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] */; state_0 = state_0 | 0b10 /* add SpecializationActive[JSRegExpExecIntlNode.JSRegExpExecBuiltinNode.doDynamic(JSRegExpObject, TruffleString, Node, InlinedConditionProfile, InlinedCountingConditionProfile, InlinedConditionProfile, InteropReadBooleanMemberNode, InvokeGetGroupBoundariesMethodNode, InvokeGetGroupBoundariesMethodNode, InvokeExecMethodNode, InteropReadMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadBooleanMemberNode, InteropReadIntMemberNode)] */; this.state_0_ = state_0; return doDynamic(arg0Value, arg1Value, node__1, INLINED_INVALID_LAST_INDEX, INLINED_MATCH, INLINED_ARE_LEGACY_FEATURES_ENABLED, INLINED_READ_IS_MATCH, INLINED_GET_START, INLINED_GET_END, INLINED_INVOKE_EXEC, INLINED_READ_FLAGS, INLINED_READ_GLOBAL, INLINED_READ_STICKY, INLINED_READ_HAS_INDICES, INLINED_READ_GROUP_COUNT); } } @NeverDefault public static JSRegExpExecBuiltinNode create(JSContext context) { return new JSRegExpExecBuiltinNodeGen(context); } @GeneratedBy(JSRegExpExecBuiltinNode.class) @DenyReplace private static final class CachedData extends Node implements SpecializationDataNode { @Child CachedData next_; /** * Source Info:
             *   Specialization: {@link JSRegExpExecBuiltinNode#doCached}
             *   Parameter: {@link Object} cachedCompiledRegex
*/ @CompilationFinal Object cachedCompiledRegex_; CachedData(CachedData next_) { this.next_ = next_; } } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy