MCPcopy Create free account
hub / github.com/WheretIB/nullc / SelectVariableByName

Function SelectVariableByName

NULLC/Callbacks.cpp:278–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278HashMap<VariableInfo*>::Node* SelectVariableByName(InplaceStr name)
279{
280 VariableSelect f;
281 NamespaceSelect(name, f);
282 HashMap<VariableInfo*>::Node *curr = f.curr;
283 // In generic function instance, skip all variables that are defined after the base generic function
284 while(curr && currDefinedFunc.size() && currDefinedFunc.back()->genericBase && !(curr->value->pos >> 24) && !(curr->value->parentType) && (curr->value->isGlobal ? currDefinedFunc.back()->genericBase->globalVarTop <= curr->value->pos : (currDefinedFunc.back()->genericBase->blockDepth < curr->value->blockDepth && currDefinedFunc.back() != curr->value->parentFunction)))
285 curr = varMap.next(curr);
286 return curr;
287}
288
289void AddInplaceVariable(const char* pos, TypeInfo* targetType = NULL);
290void ConvertArrayToUnsized(const char* pos, TypeInfo *dstType);

Callers 3

AddGetAddressNodeFunction · 0.85
GetCurrentArgumentTypeFunction · 0.85
AddFunctionCallNodeFunction · 0.85

Calls 3

NamespaceSelectFunction · 0.85
sizeMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected