Commit Graph

54 Commits

Author SHA1 Message Date
Jeremy Hylton 0fdffcf916 rapid evolution towards producing real .pyc files (even though I don't
handle most of the language syntax yet)

create NestedCodeGenerator used to generator the separate code object
that needs to be passed as an argument to MAKE_FUNCTION when a def
stmt is found (probably useful for class too)

change CodeGenerator.visitFunction to use the NestedCG

add CompiledModule class to handle creation of .pyc (pretty minimal
for now)

add makeCodeObject method to PythonVMCode that replaces symbolic names
with indexes into slots of the code code.  the design of this
class will probably need to be revised.
2000-02-04 19:37:35 +00:00
Jeremy Hylton 8b6323d3ef checking in initial weekend's work
compile.py: ASTVisitor framework plus bits of a code generator that
    should be bug-for-buf compatible with compile.c

misc.py: Set and Stack helpers

test.py: a bit of simple sample code that compile.py will work on
2000-02-04 00:28:21 +00:00
Jeremy Hylton 106a02da94 make p2c a package 2000-02-04 00:25:34 +00:00
Jeremy Hylton f968e8545d three files from the p2c cvs tree. the message here indicates the
revision number the p2c cvs tree.

COPYRIGHT: 1.1
ast.py: 1.3
transformer.py: 1.11
2000-02-04 00:25:23 +00:00