Commit e74980c2 authored by Victor Yacovlev's avatar Victor Yacovlev

Performance improvement again

parent 68ae5b6b
...@@ -2076,11 +2076,14 @@ void KumirVM::do_load(uint8_t s, uint16_t id) ...@@ -2076,11 +2076,14 @@ void KumirVM::do_load(uint8_t s, uint16_t id)
if (m_dontTouchMe) m_dontTouchMe->lock(); if (m_dontTouchMe) m_dontTouchMe->lock();
Variable val; Variable val;
Variable & variable = findVariable(s, id); Variable & variable = findVariable(s, id);
const int dim = variable.dimension();
int bounds[7]; int bounds[7];
val.setBaseType(variable.baseType()); val.setBaseType(variable.baseType());
val.setDimension(variable.dimension()); val.setDimension(variable.dimension());
val.setBounds(bounds); if (dim>0) {
if (VariableScope(s)==CONSTT) { if (VariableScope(s)==CONSTT) {
bool wasError = Kumir::Core::getError().length()>0; bool wasError = Kumir::Core::getError().length()>0;
AnyValue v = variable.value(); AnyValue v = variable.value();
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