JavaPatternMatching/src/de/dhbwstuttgart/syntaxtree/statement/UnaryNot.java
2014-09-04 16:35:44 +02:00

44 lines
1.2 KiB
Java
Executable File

// ino.module.UnaryNot.8657.package
package de.dhbwstuttgart.syntaxtree.statement;
// ino.end
// ino.module.UnaryNot.8657.import
import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.bytecode.JVMCode;
import de.dhbwstuttgart.myexception.JVMCodeException;
// ino.class.UnaryNot.26314.declaration
public class UnaryNot
// ino.end
// ino.class.UnaryNot.26314.body
{
// ino.method.codegen.26317.definition
public void codegen(ClassFile classfile, CodeAttribute code, boolean sw)
throws JVMCodeException
// ino.end
// ino.method.codegen.26317.body
{
if(!sw)code.add_code(JVMCode.ifne);
else code.add_code(JVMCode.ifeq);
code.add_code_short((short)7);
code.add_code(JVMCode.iconst_1);
code.add_code(JVMCode.goto_);
code.add_code_short((short)4);
code.add_code(JVMCode.iconst_0);
}
// ino.end
// ino.method.if_codegen.26320.definition
public void if_codegen(ClassFile classfile, CodeAttribute code, boolean sw)
throws JVMCodeException
// ino.end
// ino.method.if_codegen.26320.body
{
if(!sw) code.add_code(JVMCode.ifne);
else code.add_code(JVMCode.ifeq);
}
// ino.end
}
// ino.end