/** @since 0.8 or earlier */ @Override public String toString() { CompilerAsserts.neverPartOfCompilation("do not call FrameSlot.toString from compiled code"); return "[" + index + "," + identifier + "," + kind + "]"; } }
private static boolean isSingleChar(char lo, char hi) { CompilerAsserts.partialEvaluationConstant(lo); CompilerAsserts.partialEvaluationConstant(hi); return lo == hi; }
@ExplodeLoop protected static void check(Assumption[] assumptions) throws InvalidAssumptionException { if (assumptions != null) { CompilerAsserts.compilationConstant(assumptions.length); for (Assumption assumption : assumptions) { check(assumption); } } }
@Override @ExplodeLoop public Object execute(VirtualFrame virtualFrame) { int last = this.bodyNodes.length - 1; CompilerAsserts.compilationConstant(last); for (int i=0; i<last; i++) { this.bodyNodes[i].execute(virtualFrame); } return this.bodyNodes[last].execute(virtualFrame); }
private static void enterSizeCheck(Object valueToReallocate, long oldSize, long newSizeEstimate) { CompilerAsserts.neverPartOfCompilation(); assert (newSizeEstimate == SIZE_UNKNOWN || newSizeEstimate > 0) : "Wrong new size estimate = " + newSizeEstimate; assert valueToReallocate != null || oldSize == 0 : "Old size must be 0 for new allocations. Was: " + oldSize; assert valueToReallocate == null || (oldSize > 0 || oldSize == SIZE_UNKNOWN) : "Old size of a re-allocated value must be positive or unknown. Was: " + oldSize; }
/** * Gets called when {@link #checkMatch1(VirtualFrame, TRegexDFAExecutorNode, boolean)} finds a * successor. * * @param frame a virtual frame as described by {@link TRegexDFAExecutorProperties}. * @param executor this node's parent {@link TRegexDFAExecutorNode}. * @param i the index of the matching transition (corresponds to an entry in * {@link #getMatchers()} and {@link #getSuccessors()}). */ protected void successorFound1(VirtualFrame frame, TRegexDFAExecutorNode executor, int i) { CompilerAsserts.partialEvaluationConstant(this); }
@Override @ExplodeLoop public Object execute(VirtualFrame virtualFrame) { MumblerFunction function = this.evaluateFunction(virtualFrame); CompilerAsserts.compilationConstant(this.argumentNodes.length); CompilerAsserts.compilationConstant(this.isTail()); Object[] argumentValues = new Object[this.argumentNodes.length + 1]; argumentValues[0] = function.getLexicalScope(); for (int i=0; i<this.argumentNodes.length; i++) { argumentValues[i+1] = this.argumentNodes[i].execute(virtualFrame); } return call(virtualFrame, function.callTarget, argumentValues); }
private ForeignAccess(Supplier<? extends RootNode> languageCheckSupplier, Factory faf) { this.factory = faf; this.initThread = null; this.languageCheckSupplier = languageCheckSupplier; CompilerAsserts.neverPartOfCompilation("do not create a ForeignAccess object from compiled code"); }
private static boolean isTwoChars(char lo, char hi) { CompilerAsserts.partialEvaluationConstant(lo); CompilerAsserts.partialEvaluationConstant(hi); return lo + 1 == hi; }
@Override public Constructor<?> getReflectionMethod() { CompilerAsserts.neverPartOfCompilation(); return reflectionConstructor; }
public int checkMatchTree3(VirtualFrame frame, TRegexDFAExecutorNode executor, DFAStateNode stateNode, char c, int preLoopIndex) { CompilerAsserts.partialEvaluationConstant(this); CompilerAsserts.partialEvaluationConstant(stateNode); return checkMatchTree3(frame, executor, stateNode, 0, sortedRanges.length - 1, c, preLoopIndex); }
/** @since 0.8 or earlier */ @Override public String toString() { CompilerAsserts.neverPartOfCompilation("do not call FrameSlot.toString from compiled code"); return "[" + index + "," + identifier + "," + kind + "]"; }
public int checkMatchTree1(VirtualFrame frame, TRegexDFAExecutorNode executor, DFAStateNode stateNode, char c) { CompilerAsserts.partialEvaluationConstant(this); CompilerAsserts.partialEvaluationConstant(stateNode); return checkMatchTree1(frame, executor, stateNode, 0, sortedRanges.length - 1, c); }
@Override public Method getReflectionMethod() { CompilerAsserts.neverPartOfCompilation(); return reflectionMethod; }
public int checkMatchTree2(VirtualFrame frame, TRegexDFAExecutorNode executor, DFAStateNode stateNode, char c) { CompilerAsserts.partialEvaluationConstant(this); CompilerAsserts.partialEvaluationConstant(stateNode); return checkMatchTree2(frame, executor, stateNode, 0, sortedRanges.length - 1, c); }
@Override public Constructor<?> getReflectionMethod() { CompilerAsserts.neverPartOfCompilation(); return reflectionConstructor; }
@Override protected int atEnd2(VirtualFrame frame, TRegexDFAExecutorNode executor) { CompilerAsserts.partialEvaluationConstant(this); return atEndLoop(frame, executor); }
@Override public Method getReflectionMethod() { CompilerAsserts.neverPartOfCompilation(); return reflectionMethod; }
protected void storeResult(VirtualFrame frame, TRegexDFAExecutorNode executor, int index, @SuppressWarnings("unused") boolean anchored) { CompilerAsserts.partialEvaluationConstant(this); executor.setResultInt(frame, index); }
@Override public Constructor<?> getReflectionMethod() { CompilerAsserts.neverPartOfCompilation(); return reflectionConstructor; }