Replacing C's memcpy with a D implementation

Mike Franklin slavo5150 at yahoo.com
Mon Jun 11 03:21:04 UTC 2018


On Monday, 11 June 2018 at 02:49:00 UTC, Mike Franklin wrote:

> The compiler implementation is faulty.  It rewrites the 
> expressions to an `extern(C)` runtime implementation that is 
> not @safe, nothrow, or pure:  
> https://github.com/dlang/druntime/blob/706081f3cb23f4c597cc487ce16ad3d2ed021053/src/rt/lifetime.d#L1442  The backend is not involved.

Also, understand that this lowering happens in the IR generation 
stage:  
https://github.com/dlang/dmd/blob/3a79629988efd51d4dda9edb38a6701cd097da89/src/dmd/e2ir.d#L2616 so semantic analysis is not performed on the runtime call.  If it were, it would fail to compile.

Mike




More information about the Digitalmars-d mailing list