Re: [fpc-devel] Progress on pure functions

2022-12-15 Thread J. Gareth Moreton via fpc-devel
The field sharing refers to this: "What I mean is that if a function is marked as "pure" or "inline" (or both), only one copy of the unoptimised node tree is stored in the "inlininginfo" field, and both "pass1_pure" and "pass1_inline" duplicate this tree and transform it as needed. Because

Re: [fpc-devel] Progress on pure functions

2022-12-15 Thread Sven Barth via fpc-devel
Am 16.12.2022 um 02:02 schrieb J. Gareth Moreton via fpc-devel: The purity analysis process is very dependent on the node tree being as clean as possible, and so depends on a fair few merge requests that have not yet been approved.  I'm guessing Florian and Jonas and others are somewhat busy,

Re: [fpc-devel] Progress on pure functions

2022-12-15 Thread J. Gareth Moreton via fpc-devel
The purity analysis process is very dependent on the node tree being as clean as possible, and so depends on a fair few merge requests that have not yet been approved.  I'm guessing Florian and Jonas and others are somewhat busy, what with being December and all. -

Re: [fpc-devel] Progress on pure functions

2022-12-15 Thread J. Gareth Moreton via fpc-devel
What I mean is that if a function is marked as "pure" or "inline" (or both), only one copy of the unoptimised node tree is stored in the "inlininginfo" field, and both "pass1_pure" and "pass1_inline" duplicate this tree and transform it as needed.  Because only the unoptimised tree is stored,

Re: [fpc-devel] Progress on pure functions

2022-12-15 Thread Sven Barth via fpc-devel
Am 14.12.2022 um 12:15 schrieb J. Gareth Moreton via fpc-devel: To better explain how purity analysis currently works (I'm sure there's a better name than "purity analysis"), it takes a copy of the unoptimised node tree (this is the same as the tree used for inline, and for a space saving,