remove now redundant initial pointer saving

This commit is contained in:
Jake Hillion 2023-04-06 13:20:48 -07:00 committed by Jake Hillion
parent cd2fa8c9ef
commit feaf0e86ed
2 changed files with 1 additions and 7 deletions

View File

@ -251,7 +251,6 @@ void FuncGen::DefineTopLevelGetSizeRef(std::string& testCode,
data[2] = 0;
size_t dataSegOffset = 3 * sizeof(uintptr_t);
OIInternal::StoreData((uintptr_t)(&t), dataSegOffset);
JLOG("%1% @");
JLOGPTR(&t);
OIInternal::getSizeType(t, dataSegOffset);
@ -279,7 +278,6 @@ void FuncGen::DefineTopLevelGetSizeRefRet(std::string& testCode,
pointers.initialize();
size_t ret = 0;
pointers.add((uintptr_t)&t);
SAVE_DATA((uintptr_t)t);
OIInternal::getSizeType(t, ret);
return ret;
}
@ -305,7 +303,6 @@ void FuncGen::DefineTopLevelGetSizeSmartPtr(std::string& testCode,
data[2] = 0;
size_t dataSegOffset = 3 * sizeof(uintptr_t);
OIInternal::StoreData((uintptr_t)(&t), dataSegOffset);
OIInternal::getSizeType(t, dataSegOffset);
OIInternal::StoreData((uintptr_t)123456789, dataSegOffset);

View File

@ -40,7 +40,7 @@ extern "C" {
}
/* Tag indicating if the pointer has been followed or skipped */
enum class TrackPointerTag: uint64_t {
enum class TrackPointerTag : uint64_t {
/* The content has been skipped.
* It prevents double counting the footprint of a node the JIT code has seen
* before, double counting content being stored inline, or getting stuck in an
@ -225,9 +225,6 @@ void TreeBuilder::build(const std::vector<uint64_t>& data,
auto& rootID = rootIDs.emplace_back(nextNodeID++);
try {
// The first value is the address of the root object. Drop it as we don't
// need to manage pointer deduplication anymore.
next();
process(rootID, {.type = type, .name = argName, .typePath = argName});
} catch (...) {
// Mark the failure using the error node ID