1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-14 05:07:05 +01:00

Hadrons: VM fixes

This commit is contained in:
2017-12-14 19:42:16 +00:00
parent 842754bea9
commit 591a38c487
2 changed files with 19 additions and 1 deletions

View File

@ -83,6 +83,24 @@ void VirtualMachine::pushModule(VirtualMachine::ModPt &pt)
}
m.input.push_back(env().getObjectAddress(ref));
}
auto inCopy = m.input;
// if module has inputs with references, they need to be added as
// an input
for (auto &in: inCopy)
{
int inm = env().getObjectModule(in);
if (inm > 0)
{
if (getModule(inm)->getReference().size() > 0)
{
for (auto &rin: getModule(inm)->getReference())
{
m.input.push_back(env().getObjectAddress(rin));
}
}
}
}
module_.push_back(std::move(m));
address = static_cast<unsigned int>(module_.size() - 1);
moduleAddress_[name] = address;