Justin Tullgren
04/26/2021, 6:23 PMIrFunctionAccessExpression
value parameter for use in another expression? I keep being told I am creating the const or getter twice when i am modifying a function bodyJustin Tullgren
04/26/2021, 6:25 PMJustin Tullgren
04/26/2021, 6:27 PMshikasd
04/26/2021, 6:31 PM.deepCopyWithSymbols()
My guess is that every element in IR should be referentially unique, function above will create a copy of itshikasd
04/26/2021, 6:32 PMirGet
that. It will also prevent executing the value parameter expression twicdJustin Tullgren
04/26/2021, 6:33 PMJustin Tullgren
04/26/2021, 6:33 PMshikasd
04/26/2021, 6:35 PMirTemporary
or something like that, don't remember the exact name
It is fairly simple, you just add that as a statement with correct initial value and then create your own irGet
referencing that temporary variableJustin Tullgren
04/26/2021, 6:37 PMrnett
04/26/2021, 6:38 PMirTemporary
is only available in certain builder scopes (IrBlockBody I think), but you can usually create a temp variable anyways using the Impl classshikasd
04/26/2021, 6:42 PMJustin Tullgren
04/26/2021, 7:10 PM