Mercurial > hg > truffle
comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/gen/LIRGenerator.java @ 19130:6fce03279f0a
LIRGenerator: assert that we are not creating copies of variables (unintentionally).
Creating copies of variables is almost always a bug.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Wed, 04 Feb 2015 16:53:11 +0100 |
parents | 3faa4f98d5c8 |
children | 5fce692f65c8 |
comparison
equal
deleted
inserted
replaced
19129:afb826080949 | 19130:6fce03279f0a |
---|---|
117 return res.getFrameMapBuilder().getRegisterConfig().getAttributesMap()[register.number]; | 117 return res.getFrameMapBuilder().getRegisterConfig().getAttributesMap()[register.number]; |
118 } | 118 } |
119 | 119 |
120 @Override | 120 @Override |
121 public Variable emitMove(Value input) { | 121 public Variable emitMove(Value input) { |
122 assert !(input instanceof Variable) : "Creating a copy of a variable via this method is not supported (and potentially a bug): " + input; | |
122 Variable result = newVariable(input.getLIRKind()); | 123 Variable result = newVariable(input.getLIRKind()); |
123 emitMove(result, input); | 124 emitMove(result, input); |
124 return result; | 125 return result; |
125 } | 126 } |
126 | 127 |