| 5235 | } |
| 5236 | |
| 5237 | void AddAliasType(InplaceStr aliasName) |
| 5238 | { |
| 5239 | AliasInfo *info = TypeInfo::CreateAlias(aliasName, currType); |
| 5240 | if(newType && (!currDefinedFunc.size() || newType->definitionDepth > currDefinedFunc.back()->vTopSize)) // If we're inside a class definition, but _not_ inside a function |
| 5241 | { |
| 5242 | // Create alias and add it to type alias list, so that after type definition is finished, local aliases will be deleted |
| 5243 | info->next = newType->childAlias; |
| 5244 | newType->childAlias = info; |
| 5245 | }else if(currDefinedFunc.size()){ // If we're inside a function |
| 5246 | // Create alias and add it to function alias list, so that after function is finished, local aliases will be deleted |
| 5247 | info->next = currDefinedFunc.back()->childAlias; |
| 5248 | currDefinedFunc.back()->childAlias = info; |
| 5249 | }else{ |
| 5250 | // Create alias and add it to global alias list |
| 5251 | info->next = CodeInfo::globalAliases; |
| 5252 | CodeInfo::globalAliases = info; |
| 5253 | } |
| 5254 | // Insert hash->type pair to class map, so that target type can be found by alias name |
| 5255 | CodeInfo::classMap.insert(GetStringHash(aliasName.begin, aliasName.end), currType); |
| 5256 | } |
| 5257 | |
| 5258 | void AddUnfixedArraySize() |
| 5259 | { |
no test coverage detected