From: Howard T. <how...@di...> - 2007-08-03 11:59:12
|
Hi Eric, On Friday 03 August 2007 11:30, you wrote: > Howard Thomson wrote: > > The advantage of having the option to retain the existing 'C' routines > > for such simple operations is the ability to report assertion failures > > and to provide precise details about the feature where an assertion > > fails, but for production code having a (frozen) routine generated to > > execute a single instruction is less than ideal. > > Instead of having special treatment for those features in > basic types, I wanted to have them handled by a more general > "inlining" mechanism that would work for other user-written > classes containing small and easily inlinable routines as well. > But I didn't have time implement such mechanism yet. I agree that this is the way to go, to inline where: The called feature is statically known, as for a frozen or expanded target class, or the dynamic type set count is one and dynamic class loading etc is prohibited. The recursively totalled count of Instructions does not exceed some specifiable limit. Either there are no assertions, assertions are not enabled for the inlined code, or possibly assertions are inlined as well with restricted reporting of the assertion information. I may have a go at it sometime, once I fully understand how the code generation system works with regard to passing arguments to routines and consequently how to adapt generated references to routine arguments to the arguments being supplied to inlined code. > > Is there yet an agreed basis for the semantics of 'once' functions in a > > multi-threaded environment ? Where and how does one specifiy the variety > > of once semantics that applies to a given feature ? > > This is specified in the ECMA Eiffel standard document. > Did you download it already? I have previously downloaded it, and had forgotten that it is now specified therein. Thanks ! I must re-subscribe to the gobo-eiffel-develop list ... Regards, Howard Thomson -- "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -- Albert Einstein |