<commit_before>package railo.transformer.bytecode.statement;

import org.objectweb.asm.Type;
import org.objectweb.asm.commons.GeneratorAdapter;

import railo.transformer.bytecode.BytecodeContext;
import railo.transformer.bytecode.BytecodeException;
import railo.transformer.bytecode.Literal;
import railo.transformer.bytecode.expression.Expression;
import railo.transformer.bytecode.util.ASMUtil;

public final class ExpressionStatement extends StatementBase {

	private Expression expr;

	/**
	 * Constructor of the class
	 * @param expr
	 */
	public ExpressionStatement(Expression expr) {
		super(expr.getLine());
		this.expr=expr;
	}

	/**
	 *
	 * @see railo.transformer.bytecode.statement.StatementBase#_writeOut(org.objectweb.asm.commons.GeneratorAdapter)
	 */
	public void _writeOut(BytecodeContext bc) throws BytecodeException {
		GeneratorAdapter adapter = bc.getAdapter();
		if(!(expr instanceof Literal)) {
			Type type = expr.writeOut(bc, Expression.MODE_VALUE);
			ASMUtil.pop(adapter, type);
			//if(type.equals(Types.DOUBLE_VALUE))adapter.pop2();
			//else adapter.pop();
		}
	}
}<commit_msg>add support for ExpressionStatment handing Expression returning void<commit_after>package railo.transformer.bytecode.statement;

import org.objectweb.asm.Type;
import org.objectweb.asm.commons.GeneratorAdapter;

import railo.transformer.bytecode.BytecodeContext;
import railo.transformer.bytecode.BytecodeException;
import railo.transformer.bytecode.Literal;
import railo.transformer.bytecode.expression.Expression;
import railo.transformer.bytecode.util.ASMUtil;
import railo.transformer.bytecode.util.Types;

public final class ExpressionStatement extends StatementBase {

	private Expression expr;

	/**
	 * Constructor of the class
	 * @param expr
	 */
	public ExpressionStatement(Expression expr) {
		super(expr.getLine());
		this.expr=expr;
	}

	/**
	 *
	 * @see railo.transformer.bytecode.statement.StatementBase#_writeOut(org.objectweb.asm.commons.GeneratorAdapter)
	 */
	public void _writeOut(BytecodeContext bc) throws BytecodeException {
		GeneratorAdapter adapter = bc.getAdapter();
		if(!(expr instanceof Literal)) {
			Type type = expr.writeOut(bc, Expression.MODE_VALUE);
			if(!type.equals(Types.VOID))ASMUtil.pop(adapter, type);
			//if(type.equals(Types.DOUBLE_VALUE))adapter.pop2();
			//else adapter.pop();
		}
	}
}
{'fraction_non_alphanumeric': 0.11362665527552328, 'fraction_numerical': 0.0008543357539513029, 'mean_word_length': 5.364130434782608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1468491', 'n_tokens_mistral': 747, 'n_tokens_neox': 698, 'n_words': 127}