| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* Execute compiled code */ | 2 /* Execute compiled code */ |
| 3 | 3 |
| 4 /* XXX TO DO: | 4 /* XXX TO DO: |
| 5 XXX speed up searching for keywords by using a dictionary | 5 XXX speed up searching for keywords by using a dictionary |
| 6 XXX document it! | 6 XXX document it! |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /* enable more aggressive intra-module optimizations, where available */ | 9 /* enable more aggressive intra-module optimizations, where available */ |
| 10 #define PY_LOCAL_AGGRESSIVE | 10 #define PY_LOCAL_AGGRESSIVE |
| (...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1469 w = POP(); | 1469 w = POP(); |
| 1470 u = POP(); | 1470 u = POP(); |
| 1471 PyErr_Restore(v, w, u); | 1471 PyErr_Restore(v, w, u); |
| 1472 why = WHY_RERAISE; | 1472 why = WHY_RERAISE; |
| 1473 break; | 1473 break; |
| 1474 } | 1474 } |
| 1475 else if (v != Py_None) { | 1475 else if (v != Py_None) { |
| 1476 PyErr_SetString(PyExc_SystemError, | 1476 PyErr_SetString(PyExc_SystemError, |
| 1477 "'finally' pops bad exception"); | 1477 "'finally' pops bad exception"); |
| 1478 why = WHY_EXCEPTION; | 1478 why = WHY_EXCEPTION; |
| 1479 } | |
| 1480 /* | |
| 1481 Make sure the exception state is cleaned up befo re | |
| 1482 the end of an except block. This ensures objects | |
| 1483 referenced by the exception state are not kept | |
| 1484 alive too long. | |
| 1485 See #2507. | |
|
jhylton
2008/05/06 12:59:48
We don't have a lot of comments that refer to spec
Antoine Pitrou
2008/05/06 15:19:41
On 2008/05/06 12:59:48, jhylton wrote:
> We don't
| |
| 1486 */ | |
|
Antoine Pitrou
2008/05/02 22:17:07
Hmm, it looks like I have gone past the 79-column
| |
| 1487 if (tstate->frame->f_exc_type != NULL) | |
| 1488 reset_exc_info(tstate); | |
| 1489 else { | |
| 1490 assert(tstate->frame->f_exc_value == NULL); | |
| 1491 assert(tstate->frame->f_exc_traceback == NULL); | |
|
jhylton
2008/05/06 12:59:48
I'd move the asserts outside of the else. They sh
Antoine Pitrou
2008/05/06 15:19:41
On 2008/05/06 12:59:48, jhylton wrote:
> I'd move
| |
| 1479 } | 1492 } |
| 1480 Py_DECREF(v); | 1493 Py_DECREF(v); |
| 1481 break; | 1494 break; |
| 1482 | 1495 |
| 1483 case LOAD_BUILD_CLASS: | 1496 case LOAD_BUILD_CLASS: |
| 1484 x = PyDict_GetItemString(f->f_builtins, | 1497 x = PyDict_GetItemString(f->f_builtins, |
| 1485 "__build_class__"); | 1498 "__build_class__"); |
| 1486 if (x == NULL) { | 1499 if (x == NULL) { |
| 1487 PyErr_SetString(PyExc_ImportError, | 1500 PyErr_SetString(PyExc_ImportError, |
| 1488 "__build_class__ not found"); | 1501 "__build_class__ not found"); |
| (...skipping 2542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4031 Py_DECREF(l); | 4044 Py_DECREF(l); |
| 4032 return NULL; | 4045 return NULL; |
| 4033 } | 4046 } |
| 4034 PyList_SetItem(l, i, x); | 4047 PyList_SetItem(l, i, x); |
| 4035 } | 4048 } |
| 4036 return l; | 4049 return l; |
| 4037 #endif | 4050 #endif |
| 4038 } | 4051 } |
| 4039 | 4052 |
| 4040 #endif | 4053 #endif |
| OLD | NEW |