Subject: [sv-bc] RE: [sv-ec] LRM-193 through LRM-195
From: Steven Sharp (sharp@cadence.com)
Date: Fri Jan 30 2004 - 15:31:40 PST
>If module bot is in a separate compilation unit, and no import p::*
>was in effect inside that compilation unit, then f() would resolve
>to top.f(). No chance to even detect the f() in package p.
But module mid did import p::*, and thus f() could have been imported
into module mid. If f() is imported into module mid, would it not
appear in the symbol table of module mid and be available for resolution
by the upward search? If so, then Arturo is wrong about the "heisenberg"
property of pulling in the declaration. You could tell whether it had
been done or not, even without any references. So it has to be defined.
BTW, I am having a problem with this whole module vs. compilation unit
thing. You have implied that if any module in a compilation unit has
a reference to a package object, then it is pulled into the compilation
unit. But surely it is pulled into a module, not a compilation unit.
Why should pulling it into one module affect whether it gets pulled
into another module in the same compilation unit? Suppose I compile a
module that has no references to the package object, so I don't add the
name to that module's symbol table. Then later in the same file, there
is another module that does reference the package object. Are you
suggesting that I have to go back to the earlier module (which I am
already done compiling) and add the package object to its symbol table,
just because some other unrelated module referenced it? If so, why?
Steven Sharp
sharp@cadence.com
This archive was generated by hypermail 2b28 : Fri Jan 30 2004 - 15:44:43 PST