Re: 2 Pass Binder
Bernie Ryan wrote:
>Rob:
> Why not on the FIRST PASS of bind, scan the source and build a symbol
> table that contains
> 1: any time a constant or variable is used
> 2: any time a function is used
> 3: any time a procedure is used
> The final result is symbol table containing a list of each item used.
> The next pass you do the real bind and anything that is not in the
> the symbol table is thrown away.
Because that wouldn't work with routine_id(). If you have several
routines that are ONLY accessed via call_func/proc, there's a
good chance you'll throw away necessary code.
Sure, if routine_id is always given a literal as a parameter, no
problem; but when you have a any sort of variable passed in, this
method won't work.
Rod
|
Not Categorized, Please Help
|
|