| 100 | } |
| 101 | |
| 102 | bool CompileHelper::loopDetected(PathId fileId, uint32_t lineNumber, |
| 103 | CompileDesign* compileDesign, |
| 104 | ValuedComponentI* instance) { |
| 105 | #if defined(_WIN32) || defined(__MINGW32__) || defined(__CYGWIN__) |
| 106 | constexpr int32_t kMaxAllowedStackDepth = 100; |
| 107 | #else |
| 108 | constexpr int32_t kMaxAllowedStackDepth = 1000; |
| 109 | #endif |
| 110 | if (m_checkForLoops) { |
| 111 | if ((m_stackLevel > kMaxAllowedStackDepth) || (m_unwind)) { |
| 112 | std::string instName; |
| 113 | if (ModuleInstance* inst = |
| 114 | valuedcomponenti_cast<ModuleInstance*>(instance)) { |
| 115 | instName = inst->getFullPathName(); |
| 116 | } |
| 117 | Location loc(fileId, lineNumber, 0, m_symbols->registerSymbol(instName)); |
| 118 | Error err(ErrorDefinition::ELAB_EXPRESSION_LOOP, loc); |
| 119 | m_errors->addError(err); |
| 120 | m_unwind = true; |
| 121 | return true; |
| 122 | } |
| 123 | } |
| 124 | return false; |
| 125 | } |
| 126 | |
| 127 | bool CompileHelper::importPackage(DesignComponent* scope, Design* design, |
| 128 | const FileContent* fC, NodeId id, |
nothing calls this directly
no test coverage detected