Commit 20c4d4bd authored by Victor Yacovlev's avatar Victor Yacovlev

Improved performance on variable store operation

parent e8ccd254
......@@ -2041,13 +2041,16 @@ void KumirVM::do_store(uint8_t s, uint16_t id)
String svalue;
const int lineNo = stack_contexts.top().lineNo;
Variable & variable = findVariable(s, id);
const int dim = variable.dimension();
ValueType t = variable.baseType();
Variable * reference = variable.reference();
int bounds[7];
if (dim>0)
value.getBounds(bounds);
if (value.isConstant())
variable.setConstValue(value);
else {
if (dim>0)
variable.setBounds(bounds);
variable.setValue(value.value());
variable.setDimension(value.dimension());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment