Package ai.timefold.jpyinterpreter
Class StackMetadata
java.lang.Object
ai.timefold.jpyinterpreter.StackMetadata
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleangetCellVariableValueSource(int index) Returns the value source for the cell variable in slotindexgetLocalVariableValueSource(int index) Returns the value source for the local variable in slotindexintgetTypeAtStackIndex(int index) Returns the type at the given stack index (stack index is how many elements below TOS (i.e. 0 is TOS, 1 is TOS1)).getValueSourceForStackIndex(int index) Returns the value source for the given stack index (stack index is how many elements below TOS (i.e. 0 is TOS, 1 is TOS1)).getValueSourcesUpToStackIndex(int index) Returns the value sources up to (and not including) the given stack index (stack index is how many elements below TOS (i.e. 0 is TOS, 1 is TOS1)).inthashCode()booleanlocals(ValueSourceInfo... types) Return a new StackMetadata with the given local types.pop()Return a new StackMetadata with TOS poppedpop(int count) Return a new StackMetadata with the topcountitems popped.push(ValueSourceInfo type) Return a new StackMetadata withtypeadded as the new TOS element.push(ValueSourceInfo... types) Return a new StackMetadata withtypesadded as the new elements.pushTemp(PythonLikeType type) pushTemps(PythonLikeType... types) set(int index, ValueSourceInfo type) setCallKeywordNameList(List<String> callKeywordNameList) setCellVariableValueSource(int index, ValueSourceInfo type) Return a new StackMetadata with the cell variable in slotindextype set totype.setLocalVariableValueSource(int index, ValueSourceInfo type) Return a new StackMetadata with the local variable in slotindextype set totype.stack(ValueSourceInfo... types) Return a new StackMetadata withtypesas the stack; The original stack is cleared.toString()unifyWith(StackMetadata other)
-
Field Details
-
DEAD_CODE
-
localVariableHelper
-
-
Constructor Details
-
StackMetadata
-
-
Method Details
-
isDeadCode
public boolean isDeadCode() -
getStackSize
public int getStackSize() -
getValueSourceForStackIndex
Returns the value source for the given stack index (stack index is how many elements below TOS (i.e. 0 is TOS, 1 is TOS1)).- Parameters:
index- The stack index (how many elements below TOS)- Returns:
- The type at the given stack index
-
getValueSourcesUpToStackIndex
Returns the value sources up to (and not including) the given stack index (stack index is how many elements below TOS (i.e. 0 is TOS, 1 is TOS1)).- Parameters:
index- The stack index (how many elements below TOS)- Returns:
- The value sources up to (and not including) the given stack index
-
getTypeAtStackIndex
Returns the type at the given stack index (stack index is how many elements below TOS (i.e. 0 is TOS, 1 is TOS1)).- Parameters:
index- The stack index (how many elements below TOS)- Returns:
- The type at the given stack index
-
getLocalVariableValueSource
Returns the value source for the local variable in slotindex- Parameters:
index- The slot- Returns:
- The type for the local variable in the given slot
-
getCellVariableValueSource
Returns the value source for the cell variable in slotindex- Parameters:
index- The slot- Returns:
- The type for the cell variable in the given slot
-
getTOSType
-
getTOSValueSource
-
copy
-
unifyWith
-
push
Return a new StackMetadata withtypeadded as the new TOS element.- Parameters:
type- The type to push to TOS
-
set
-
pushTemp
-
push
Return a new StackMetadata withtypesadded as the new elements. The last element oftypesis TOS.- Parameters:
types- The types to push to TOS
-
pushTemps
-
stack
Return a new StackMetadata withtypesas the stack; The original stack is cleared.- Parameters:
types- The stack types.
-
pop
Return a new StackMetadata with TOS popped -
pop
Return a new StackMetadata with the topcountitems popped. -
setLocalVariableValueSource
Return a new StackMetadata with the local variable in slotindextype set totype. -
locals
Return a new StackMetadata with the given local types. ThrowsIllegalArgumentExceptionif types.length != localVariableTypes.size(). -
setCellVariableValueSource
Return a new StackMetadata with the cell variable in slotindextype set totype. -
getCallKeywordNameList
-
setCallKeywordNameList
-
toString
-
equals
-
hashCode
public int hashCode()
-