D on next-gen consoles and for game development

Michel Fortin michel.fortin at michelf.ca
Fri May 31 03:54:32 PDT 2013


On 2013-05-31 06:02:20 +0000, Rainer Schuetze <r.sagitario at gmx.de> said:

> On 30.05.2013 22:59, Benjamin Thaut wrote:
>>> One possible complication: memory block operations would have to treat
>>> pointer fields differently somehow.
>> 
>> Would they? Shouldn't it be possible to make this part of the post-blit
>> constructor?
> 
> Not in general, e.g. reference counting needs to know the state before 
> and after the copy.

No. Reference counting would work with post-blit: you have the pointer, 
you just need to increment the reference count once. Also, if you're 
moving instead of copying there's no post-blit called but there's also 
no need to change the reference count so it's fine.

What wouldn't work with post-blit (I think) is a concurrent GC, as the 
GC will likely want to be notified when pointers are moved. Post-blit 
doesn't help there, and the compiler currently assumes it can move 
things around without calling any function.

-- 
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca/



More information about the Digitalmars-d mailing list