Related articles |
---|
[6 earlier articles] |
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-18) |
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-18) |
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-18) |
Re: How is the concept of scope implemented? kamalpr@hp.com (kamal) (2008-11-18) |
Re: How is the concept of scope implemented? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-11-19) |
Re: How is the concept of scope implemented? yangjunpro@gmail.com (yangjunpro: Target locked-->Ruby++) (2008-11-18) |
Re: How is the concept of scope implemented? j.vimal@gmail.com (Vimal) (2008-11-19) |
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-19) |
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-19) |
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-19) |
Re: How is the concept of scope implemented? lkrupp@pssw.com (Louis Krupp) (2008-11-21) |
From: | Vimal <j.vimal@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Wed, 19 Nov 2008 21:45:02 +0530 |
Organization: | Compilers Central |
References: | 08-11-054 08-11-062 08-11-089 |
Keywords: | storage, symbols, comment |
Posted-Date: | 19 Nov 2008 19:55:12 EST |
> I like the multiple table method, or some kind of
> hierarchial/multi-data-structure thing. It seems to me though that
> keeping track of the current scope can be a potential source of
> inefficiency. For example:
I think the compiler keeps the multiple table method only during
compilation time, to *fix* the addresses. In your example:
>
> Developer writes:
>
> void my_func()
> {
> // func code
> }
>
Say we have an `int a;' inside my_func(); the compiler knows that its
offset is x bytes from the stack pointer (say). It needn't know the
absolute address and needn't have to output code to compute the
address during run time. So, I doubt there is much of *computation*
(at run time) that takes place in statically scoped languages.
Yes, in dynamically scoped, there will be issues. I am curious -- Are
there any dynamically scoped compiled languages?
--
Vimal
[Some versions of Lisp can compile dynamically scoped code, albeit not
all that efficiently. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.