| 4775 | } |
| 4776 | |
| 4777 | UHDM::any *CompileHelper::compileComplexFuncCall( |
| 4778 | DesignComponent *component, const FileContent *fC, NodeId name, |
| 4779 | CompileDesign *compileDesign, Reduce reduce, UHDM::any *pexpr, |
| 4780 | ValuedComponentI *instance, bool muteErrors) { |
| 4781 | UHDM::Serializer &s = compileDesign->getSerializer(); |
| 4782 | UHDM::any *result = nullptr; |
| 4783 | NodeId dotedName = fC->Sibling(name); |
| 4784 | |
| 4785 | bool hierPath = false; |
| 4786 | NodeId tmp = dotedName; |
| 4787 | while (fC->Type(tmp) == VObjectType::paAttribute_instance) { |
| 4788 | tmp = fC->Sibling(tmp); |
| 4789 | dotedName = tmp; |
| 4790 | } |
| 4791 | NodeId List_of_arguments; |
| 4792 | while (tmp) { |
| 4793 | if (fC->Type(tmp) == VObjectType::slStringConst || |
| 4794 | fC->Type(tmp) == VObjectType::paMethod_call_body || |
| 4795 | fC->Type(tmp) == VObjectType::paSubroutine_call) { |
| 4796 | hierPath = true; |
| 4797 | } else if (fC->Type(tmp) == VObjectType::paList_of_arguments) { |
| 4798 | List_of_arguments = tmp; |
| 4799 | } |
| 4800 | tmp = fC->Sibling(tmp); |
| 4801 | } |
| 4802 | |
| 4803 | if (fC->Type(name) == VObjectType::paDollar_root_keyword) { |
| 4804 | hier_path *path = s.MakeHier_path(); |
| 4805 | path->VpiParent(pexpr); |
| 4806 | VectorOfany *elems = s.MakeAnyVec(); |
| 4807 | path->Path_elems(elems); |
| 4808 | NodeId Dollar_root_keyword = name; |
| 4809 | NodeId nameId = fC->Sibling(Dollar_root_keyword); |
| 4810 | ref_obj *ref = s.MakeRef_obj(); |
| 4811 | elems->push_back(ref); |
| 4812 | ref->VpiName("$root"); |
| 4813 | ref->VpiFullName("$root"); |
| 4814 | ref->VpiParent(path); |
| 4815 | fC->populateCoreMembers(nameId, nameId, ref); |
| 4816 | |
| 4817 | std::string name = StrCat("$root.", fC->SymName(nameId)); |
| 4818 | ref = s.MakeRef_obj(); |
| 4819 | elems->push_back(ref); |
| 4820 | ref->VpiName(fC->SymName(nameId)); |
| 4821 | ref->VpiFullName(fC->SymName(nameId)); |
| 4822 | ref->VpiParent(path); |
| 4823 | fC->populateCoreMembers(nameId, nameId, ref); |
| 4824 | |
| 4825 | nameId = fC->Sibling(nameId); |
| 4826 | while (nameId) { |
| 4827 | if (fC->Type(nameId) == VObjectType::slStringConst) { |
| 4828 | name.append(".").append(fC->SymName(nameId)); |
| 4829 | ref = s.MakeRef_obj(); |
| 4830 | elems->push_back(ref); |
| 4831 | ref->VpiName(fC->SymName(nameId)); |
| 4832 | ref->VpiFullName(fC->SymName(nameId)); |
| 4833 | ref->VpiParent(path); |
| 4834 | fC->populateCoreMembers(nameId, nameId, ref); |
nothing calls this directly
no test coverage detected