Files
Nim/lib
Miran 40093b4a93 [backport:1.2] Avoid inlining of newObj and newObjRC1 calls (#17582)
This is taken from:
af69b3ceae

Full original comment:

This is to avoid heavy inlining happening when two allocation calls
would occur shortly after each other.

This inlining would sometimes be accompanied with an optimisation
as the compiler is able to see that cellToUsr ending the first
allocation call is shortly followed by an usrToCell call. The
pointer arithmetic is redundant and the compiler can eliminate it,
leaving only the cell address in a register (and later the stack)
instead of the actual pointer to the user data, as one would expect.

This combined with a GC collect cycle will cause the stack scan to
only notice the cell address, which is of no good due to a usrToCell
in the gcMark call which shifts that address to an adjacent cell.
This means that the actual cell of importance will not get marked
and thus cause a premature collection of that cell. BOOM.
2021-03-30 10:20:58 +02:00
..
2017-02-20 17:24:19 +02:00
2021-03-29 16:23:19 +02:00
2021-02-18 22:47:21 -08:00
2021-02-18 22:47:21 -08:00
2021-03-21 10:35:55 +01:00
2021-03-30 08:07:45 +02:00
2013-03-16 23:53:07 +01:00
2021-02-18 22:47:21 -08:00
2021-02-18 22:47:21 -08:00
2021-03-29 14:39:49 +02:00