Class RuntimeIndex
java.lang.Object
io.github.protasm.jvmud.compiler.runtime.RuntimeIndex
Runtime indexing helpers for dynamically typed LPC values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRuntime marker for an LPC from-end index bound such as<1. -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectfromEnd(int distance) static Objectstatic ObjectReads a value through a dynamically typed LPC index target.static ObjectReads an indexed mapping value slot such asmapping[key, 1].static ObjectmutateNumber(Object target, Object index, int delta) Mutates a numeric indexed array or mapping value and returns the previous value for postfix operators.static ObjectmutateNumberPrefix(Object target, Object index, int delta) Mutates a numeric indexed array or mapping value and returns the updated value for prefix operators.static ObjectreplaceSlice(Object target, Object startValue, Object endValue, Object replacement) Replaces an LPC array or string slice.static ObjectStores a value through a dynamically typed LPC index target.static Objectstatic intstringCharCode(String text, Object index)
-
Method Details
-
fromEnd
-
get
-
get
-
get
-
set
-
mutateNumber
-
mutateNumberPrefix
-
stringCharCode
-
slice
-
replaceSlice
public static Object replaceSlice(Object target, Object startValue, Object endValue, Object replacement) Replaces an LPC array or string slice.Array targets are mutable and are updated in place. String targets produce a replacement string because Java strings are immutable; generated code stores that result back into the original local or field when compiling string slice assignment.
-