[Issue 19573] usage of delegate literals at compile-time allocates closure at run-time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 25 13:45:18 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=19573
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |INVALID
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
No closure is allocated. What you are seeing is just an instantiation of
isCallable with a delegate type (which is the correct type, given that the
context of main is accessed). However if you look at the disassembly code:
000000000004271c <_Dmain>:
4271c: 55 push %rbp
4271d: 48 8b ec mov %rsp,%rbp
42720: 48 83 ec 10 sub $0x10,%rsp
42724: 31 c0 xor %eax,%eax
42726: 89 45 f8 mov %eax,-0x8(%rbp)
42729: c9 leaveq
4272a: c3 retq
No closure allocated. Closing as invalid.
Please reopen if any other information that makes a compelling case for the bug
report is presented.
--
More information about the Digitalmars-d-bugs
mailing list