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

Function CheckVariable

NULLC/Executor_Common.cpp:401–420  ·  view source on GitHub ↗

Function that decides, how variable of type 'type' should be checked for pointers

Source from the content-addressed store, hash-verified

399
400 // Function that decides, how variable of type 'type' should be checked for pointers
401 void CheckVariable(char* ptr, const ExternTypeInfo& type)
402 {
403 if(!type.pointerCount)
404 return;
405 switch(type.subCat)
406 {
407 case ExternTypeInfo::CAT_ARRAY:
408 CheckArray(ptr, type);
409 break;
410 case ExternTypeInfo::CAT_POINTER:
411 MarkPointer(ptr, type, true);
412 break;
413 case ExternTypeInfo::CAT_CLASS:
414 CheckClass(ptr, type);
415 break;
416 case ExternTypeInfo::CAT_FUNCTION:
417 CheckFunction(ptr);
418 break;
419 }
420 }
421}
422
423// Set range of memory that is not checked. Used to exclude pointers to stack from marking and GC

Callers 3

CheckClassFunction · 0.70
CheckFunctionFunction · 0.70
MarkUsedBlocksFunction · 0.70

Calls 4

CheckArrayFunction · 0.70
MarkPointerFunction · 0.70
CheckClassFunction · 0.70
CheckFunctionFunction · 0.70

Tested by

no test coverage detected