void VariableResolver::visit(StructDeclaration &strct)
{
TraversingVisitor::visit(strct);
- stage->types[strct.name] = &strct;
+ stage->types.insert(make_pair(strct.name, &strct));
}
void VariableResolver::visit(VariableDeclaration &var)
var.interface = block_interface;
TraversingVisitor::visit(var);
- current_block->variables[var.name] = &var;
+ current_block->variables.insert(make_pair(var.name, &var));
}
void VariableResolver::visit(InterfaceBlock &iface)
{
/* Block names can't be used for any other identifiers so we can put them
in the same map with instance names. */
- stage->interface_blocks[iface.name] = &iface;
+ stage->interface_blocks.insert(make_pair(iface.name, &iface));
if(!iface.instance_name.empty())
- stage->interface_blocks[iface.instance_name] = &iface;
+ stage->interface_blocks.insert(make_pair(iface.instance_name, &iface));
SetForScope<string> set_iface(block_interface, iface.interface);
TraversingVisitor::visit(iface);
}
iface_target_block->body.insert(iface_insert_point, iface_var);
- iface_target_block->variables[name] = iface_var;
+ iface_target_block->variables.insert(make_pair(name, iface_var));
return iface_var;
}
}
iface_target_block->body.insert(iface_insert_point, in_block);
- stage->interface_blocks[in_block->name] = in_block;
+ stage->interface_blocks.insert(make_pair(in_block->name, in_block));
if(!in_block->instance_name.empty())
- stage->interface_blocks[in_block->instance_name] = in_block;
+ stage->interface_blocks.insert(make_pair(in_block->instance_name, in_block));
SetFlag set_scope(function_scope, false);
SetForScope<Block *> set_block(current_block, &stage->content);