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

Method recognize

src/simulate/heap.cpp:250–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248 }
249
250 void StringHeapAllocator::recognize ( char * str ) {
251 if ( !str ) return;
252 uint32_t length = uint32_t(strlen(str));
253 uint64_t size = uint64_t(length) + 1;
254 size = (size + 15) & ~15;
255 if ( needIntern && isOwnPtr(str, size) ) {
256 internMap.insert(StrHashEntry(str,length));
257 }
258 }
259
260 char * ConstStringAllocator::intern(const char * str, uint64_t length) const {
261 DAS_ASSERTF(length <= UINT32_MAX, "intern requires length < 4GB, got %llu", (unsigned long long)length);

Callers 3

AddMethod · 0.80
SetAddMethod · 0.80
jit_str_catFunction · 0.80

Calls 3

isOwnPtrFunction · 0.85
StrHashEntryClass · 0.85
insertMethod · 0.45

Tested by

no test coverage detected