From 217df2f36a00b252e23409b7b7fd1baebac87a68 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 15 Mar 1999 17:59:52 +0000 Subject: [PATCH] hasSideEffects git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@428 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/expr/PrePostFixOperator.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jode/jode/expr/PrePostFixOperator.java b/jode/jode/expr/PrePostFixOperator.java index e26084d..822e272 100644 --- a/jode/jode/expr/PrePostFixOperator.java +++ b/jode/jode/expr/PrePostFixOperator.java @@ -47,6 +47,16 @@ public class PrePostFixOperator extends Operator { return store.getLValueOperandCount(); } + /** + * Checks if the value of the given expression can change, due to + * side effects in this expression. If this returns false, the + * expression can safely be moved behind the current expresion. + * @param expr the expression that should not change. + */ + public boolean hasSideEffects(Expression expr) { + return store.hasSideEffects(expr); + } + /** * Sets the return type of this operator. */