| 283 | return (ByteCode*)nullcGetModule(name); |
| 284 | } |
| 285 | void ImportEnd(char const* s, char const* e) |
| 286 | { |
| 287 | (void)s; (void)e; // C4100 |
| 288 | importPath.append(".nc"); |
| 289 | ByteCode *code = (ByteCode*)nullcGetModule(importPath.c_str()); |
| 290 | if(!code && (code = BuildModule(importPath.c_str())) == NULL) |
| 291 | { |
| 292 | logStream << "ERROR: can't find module '" << importPath << "'\r\n"; |
| 293 | }else{ |
| 294 | ExternTypeInfo *tInfo = FindFirstType(code); |
| 295 | const char *symbols = (char*)(code) + code->offsetToSymbols; |
| 296 | for(unsigned int i = 0; i < code->typeCount; i++, tInfo++) |
| 297 | { |
| 298 | if(tInfo->subCat != ExternTypeInfo::CAT_CLASS) |
| 299 | continue; |
| 300 | bool found = false; |
| 301 | for(unsigned int n = 0; n < typeInfo.size() && !found; n++) |
| 302 | { |
| 303 | if(tInfo->nameHash == typeInfo[n]) |
| 304 | found = true; |
| 305 | } |
| 306 | if(found) |
| 307 | continue; |
| 308 | const char *typeName = symbols + tInfo->offsetToName; |
| 309 | typeInfo.push_back(GetStringHash(typeName)); |
| 310 | while((typeName = strchr(typeName, '.')) != NULL) |
| 311 | { |
| 312 | typeName++; |
| 313 | typeInfo.push_back(GetStringHash(typeName)); |
| 314 | } |
| 315 | } |
| 316 | struct NamespaceData |
| 317 | { |
| 318 | unsigned offsetToName; |
| 319 | unsigned parentHash; |
| 320 | }; |
| 321 | NamespaceData *namespaceList = (NamespaceData*)((char*)code + code->offsetToNamespaces); |
| 322 | for(unsigned i = 0; i < code->namespaceCount; i++) |
| 323 | { |
| 324 | typeInfo.push_back(GetStringHash(symbols + namespaceList->offsetToName)); |
| 325 | namespaceList++; |
| 326 | } |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | void StartType(char const* s, char const* e) |
| 331 | { |
nothing calls this directly
no test coverage detected