Package org.cloudburstmc.mojava.compiler
Class CompilerSupport
java.lang.Object
org.cloudburstmc.mojava.compiler.CompilerSupport
Static helpers the generated bytecode calls into. Every piece of fiddly runtime logic (name-path
building, the string-vs-double rules of
+, equality, MoParams construction) lives
here so the emitted bytecode stays small and the semantics match the interpreter exactly.-
Method Summary
Modifier and TypeMethodDescriptionstatic MoValuestatic MoValuearrayGet(MoEnvironment env, List<String> base, MoValue indexValue) static MoValuearrayGetDynamic(MoEnvironment env, String baseString, MoValue indexValue) static voidstatic voidarraySetDynamic(MoEnvironment env, String baseString, MoValue indexValue, MoValue value) static MoValueboolVal(boolean b) static MoValuecall(MoEnvironment env, List<String> names, MoValue[] args) static MoValuecallDynamic(MoEnvironment env, String nameString, MoValue[] args) static MoValuestatic MoValuestatic MoValuegetRaw(MoEnvironment env, List<String> names) static MoValuegetValue(MoEnvironment env, List<String> names) static doublegetValueDouble(MoEnvironment env, List<String> names) static MoValuestatic MoValuegreaterOrEqual(MoValue left, MoValue right) static booleanstatic MoValuestatic MoValuestatic MoValuestatic MoValuestatic booleanstatic voidsetValue(MoEnvironment env, List<String> names, MoValue value) static MoValuestatic MoValuesmallerOrEqual(MoValue left, MoValue right) static MoValuestatic MoValuevarGet(VariableStruct struct, int slot) static doublevarGetDouble(VariableStruct struct, int slot) static voidvarSet(VariableStruct struct, int slot, String name, MoValue value)
-
Method Details
-
getValue
-
getValueDouble
-
getRaw
-
setValue
-
varGet
-
varGetDouble
-
varSet
-
call
-
callDynamic
-
arrayGet
-
arraySet
public static void arraySet(MoEnvironment env, List<String> base, MoValue indexValue, MoValue value) -
arrayGetDynamic
-
arraySetDynamic
public static void arraySetDynamic(MoEnvironment env, String baseString, MoValue indexValue, MoValue value) -
add
-
subtract
-
multiply
-
divide
-
equal
-
notEqual
-
greater
-
greaterOrEqual
-
smaller
-
smallerOrEqual
-
negate
-
not
-
notZero
-
isOne
-
boolVal
-