Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13009)

Delta Between Two Patch Sets: Python/ceval.c

Issue 11682: PEP 380 reference implementation for 3.3
Left Patch Set: Created 7 years, 9 months ago
Right Patch Set: Created 7 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« Objects/exceptions.c ('K') | « Python/ast.c ('k') | Python/compile.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after
2726 } 2726 }
2727 2727
2728 TARGET_WITH_IMPL(MAKE_CLOSURE, _make_function) 2728 TARGET_WITH_IMPL(MAKE_CLOSURE, _make_function)
2729 TARGET(MAKE_FUNCTION) 2729 TARGET(MAKE_FUNCTION)
2730 _make_function: 2730 _make_function:
2731 { 2731 {
2732 int posdefaults = oparg & 0xff; 2732 int posdefaults = oparg & 0xff;
2733 int kwdefaults = (oparg>>8) & 0xff; 2733 int kwdefaults = (oparg>>8) & 0xff;
2734 int num_annotations = (oparg >> 16) & 0x7fff; 2734 int num_annotations = (oparg >> 16) & 0x7fff;
2735 2735
2736 w = POP(); /* qualname */
2736 v = POP(); /* code object */ 2737 v = POP(); /* code object */
2737 x = PyFunction_New(v, f->f_globals); 2738 x = PyFunction_NewWithQualName(v, f->f_globals, w);
2738 Py_DECREF(v); 2739 Py_DECREF(v);
2740 Py_DECREF(w);
2739 2741
2740 if (x != NULL && opcode == MAKE_CLOSURE) { 2742 if (x != NULL && opcode == MAKE_CLOSURE) {
2741 v = POP(); 2743 v = POP();
2742 if (PyFunction_SetClosure(x, v) != 0) { 2744 if (PyFunction_SetClosure(x, v) != 0) {
2743 /* Can't happen unless bytecode is corrupt. */ 2745 /* Can't happen unless bytecode is corrupt. */
2744 why = WHY_EXCEPTION; 2746 why = WHY_EXCEPTION;
2745 } 2747 }
2746 Py_DECREF(v); 2748 Py_DECREF(v);
2747 } 2749 }
2748 2750
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after
4650 Py_DECREF(l); 4652 Py_DECREF(l);
4651 return NULL; 4653 return NULL;
4652 } 4654 }
4653 PyList_SetItem(l, i, x); 4655 PyList_SetItem(l, i, x);
4654 } 4656 }
4655 return l; 4657 return l;
4656 #endif 4658 #endif
4657 } 4659 }
4658 4660
4659 #endif 4661 #endif
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+