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

com.oracle.truffle.js.nodes.array.GetViewByteLengthNodeGen Maven / Gradle / Ivy

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

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.InlineSupport.InlineTarget;
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.Node;
import com.oracle.truffle.js.runtime.JSContext;
import com.oracle.truffle.js.runtime.builtins.JSDataView;
import com.oracle.truffle.js.runtime.builtins.JSDataViewObject;
import java.lang.invoke.MethodHandles;

/**
 * Debug Info: 
 *   Specialization {@link GetViewByteLengthNode#doFixedLength}
 *     Activation probability: 0.48333
 *     With/without class size: 9/0 bytes
 *   Specialization {@link GetViewByteLengthNode#doAutoLength}
 *     Activation probability: 0.33333
 *     With/without class size: 12/5 bytes
 *   Specialization {@link GetViewByteLengthNode#doOutOfBounds}
 *     Activation probability: 0.18333
 *     With/without class size: 6/0 bytes
 * 
*/ @GeneratedBy(GetViewByteLengthNode.class) @SuppressWarnings("javadoc") public final class GetViewByteLengthNodeGen extends GetViewByteLengthNode { private static final StateField STATE_0_GetViewByteLengthNode_UPDATER = StateField.create(MethodHandles.lookup(), "state_0_"); /** * Source Info:
     *   Specialization: {@link GetViewByteLengthNode#doAutoLength}
     *   Parameter: {@link ArrayBufferByteLengthNode} getByteLengthNode
     *   Inline method: {@link ArrayBufferByteLengthNodeGen#inline}
*/ private static final ArrayBufferByteLengthNode INLINED_AUTO_LENGTH_GET_BYTE_LENGTH_NODE_ = ArrayBufferByteLengthNodeGen.inline(InlineTarget.create(ArrayBufferByteLengthNode.class, STATE_0_GetViewByteLengthNode_UPDATER.subUpdater(3, 4), ReferenceField.create(MethodHandles.lookup(), "autoLength_getByteLengthNode__field1_", Node.class))); /** * State Info:
     *   0: SpecializationActive {@link GetViewByteLengthNode#doFixedLength}
     *   1: SpecializationActive {@link GetViewByteLengthNode#doAutoLength}
     *   2: SpecializationActive {@link GetViewByteLengthNode#doOutOfBounds}
     *   3-6: InlinedCache
     *        Specialization: {@link GetViewByteLengthNode#doAutoLength}
     *        Parameter: {@link ArrayBufferByteLengthNode} getByteLengthNode
     *        Inline method: {@link ArrayBufferByteLengthNodeGen#inline}
     * 
*/ @CompilationFinal @UnsafeAccessedField private int state_0_; /** * Source Info:
     *   Specialization: {@link GetViewByteLengthNode#doAutoLength}
     *   Parameter: {@link ArrayBufferByteLengthNode} getByteLengthNode
     *   Inline method: {@link ArrayBufferByteLengthNodeGen#inline}
     *   Inline field: {@link Node} field1
*/ @Child @UnsafeAccessedField @SuppressWarnings("unused") private Node autoLength_getByteLengthNode__field1_; private GetViewByteLengthNodeGen() { } @Override public int execute(JSDataViewObject arg0Value, JSContext arg1Value) { int state_0 = this.state_0_; if ((state_0 & 0b111) != 0 /* is SpecializationActive[GetViewByteLengthNode.doFixedLength(JSDataViewObject, JSContext)] || SpecializationActive[GetViewByteLengthNode.doAutoLength(JSDataViewObject, JSContext, ArrayBufferByteLengthNode)] || SpecializationActive[GetViewByteLengthNode.doOutOfBounds(JSDataViewObject, JSContext)] */) { if ((state_0 & 0b1) != 0 /* is SpecializationActive[GetViewByteLengthNode.doFixedLength(JSDataViewObject, JSContext)] */) { if ((!(JSDataView.isOutOfBounds(arg0Value, arg1Value))) && (!(arg0Value.hasAutoLength()))) { return GetViewByteLengthNode.doFixedLength(arg0Value, arg1Value); } } if ((state_0 & 0b10) != 0 /* is SpecializationActive[GetViewByteLengthNode.doAutoLength(JSDataViewObject, JSContext, ArrayBufferByteLengthNode)] */) { if ((!(JSDataView.isOutOfBounds(arg0Value, arg1Value))) && (arg0Value.hasAutoLength())) { return doAutoLength(arg0Value, arg1Value, INLINED_AUTO_LENGTH_GET_BYTE_LENGTH_NODE_); } } if ((state_0 & 0b100) != 0 /* is SpecializationActive[GetViewByteLengthNode.doOutOfBounds(JSDataViewObject, JSContext)] */) { if ((JSDataView.isOutOfBounds(arg0Value, arg1Value))) { return GetViewByteLengthNode.doOutOfBounds(arg0Value, arg1Value); } } } CompilerDirectives.transferToInterpreterAndInvalidate(); return executeAndSpecialize(arg0Value, arg1Value); } private int executeAndSpecialize(JSDataViewObject arg0Value, JSContext arg1Value) { int state_0 = this.state_0_; if ((!(JSDataView.isOutOfBounds(arg0Value, arg1Value))) && (!(arg0Value.hasAutoLength()))) { state_0 = state_0 | 0b1 /* add SpecializationActive[GetViewByteLengthNode.doFixedLength(JSDataViewObject, JSContext)] */; this.state_0_ = state_0; return GetViewByteLengthNode.doFixedLength(arg0Value, arg1Value); } if ((!(JSDataView.isOutOfBounds(arg0Value, arg1Value))) && (arg0Value.hasAutoLength())) { state_0 = state_0 | 0b10 /* add SpecializationActive[GetViewByteLengthNode.doAutoLength(JSDataViewObject, JSContext, ArrayBufferByteLengthNode)] */; this.state_0_ = state_0; return doAutoLength(arg0Value, arg1Value, INLINED_AUTO_LENGTH_GET_BYTE_LENGTH_NODE_); } if ((JSDataView.isOutOfBounds(arg0Value, arg1Value))) { state_0 = state_0 | 0b100 /* add SpecializationActive[GetViewByteLengthNode.doOutOfBounds(JSDataViewObject, JSContext)] */; this.state_0_ = state_0; return GetViewByteLengthNode.doOutOfBounds(arg0Value, arg1Value); } throw new UnsupportedSpecializationException(this, null, arg0Value, arg1Value); } @NeverDefault public static GetViewByteLengthNode create() { return new GetViewByteLengthNodeGen(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy