[fpc-devel] Functors

2021-12-25 Thread Blaise--- via fpc-devel
I propose that the support for https://en.wikipedia.org/wiki/Function_object be added to the FPC. A subset of such functionality already existed as a part of my implementation of closures, so I extended that part to implement the core feature for allowing functors -- overloading of the call op

[fpc-devel] $modeswitch Closures

2021-12-25 Thread Blaise--- via fpc-devel
The attached modeswitch_closures.patch introduces {$modeswitch Closures}; it is included in {$mode Delphi}. There is a distinction between anonymous routines (defined in-place, without a name) and closures (capture the context they are invoked with). The switch encompasses both, but goes for t

[fpc-devel] Overlapping addresses between 2 procedures in dwarf info / 3.2.0

2021-12-25 Thread Martin Frb via fpc-devel
I am looking at some oddity I found following up https://forum.lazarus.freepascal.org/index.php/topic,57568.0.html Unfortunately, I have no code yet to reproduce it. I have looked at the generated debug info, as given by objdump. file format pei-x86-64   Compilation Unit @ offset 0x0:    Length