bool Function::insertDataBlock(const DataBlock::Ptr &dblock) { if (isFrozen_) throw Exception(printableName() + " is frozen or attached to the CFG/AUM"); if (dblock==NULL) return false; return insertUnique(dblocks_, dblock, sortDataBlocks); }
void AbstractModuleRecord::dump() { dataLog("\nAnalyzing ModuleRecord key(", printableName(m_moduleKey), ")\n"); dataLog(" Dependencies: ", m_requestedModules.size(), " modules\n"); for (const auto& moduleName : m_requestedModules) dataLog(" module(", printableName(moduleName), ")\n"); dataLog(" Import: ", m_importEntries.size(), " entries\n"); for (const auto& pair : m_importEntries) { const ImportEntry& importEntry = pair.value; dataLog(" import(", printableName(importEntry.importName), "), local(", printableName(importEntry.localName), "), module(", printableName(importEntry.moduleRequest), ")\n"); } dataLog(" Export: ", m_exportEntries.size(), " entries\n"); for (const auto& pair : m_exportEntries) { const ExportEntry& exportEntry = pair.value; switch (exportEntry.type) { case ExportEntry::Type::Local: dataLog(" [Local] ", "export(", printableName(exportEntry.exportName), "), local(", printableName(exportEntry.localName), ")\n"); break; case ExportEntry::Type::Indirect: dataLog(" [Indirect] ", "export(", printableName(exportEntry.exportName), "), import(", printableName(exportEntry.importName), "), module(", printableName(exportEntry.moduleName), ")\n"); break; } } for (const auto& moduleName : m_starExportEntries) dataLog(" [Star] module(", printableName(moduleName.get()), ")\n"); }
static String printableName(const Identifier& ident) { return printableName(ident.impl()); }