Permalink
Browse files

Observe that consts is not populated until the arg-encoding step.

  • Loading branch information...
Andy Chu
Andy Chu committed Mar 20, 2018
1 parent 13db25e commit ed4d1fb1d1ae2c45e945ea856b3efb235e768a83
Showing with 5 additions and 4 deletions.
  1. +1 −1 opy/_regtest/dis-md5.golden.txt
  2. +4 −3 opy/compiler2/pyassem.py
@@ -192,7 +192,7 @@
21796 a74a8eb36df7fc545c32c5d701e38343 _tmp/regtest/tools/osh2oil.pyc
22097 c6fd4a05622d86589afbfcf44ca35539 _tmp/regtest/sre_parse.pyc
22612 ec17564464fe966907c394a15822e422 _tmp/regtest/string.pyc
23097 68b5610e6c0213d0817468389b3f7870 _tmp/regtest/core/process.pyc
23100 bbdb014b37ecca3485e01533c1d15e0c _tmp/regtest/core/process.pyc
23289 fd442b90b743fc6cb5285d56bed13c06 _tmp/regtest/core/completion.pyc
23686 ae954683df01986a8d54a289703b79ca _tmp/regtest/opy/byterun/test_basic.pyc
24100 0eeedc4798d57ee8e66eb31b25619923 _tmp/regtest/core/state.pyc
View
@@ -393,14 +393,15 @@ def checkFlag(self, flag):
def MakeCodeObject(self):
"""Assemble a Python code object."""
# TODO: Split into two representations? Graph and insts?
# Do we need a shared varnames representation?
# NOTE: It would be nice to split this into two representations: graph
# and insts. Maybe VarContext?
stacksize = ComputeStackDepth(self.blocks, self.entry, self.exit)
blocks = OrderBlocks(self.entry, self.exit)
insts = FlattenGraph(blocks)
self.consts.insert(0, self.docstring)
assert len(self.consts) == 0, self.consts
self.consts.append(self.docstring)
# Rearrange self.cellvars so the ones in self.varnames are first.
# And prune from freevars (?)

0 comments on commit ed4d1fb

Please sign in to comment.