add a SETUP_WITH opcode

It speeds up the with statement and correctly looks up the special
methods involved.
This commit is contained in:
Benjamin Peterson 2009-05-25 13:13:44 +00:00
parent 179bf213ea
commit 1880d8b823
9 changed files with 86 additions and 66 deletions

View file

@ -181,7 +181,10 @@ hasfree.append(137)
def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8)
def_op('CALL_FUNCTION_KW', 141) # #args + (#kwargs << 8)
def_op('CALL_FUNCTION_VAR_KW', 142) # #args + (#kwargs << 8)
def_op('EXTENDED_ARG', 143)
EXTENDED_ARG = 143
jrel_op('SETUP_WITH', 143)
def_op('EXTENDED_ARG', 145)
EXTENDED_ARG = 145
del def_op, name_op, jrel_op, jabs_op