[LEGACY MM] Escape making extra increments and decrements during coping to the same array (#4731)

(cherry picked from commit 8b601d8e2c6bc772386ebd88d303a032a6f54237)
This commit is contained in:
LepilkinaElena
2021-03-04 13:54:49 +03:00
committed by Space
parent f9f948fea6
commit fcbb921194
7 changed files with 70 additions and 8 deletions
@@ -210,6 +210,8 @@ void ZeroStackRef(ObjHeader** location) RUNTIME_NOTHROW;
void UpdateStackRef(ObjHeader** location, const ObjHeader* object) RUNTIME_NOTHROW;
// Updates heap/static data location.
void UpdateHeapRef(ObjHeader** location, const ObjHeader* object) RUNTIME_NOTHROW;
// Updates heap/static data in one array.
void UpdateHeapRefsInsideOneArray(const ArrayHeader* array, int fromIndex, int toIndex, int count) RUNTIME_NOTHROW;
// Updates location if it is null, atomically.
void UpdateHeapRefIfNull(ObjHeader** location, const ObjHeader* object) RUNTIME_NOTHROW;
// Updates reference in return slot.