forked from JavaTX/JavaCompilerCore
46 lines
1.3 KiB
Java
Executable File
46 lines
1.3 KiB
Java
Executable File
// ino.module.ModuloOp.8604.package
|
|
package de.dhbwstuttgart.syntaxtree.operator;
|
|
// ino.end
|
|
// ino.module.ModuloOp.8604.import
|
|
import java.util.Vector;
|
|
|
|
import de.dhbwstuttgart.bytecode.ClassFile;
|
|
import de.dhbwstuttgart.bytecode.CodeAttribute;
|
|
import de.dhbwstuttgart.bytecode.JVMCode;
|
|
import de.dhbwstuttgart.myexception.JVMCodeException;
|
|
import de.dhbwstuttgart.syntaxtree.statement.Binary;
|
|
import de.dhbwstuttgart.syntaxtree.statement.Expr;
|
|
|
|
|
|
|
|
|
|
// ino.class.ModuloOp.24221.declaration
|
|
public class ModuloOp extends MulOp
|
|
// ino.end
|
|
// ino.class.ModuloOp.24221.body
|
|
{
|
|
// ino.method.ModuloOp.24225.definition
|
|
public ModuloOp(int offset, int variableLength)
|
|
// ino.end
|
|
// ino.method.ModuloOp.24225.body
|
|
{
|
|
super(offset,variableLength);
|
|
}
|
|
// ino.end
|
|
|
|
// ino.method.codegen.24228.definition
|
|
public void codegen(ClassFile classfile, CodeAttribute code, Expr expr, boolean neg, Vector paralist)
|
|
throws JVMCodeException
|
|
// ino.end
|
|
// ino.method.codegen.24228.body
|
|
{
|
|
Expr expr1 = ((Binary)expr).get_Expr1();
|
|
Expr expr2 = ((Binary)expr).get_Expr2();
|
|
expr1.codegen(classfile, code, paralist);
|
|
expr2.codegen(classfile, code, paralist);
|
|
code.add_code(JVMCode.nrem(expr1.getTypeName()));
|
|
}
|
|
// ino.end
|
|
}
|
|
// ino.end
|