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

Delta Between Two Patch Sets: cgen/templates/inlined/PyRangeIter_Type

Issue 14757: INCA: Inline Caching meets Quickening in Python 3.3
Left Patch Set: Created 1 year ago
Right Patch Set: Created 1 year 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
« no previous file with change/comment | « cgen/templates/inlined/PyLong_Type ('k') | cgen/templates/instr-targets.h.impl » ('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 typedef struct { 2 typedef struct {
3 PyObject_HEAD 3 PyObject_HEAD
4 long index; 4 long index;
5 long start; 5 long start;
6 long step; 6 long step;
7 long len; 7 long len;
8 } rangeiterobject; 8 } rangeiterobject;
9 9
10 if (((rangeiterobject*)v)->index < ((rangeiterobject*)v)->len) { 10 if (((rangeiterobject*)v)->index < ((rangeiterobject*)v)->len) {
11 /* cast to unsigned to avoid possible signed overflow 11 /* cast to unsigned to avoid possible signed overflow
12 in intermediate calculations. */ 12 in intermediate calculations. */
13 x= PyLong_FromLong((long)(((rangeiterobject*)v)->start + 13 x= PyLong_FromLong((long)(((rangeiterobject*)v)->start +
14 (unsigned long)(((rangeiterobject*)v)- >index++) 14 (unsigned long)(((rangeiterobject*)v)- >index++)
15 * ((rangeiterobject*)v)->step)); 15 * ((rangeiterobject*)v)->step));
16 PUSH(x); 16 PUSH(x);
17 DISPATCH(); 17 DISPATCH();
18 } 18 }
19 else { 19 else {
20 x = NULL; 20 x = NULL;
21 goto FOR_ITER_CONTINUE; 21 goto FOR_ITER_CONTINUE;
22 } // if 22 } // if
23 } 23 }
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7