Side by Side Diff

Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(462)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Side by Side Diff: Python/eval.cc

Issue 97117: Use type feedback to generate type guards
Patch Set: Update to head Created 16 years, 3 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:
View unified diff | Download patch
« no previous file with comments | « Lib/test/test_llvm.py ('k') | Python/llvm_fbuilder.h » ('j') | no next file with comments »
('i') | ('e') | ('c') | ('s')
OLDNEW
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 1513 matching lines...) | | Loading...
1524 SET_TOP(x); 1524 SET_TOP(x);
1525 if (x == NULL) { 1525 if (x == NULL) {
1526 why = UNWIND_EXCEPTION; 1526 why = UNWIND_EXCEPTION;
1527 break; 1527 break;
1528 } 1528 }
1529 DISPATCH(); 1529 DISPATCH();
1530 1530
1531 TARGET(LIST_APPEND) 1531 TARGET(LIST_APPEND)
1532 w = POP(); 1532 w = POP();
1533 v = POP(); 1533 v = POP();
1534 RECORD_TYPE(0, v);
1535 RECORD_TYPE(1, w);
1536 err = PyList_Append(v, w); 1534 err = PyList_Append(v, w);
1537 Py_DECREF(v); 1535 Py_DECREF(v);
1538 Py_DECREF(w); 1536 Py_DECREF(w);
1539 if (err != 0) { 1537 if (err != 0) {
1540 why = UNWIND_EXCEPTION; 1538 why = UNWIND_EXCEPTION;
1541 break; 1539 break;
1542 } 1540 }
1543 PREDICT(JUMP_ABSOLUTE); 1541 PREDICT(JUMP_ABSOLUTE);
1544 DISPATCH(); 1542 DISPATCH();
1545 1543
(...skipping 230 matching lines...) | | Loading...
1776 } 1774 }
1777 DISPATCH(); 1775 DISPATCH();
1778 1776
1779 TARGET(SLICE_NONE) 1777 TARGET(SLICE_NONE)
1780 w = NULL; 1778 w = NULL;
1781 v = NULL; 1779 v = NULL;
1782 goto _slice_common; 1780 goto _slice_common;
1783 TARGET(SLICE_LEFT) 1781 TARGET(SLICE_LEFT)
1784 w = NULL; 1782 w = NULL;
1785 v = POP(); 1783 v = POP();
1784 RECORD_TYPE(1, v);
1786 goto _slice_common; 1785 goto _slice_common;
1787 TARGET(SLICE_RIGHT) 1786 TARGET(SLICE_RIGHT)
1788 w = POP(); 1787 w = POP();
1789 v = NULL; 1788 v = NULL;
1789 RECORD_TYPE(2, w);
1790 goto _slice_common; 1790 goto _slice_common;
1791 TARGET(SLICE_BOTH) 1791 TARGET(SLICE_BOTH)
1792 w = POP(); 1792 w = POP();
1793 v = POP(); 1793 v = POP();
1794 RECORD_TYPE(1, v);
1795 RECORD_TYPE(2, w);
1794 _slice_common: 1796 _slice_common:
1795 u = TOP(); 1797 u = TOP();
1796 RECORD_TYPE(0, u); 1798 RECORD_TYPE(0, u);
1797 RECORD_TYPE(1, v);
1798 RECORD_TYPE(2, w);
1799 x = _PyEval_ApplySlice(u, v, w); 1799 x = _PyEval_ApplySlice(u, v, w);
1800 Py_DECREF(u); 1800 Py_DECREF(u);
1801 Py_XDECREF(v); 1801 Py_XDECREF(v);
1802 Py_XDECREF(w); 1802 Py_XDECREF(w);
1803 SET_TOP(x); 1803 SET_TOP(x);
1804 if (x == NULL) { 1804 if (x == NULL) {
1805 why = UNWIND_EXCEPTION; 1805 why = UNWIND_EXCEPTION;
1806 break; 1806 break;
1807 } 1807 }
1808 DISPATCH(); 1808 DISPATCH();
1809 1809
1810 TARGET(STORE_SLICE_NONE) 1810 TARGET(STORE_SLICE_NONE)
1811 w = NULL; 1811 w = NULL;
1812 v = NULL; 1812 v = NULL;
1813 goto _store_slice_common; 1813 goto _store_slice_common;
1814 TARGET(STORE_SLICE_LEFT) 1814 TARGET(STORE_SLICE_LEFT)
1815 w = NULL; 1815 w = NULL;
1816 v = POP(); 1816 v = POP();
1817 RECORD_TYPE(1, v);
1817 goto _store_slice_common; 1818 goto _store_slice_common;
1818 TARGET(STORE_SLICE_RIGHT) 1819 TARGET(STORE_SLICE_RIGHT)
1819 w = POP(); 1820 w = POP();
1820 v = NULL; 1821 v = NULL;
1822 RECORD_TYPE(1, v);
1821 goto _store_slice_common; 1823 goto _store_slice_common;
1822 TARGET(STORE_SLICE_BOTH) 1824 TARGET(STORE_SLICE_BOTH)
1823 w = POP(); 1825 w = POP();
1824 v = POP(); 1826 v = POP();
1827 RECORD_TYPE(1, v);
1828 RECORD_TYPE(2, w);
1825 _store_slice_common: 1829 _store_slice_common:
1826 u = POP(); 1830 u = POP();
1827 t = POP(); 1831 t = POP();
1828 RECORD_TYPE(0, u); 1832 RECORD_TYPE(0, u);
1829 RECORD_TYPE(1, v);
1830 RECORD_TYPE(2, w);
1831 // Don't bother recording the assigned object. 1833 // Don't bother recording the assigned object.
1832 err = _PyEval_AssignSlice(u, v, w, t); /* u[v:w] = t */ 1834 err = _PyEval_AssignSlice(u, v, w, t); /* u[v:w] = t */
1833 Py_DECREF(t); 1835 Py_DECREF(t);
1834 Py_DECREF(u); 1836 Py_DECREF(u);
1835 Py_XDECREF(v); 1837 Py_XDECREF(v);
1836 Py_XDECREF(w); 1838 Py_XDECREF(w);
1837 if (err != 0) { 1839 if (err != 0) {
1838 why = UNWIND_EXCEPTION; 1840 why = UNWIND_EXCEPTION;
1839 break; 1841 break;
1840 } 1842 }
(...skipping 82 matching lines...) | | Loading...
1923 TARGET(RAISE_VARARGS_TWO) 1925 TARGET(RAISE_VARARGS_TWO)
1924 u = NULL; 1926 u = NULL;
1925 v = POP(); 1927 v = POP();
1926 w = POP(); 1928 w = POP();
1927 goto _raise_varargs_common; 1929 goto _raise_varargs_common;
1928 TARGET(RAISE_VARARGS_THREE) 1930 TARGET(RAISE_VARARGS_THREE)
1929 u = POP(); 1931 u = POP();
1930 v = POP(); 1932 v = POP();
1931 w = POP(); 1933 w = POP();
1932 _raise_varargs_common: 1934 _raise_varargs_common:
1933 PY_LOG_TSC_EVENT(EXCEPT_RAISE_EVAL); 1935 » » » PY_LOG_TSC_EVENT(EXCEPT_RAISE_EVAL);
1936 » » » // Only the type matters for dispatching.
1934 RECORD_TYPE(0, w); 1937 RECORD_TYPE(0, w);
1935 RECORD_TYPE(1, v);
1936 RECORD_TYPE(2, u);
1937 why = _PyEval_DoRaise(w, v, u); 1938 why = _PyEval_DoRaise(w, v, u);
1938 break; 1939 break;
1939 1940
1940 TARGET(RETURN_VALUE) 1941 TARGET(RETURN_VALUE)
1941 retval = POP(); 1942 retval = POP();
1942 why = UNWIND_RETURN; 1943 why = UNWIND_RETURN;
1943 goto fast_block_end; 1944 goto fast_block_end;
1944 1945
1945 TARGET(YIELD_VALUE) 1946 TARGET(YIELD_VALUE)
1946 retval = POP(); 1947 retval = POP();
(...skipping 2992 matching lines...) | | Loading...
4939 Py_DECREF(l); 4940 Py_DECREF(l);
4940 return NULL; 4941 return NULL;
4941 } 4942 }
4942 PyList_SetItem(l, i, x); 4943 PyList_SetItem(l, i, x);
4943 } 4944 }
4944 return l; 4945 return l;
4945 #endif 4946 #endif
4946 } 4947 }
4947 4948
4948 #endif 4949 #endif
OLDNEW
« no previous file with comments | « Lib/test/test_llvm.py ('k') | Python/llvm_fbuilder.h » ('j') | no next file with comments »
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /