If one has: class C; virtual task static t(int x); endtask endclass class D extends C; task static t(int x); endtask endclass How should one think about "this" and "x" in terms of the two bodies of "t"? Is "this" implicitly automatic? Is there one "x" or two? Should simultaneous calls to "t" in C be able to interfere with the value of "x" in the "t" in D? More to the point -- is this even a sensible thing to permit in the LRM? It seems to me that from first principles, the concept of "virtual" and "static lifetime" are at least somewhat contradictory. We could clarify the rules, but is it really worthwhile? I'd be happy to make it illegal to have static lifetime for a virtual method. It is also arguable (though less strange) that "static lifetime" should really only be permitted for class static routines. You do run into some oddness with "this" if that isn't the case -- i.e. is "this" really a static lifetime implicit formal or is it automatic and the rest static? I'd be happy to restrict static lifetime to static methods as well. I'll enter a mantis item on this and will add a proposal if people are in favor of one or both of the restrictions. Gord. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Jun 14 10:15:40 2007
This archive was generated by hypermail 2.1.8 : Thu Jun 14 2007 - 10:16:02 PDT