Nick Coghlan wrote: > It builds the symbol table before actually trying to compile anything. This is > what allows it to figure out which load commands to use for which symbols. Yes, nowadays I expect it makes two passes over the parse tree for each function, one to build the symbol table and one to generate the bytecode. It used to make a single pass over the parse tree and then post-process the bytecode once it had figured out which variables were local -- which I suppose you could call one-and-a-bit passes. :-) The distinction between one and two passes isn't so important in a dynamic language like Python anyway, since most of the interesting things happen at run time. -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg.ewing at canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4