DIP20: Volatile read/write intrinsics

Alex Rønne Petersen alex at lycus.org
Wed Oct 10 22:40:39 PDT 2012


On 11-10-2012 07:14, Chad J wrote:
> On 10/10/2012 02:31 PM, Alex Rønne Petersen wrote:
>> http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP20
>>
>> This supersedes DIP17.
>>
>> The primary reason to use intrinsics instead of something built into the
>> language is that the latter is too complex for current (and likely also
>> future) compiler implementations.
>>
>> Destroy!
>>
>
> Since this can affect semantics but might not always be available, is
> there any chance you could add a feature detection intrinsic for this?
> Maybe a compile-time "haveVolatileOps" identifier would work.
>
> Volatility might be absent if:
> - The backend target can't forward the volatility guarantees, ex: a D
> compiler that emits JavaScript code.
> - The compiler has not implemented volatile operations yet.

I suppose a simple D_Volatile version identifier will do, like we have 
D_SIMD for core.simd.__simd.

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d mailing list