Alan Burlison wrote in perl.perl6.internals :
> Piers Cawley wrote:
> 
>>   Small Perl task for the interested
>>     Want to get involved in the Parrot development process? Don't know much
>>     about Virtual Machine design and implementation? Do know Perl? Dan has a
>>     small but interesting task for you.
>> 
>>     At present, Parrot gets built without any compiler level optimizations
>>     turned on because files like tsq.c can't have any optimizations turned
>>     on (tsq.c is the thread safe queue module, which is "annoyingly
>>     execution-order-dependent because it has to operate safely as interrupt
>>     code potentially interrupting itself").
>> 
>>     Dan would like a version of Configure.pl which can build a makefile (or
>>     whatever build tool we end up using) with per-C-file compiler flags, and
>>     it needs to be possible to override those flags, per file, by the
>>     platform configuration module.
> 
> Hmm, I'm only a lurker, but that looks *very* suspect to me.  Some compilers 
> may choose to reorder even without optimization turned on.  I'd say that it 
> is a bug in Parrot if it requires optimization to be off for this code - how 
> many different compilers have you tried?

That doesn't make this per-C-file-cc-option-tweaking necessarily
unuseful. Perl 5 uses something similar, because the lexer is sometimes
miscompiled when some compilers with a high optimization level. Example :
see the hints files and lookup "XXX_cflags" or "toke_cflags" in
hints/README.hints.

Reply via email to