Optional asm parameters for text

This commit is contained in:
Anuken
2020-08-09 18:33:59 -04:00
parent eb4a2a2da1
commit 15572cdd7a
2 changed files with 4 additions and 3 deletions

View File

@@ -77,7 +77,8 @@ public class LogicStatementProcessor extends BaseProcessor{
""); "");
//reading primitives, strings and enums is supported; nothing else is //reading primitives, strings and enums is supported; nothing else is
reader.addStatement("result.$L = $L(tokens[$L])$L", reader.addStatement("if(tokens.length > $L) result.$L = $L(tokens[$L])$L",
index + 1,
field.name(), field.name(),
field.mirror().toString().equals("java.lang.String") ? field.mirror().toString().equals("java.lang.String") ?
"" : (field.tname().isPrimitive() ? field.tname().box().toString() : "" : (field.tname().isPrimitive() ? field.tname().box().toString() :

View File

@@ -244,7 +244,7 @@ public class LExecutor{
} }
public static class BinaryOpI implements LInstruction{ public static class BinaryOpI implements LInstruction{
public BinaryOp op; public BinaryOp op = BinaryOp.add;
public int a, b, dest; public int a, b, dest;
public BinaryOpI(BinaryOp op, int a, int b, int dest){ public BinaryOpI(BinaryOp op, int a, int b, int dest){
@@ -263,7 +263,7 @@ public class LExecutor{
} }
public static class UnaryOpI implements LInstruction{ public static class UnaryOpI implements LInstruction{
public UnaryOp op; public UnaryOp op = UnaryOp.negate;
public int value, dest; public int value, dest;
public UnaryOpI(UnaryOp op, int value, int dest){ public UnaryOpI(UnaryOp op, int value, int dest){