mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 09:08:04 +00:00
fix AND Logical Operation
This commit is contained in:
parent
133e7824ba
commit
354502cc20
@ -3,17 +3,14 @@ package de.maishai.typedast.typedclass;
|
||||
import de.maishai.ast.Operator;
|
||||
import de.maishai.ast.records.Binary;
|
||||
import de.maishai.typedast.MethodContext;
|
||||
import de.maishai.typedast.TypedExpression;
|
||||
import de.maishai.typedast.Type;
|
||||
import de.maishai.typedast.TypedExpression;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.objectweb.asm.Label;
|
||||
import org.objectweb.asm.MethodVisitor;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static de.maishai.typedast.Help.TypedExpressionHelp.convertExpression;
|
||||
|
||||
@Data
|
||||
@ -78,9 +75,9 @@ public class TypedBinary implements TypedExpression {
|
||||
Label returnTrue = new Label();
|
||||
Label returnFalse = new Label();
|
||||
left.codeGen(ctx);
|
||||
ctx.getMv().visitJumpInsn(Opcodes.IFNE, returnFalse);
|
||||
ctx.getMv().visitJumpInsn(Opcodes.IFEQ, returnFalse);
|
||||
right.codeGen(ctx);
|
||||
ctx.getMv().visitJumpInsn(Opcodes.IFNE, returnFalse);
|
||||
ctx.getMv().visitJumpInsn(Opcodes.IFEQ, returnFalse);
|
||||
ctx.getMv().visitJumpInsn(Opcodes.GOTO, returnTrue);
|
||||
|
||||
ctx.getMv().visitLabel(returnFalse);
|
||||
|
Loading…
Reference in New Issue
Block a user