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

@ -141,8 +141,10 @@ extern "C" {
#define CALL_FUNCTION_KW 141 /* #args + (#kwargs<<8) */
#define CALL_FUNCTION_VAR_KW 142 /* #args + (#kwargs<<8) */
#define SETUP_WITH 143
/* Support for opargs more than 16 bits long */
#define EXTENDED_ARG 143
#define EXTENDED_ARG 145
enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE, PyCmp_GT=Py_GT, PyCmp_GE=Py_GE,