What should happen here?

Steven Schveighoffer schveiguy at gmail.com
Wed Sep 22 19:14:43 UTC 2021


On 9/22/21 3:10 PM, Adam D Ruppe wrote:
> On Wednesday, 22 September 2021 at 18:30:41 UTC, Ali Çehreli wrote:
>> Shouldn't preserving the contents of registers be the responsibility 
>> of the compiler or the GC?
> 
> The compiler thinks the contents don't need to be preserved at all.
> 
> One thing we might do is if passing a pointer to an extern(C) function, 
> the compiler assumes it shouldn't stomp the memory until end of scope.

What if you are calling D functions that call extern(C) functions?

I don't think this is the answer either.

-Steve


More information about the Digitalmars-d mailing list