Package org.joni
Class StackMachine
java.lang.Object
org.jcodings.IntHolder
org.joni.Matcher
org.joni.StackMachine
- All Implemented Interfaces:
StackType
- Direct Known Subclasses:
ByteCodeMachine
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final int
protected final int
protected final int
protected final int[]
protected StackEntry[]
(package private) static final ThreadLocal
<WeakReference<StackEntry[]>> private static final int
protected byte[]
(package private) int
protected int
Fields inherited from class org.joni.Matcher
bytes, enc, end, FAILED, high, INTERRUPTED, low, msaBegin, msaBestLen, msaBestS, msaEnd, msaOptions, msaRegion, msaStart, regex, str
Fields inherited from class org.jcodings.IntHolder
value
Fields inherited from interface org.joni.constants.StackType
ALT, CALL_FRAME, INVALID_STACK_INDEX, LOOK_BEHIND_NOT, MASK_MEM_END_OR_MARK, MASK_POP_USED, MASK_TO_VOID_TARGET, MEM_END, MEM_END_MARK, MEM_START, NULL_CHECK_END, NULL_CHECK_START, POS, POS_NOT, REPEAT, REPEAT_INC, RETURN, STATE_CHECK_MARK, STOP_BT, VOID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StackEntry[]
private void
protected final StackEntry
ensure1()
private static StackEntry[]
protected final int
getMemStart
(int mnum) protected final int
getRepeat
(int id) protected final void
init()
protected final int
nullCheck
(int id, int s) protected final int
nullCheckMemSt
(int id, int s) protected final int
nullCheckMemStRec
(int id, int s) protected final int
nullCheckRec
(int id, int s) protected final StackEntry
pop()
private StackEntry
private StackEntry
popFree()
private StackEntry
protected final void
popOne()
protected final void
protected final void
protected final int
posEnd()
private void
push
(int type, int pat, int s, int prev) protected final void
pushAlt
(int pat, int s, int prev) protected final void
pushAltWithStateCheck
(int pat, int s, int sprev, int snum) protected final void
pushCallFrame
(int pat) protected final void
pushEnsured
(int type, int pat) protected final void
pushLookBehindNot
(int pat, int s, int sprev) protected final void
pushMemEnd
(int mnum, int s) protected final void
pushMemEndMark
(int mnum) protected final void
pushMemStart
(int mnum, int s) protected final void
pushNullCheckEnd
(int cnum) protected final void
pushNullCheckStart
(int cnum, int s) protected final void
pushPos
(int s, int prev) protected final void
pushPosNot
(int pat, int s, int prev) protected final void
pushRepeat
(int id, int pat) protected final void
pushRepeatInc
(int sindex) protected final void
protected final void
pushStateCheck
(int s, int snum) protected final void
protected final void
pushType
(int type) protected final int
sreturn()
protected final void
protected final void
stateCheckBuffInit
(int strLength, int offset, int stateNum) private void
private int
stateCheckPos
(int s, int snum) protected final boolean
stateCheckVal
(int s, int snum) protected final void
Methods inherited from class org.joni.Matcher
getBegin, getEagerRegion, getEnd, getRegion, match, matchAt, matchInterruptible, msaInit, search, searchInterruptible
-
Field Details
-
INVALID_INDEX
protected static final int INVALID_INDEX- See Also:
-
stack
-
stk
protected int stk -
repeatStk
protected final int[] repeatStk -
memStartStk
protected final int memStartStk -
memEndStk
protected final int memEndStk -
stateCheckBuff
protected byte[] stateCheckBuff -
stateCheckBuffSize
int stateCheckBuffSize -
stacks
-
STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE
private static final int STATE_CHECK_BUFF_MALLOC_THRESHOLD_SIZE- See Also:
-
-
Constructor Details
-
StackMachine
-
-
Method Details
-
allocateStack
-
doubleStack
private void doubleStack() -
fetchStack
-
init
protected final void init() -
ensure1
-
pushType
protected final void pushType(int type) -
stateCheckPos
private int stateCheckPos(int s, int snum) -
stateCheckVal
protected final boolean stateCheckVal(int s, int snum) -
stateCheckMark
private void stateCheckMark() -
stateCheckBuffInit
protected final void stateCheckBuffInit(int strLength, int offset, int stateNum) - Specified by:
stateCheckBuffInit
in classMatcher
-
stateCheckBuffClear
protected final void stateCheckBuffClear()- Specified by:
stateCheckBuffClear
in classMatcher
-
push
private void push(int type, int pat, int s, int prev) -
pushEnsured
protected final void pushEnsured(int type, int pat) -
pushAltWithStateCheck
protected final void pushAltWithStateCheck(int pat, int s, int sprev, int snum) -
pushStateCheck
protected final void pushStateCheck(int s, int snum) -
pushAlt
protected final void pushAlt(int pat, int s, int prev) -
pushPos
protected final void pushPos(int s, int prev) -
pushPosNot
protected final void pushPosNot(int pat, int s, int prev) -
pushStopBT
protected final void pushStopBT() -
pushLookBehindNot
protected final void pushLookBehindNot(int pat, int s, int sprev) -
pushRepeat
protected final void pushRepeat(int id, int pat) -
pushRepeatInc
protected final void pushRepeatInc(int sindex) -
pushMemStart
protected final void pushMemStart(int mnum, int s) -
pushMemEnd
protected final void pushMemEnd(int mnum, int s) -
pushMemEndMark
protected final void pushMemEndMark(int mnum) -
getMemStart
protected final int getMemStart(int mnum) -
pushNullCheckStart
protected final void pushNullCheckStart(int cnum, int s) -
pushNullCheckEnd
protected final void pushNullCheckEnd(int cnum) -
pushCallFrame
protected final void pushCallFrame(int pat) -
pushReturn
protected final void pushReturn() -
popOne
protected final void popOne() -
pop
-
popFree
-
popMemStart
-
popDefault
-
popTilPosNot
protected final void popTilPosNot() -
popTilLookBehindNot
protected final void popTilLookBehindNot() -
posEnd
protected final int posEnd() -
stopBtEnd
protected final void stopBtEnd() -
nullCheck
protected final int nullCheck(int id, int s) -
nullCheckRec
protected final int nullCheckRec(int id, int s) -
nullCheckMemSt
protected final int nullCheckMemSt(int id, int s) -
nullCheckMemStRec
protected final int nullCheckMemStRec(int id, int s) -
getRepeat
protected final int getRepeat(int id) -
sreturn
protected final int sreturn()
-