MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / beforeArray

Method beforeArray

src/simulate/simulate_gc.cpp:377–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375 return ((ti->firstType->flags | gcAlways) & gcFlags) || ((ti->secondType->flags | gcAlways) & gcFlags);
376 }
377 virtual void beforeArray ( Array * PA, TypeInfo * ti ) override {
378 auto tsize = ti->firstType->size * PA->capacity;
379 DAS_ASSERT(tsize==getTypeSize(ti->firstType)*PA->capacity);
380 char * pa = PA->data;
381 PtrRange rdata(pa, tsize);
382 if ( reportHeap && tsize && markRange(rdata) ) {
383 if ( describe_ptr(pa, tsize) ) {
384 describeInfo(ti);
385 ReportHistory();
386 tp << "ARRAY " << getTypeInfoMangledName(ti) << "\n";
387 }
388 }
389 pushRange(rdata);
390 }
391 virtual void afterArray ( Array *, TypeInfo * ) override {
392 popRange();
393 }

Callers

nothing calls this directly

Calls 2

getTypeSizeFunction · 0.85
getTypeInfoMangledNameFunction · 0.85

Tested by

no test coverage detected