|
From: Stephen W. <st...@ic...> - 2008-04-19 17:14:28
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: | --- On Fri, 4/18/08, Stephen Williams <st...@ic...> wrote: | |> Or have it return an enum with a range: |> |> ~ NO_DELAYS = 0 |> ~ NO_KNOWN_DELAYS = 1 |> ~ KNOWN_DELAYS = 3 | | If this is the route I go I think it should be NO_DELAY, POSSIBLE_DELAY and DEFINITE_DELAY. I think the code will be cleaner if we pass a control flag vs checking both possibilities and combining them correctly. Can you think of a case where we would need to know the three different states? Your names are much better, yes. Well, if you pass a control flag to the calculation of this state, then you are implying that it is calculated on demand, possibly multiple times (and possibly no times) whereas if you just calculate the more expressive value, then you can reuse the value for different needs. (Again, perhaps you need it zero times.) My sense is that if every always statement is going to need this value, then it is going to be needed almost always, and might as well be calculated during elaboration. It strikes me that it will be very easy to calculate during elaboration, skipping the need for a post-process recursive test later when the data is needed. It can be that the expressive enum value be hidden behind a pair of boolean methods that the clients use, so this method if calculating the expressive value can have any reasonable interface. Hmm, I'm thinking about where this information may be used, and I'm starting to realize that only NO_DELAY is useful. If you have an always statement, you want to generate a warning if it IS NO_DELAY, and if the NetProc is a function definition you want to generate an error if it is NOT NO_DELAY. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFICih4rPt1Sc2b3ikRAiyIAKDkfent8Ca/HJPFQ1x0Ao+KNH955gCfUZU7 UUMXHy+nzO2GU0L/GQi60lI= =7uuP -----END PGP SIGNATURE----- |