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

#27213: Rework CALL_FUNCTION* opcodes

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 4 months ago by storchaka+cpython
Modified:
1 year, 1 month ago
Reviewers:
gunkmute, yselivanov, victor.stinner
CC:
haypo, rbcollins, Mark.Shannon, devnull_psf.upfronthosting.co.za, berkerpeksag, storchaka, Yury Selivanov, serprex
Visibility:
Public.

Patch Set 1 #

Total comments: 7

Patch Set 2 #

Total comments: 16

Patch Set 3 #

Total comments: 3

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Patch Set 7 #

Total comments: 1

Patch Set 8 #

Patch Set 9 #

Patch Set 10 #

Total comments: 8

Patch Set 11 #

Patch Set 12 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Include/abstract.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -3 lines 0 comments Download
Lib/dis.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -2 lines 0 comments Download
Lib/test/test_compileall.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
Lib/test/test_extcall.py View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -8 lines 0 comments Download
Lib/test/test_traceback.py View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -2 lines 0 comments Download
Objects/abstract.c View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +7 lines, -19 lines 0 comments Download
Objects/methodobject.c View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
Python/ceval.c View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +57 lines, -84 lines 0 comments Download
Python/compile.c View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -5 lines 0 comments Download
Python/importlib.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1447 lines, -1447 lines 0 comments Download
Python/importlib_external.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1909 lines, -1909 lines 0 comments Download

Messages

Total messages: 9
storchaka
http://bugs.python.org/review/27213/diff/17684/Python/ceval.c File Python/ceval.c (right): http://bugs.python.org/review/27213/diff/17684/Python/ceval.c#newcode4791 Python/ceval.c:4791: call_function_kw(PyObject ***pp_stack, Py_ssize_t oparg call_function() and call_function_kw() looks mostly ...
1 year, 4 months ago #1
serprex
http://bugs.python.org/review/27213/diff/17684/Python/compile.c File Python/compile.c (right): http://bugs.python.org/review/27213/diff/17684/Python/compile.c#newcode3449 Python/compile.c:3449: if (nseen) { On 2016/06/20 17:41:31, storchaka wrote: > ...
1 year, 4 months ago #2
serprex
http://bugs.python.org/review/27213/diff/17700/Python/ceval.c File Python/ceval.c (right): http://bugs.python.org/review/27213/diff/17700/Python/ceval.c#newcode2696 Python/ceval.c:2696: PEEK(1 + num_maps)); '1 +' should be '2 +'
1 year, 4 months ago #3
storchaka
http://bugs.python.org/review/27213/diff/17700/Lib/importlib/_bootstrap_external.py File Lib/importlib/_bootstrap_external.py (right): http://bugs.python.org/review/27213/diff/17700/Lib/importlib/_bootstrap_external.py#newcode229 Lib/importlib/_bootstrap_external.py:229: # Python 3.6a1 3373 (CALL_FUNCTIONs simplification) 3.6a3 Please add ...
1 year, 3 months ago #4
storchaka
http://bugs.python.org/review/27213/diff/17781/Python/ceval.c File Python/ceval.c (right): http://bugs.python.org/review/27213/diff/17781/Python/ceval.c#newcode2700 Python/ceval.c:2700: PyObject *func = (PEEK(2 + num_maps)); Redundant parentheses. http://bugs.python.org/review/27213/diff/17781/Python/compile.c ...
1 year, 3 months ago #5
serprex
http://bugs.python.org/review/27213/diff/17700/Python/compile.c File Python/compile.c (right): http://bugs.python.org/review/27213/diff/17700/Python/compile.c#newcode3431 Python/compile.c:3431: int musttupleunpack = 0, mustdictunpack = 0; On 2016/06/30 ...
1 year, 3 months ago #6
Yury Selivanov
http://bugs.python.org/review/27213/diff/18427/Python/ceval.c File Python/ceval.c (right): http://bugs.python.org/review/27213/diff/18427/Python/ceval.c#newcode2851 Python/ceval.c:2851: PyObject *func = PEEK(2 + oparg); Why is it ...
1 year, 1 month ago #7
haypo
http://bugs.python.org/review/27213/diff/18447/Lib/test/test_traceback.py File Lib/test/test_traceback.py (right): http://bugs.python.org/review/27213/diff/18447/Lib/test/test_traceback.py#newcode355 Lib/test/test_traceback.py:355: self.assertIn(int(re.search(r"\d+", actual[-2]).group()), range(rec_limit-60, rec_limit)) The change looks ok, but ...
1 year, 1 month ago #8
storchaka
1 year, 1 month ago #9
http://bugs.python.org/review/27213/diff/18447/Lib/test/test_traceback.py
File Lib/test/test_traceback.py (right):

http://bugs.python.org/review/27213/diff/18447/Lib/test/test_traceback.py#new...
Lib/test/test_traceback.py:355: self.assertIn(int(re.search(r"\d+",
actual[-2]).group()), range(rec_limit-60, rec_limit))
On 2016/09/09 23:35:18, haypo wrote:
> The change looks ok, but I would like to understand: why do we have to
increase
> this number?

Seems the number 50 is arbitrary. Now we should increase it. Why? This issue
needs further investigation. Maybe this is a sign of regression.

http://bugs.python.org/review/27213/diff/18447/Python/ceval.c
File Python/ceval.c (left):

http://bugs.python.org/review/27213/diff/18447/Python/ceval.c#oldcode2662
Python/ceval.c:2662: }
On 2016/09/09 23:35:18, haypo wrote:
> Can you please elaborate this change?
> 
> Should I understand that the new compiler skips directly the
BUILD_TUPLE_UNPACK
> opcode?

The new compiler no longer produces the BUILD_TUPLE_UNPACK opcode for single
tuple.

http://bugs.python.org/review/27213/diff/18447/Python/ceval.c#oldcode2856
Python/ceval.c:2856: }
On 2016/09/09 23:35:18, haypo wrote:
> Same question.

The new compiler no longer produces the BUILD_MAP_UNPACK_WITH_CALL opcode for
single dict.

http://bugs.python.org/review/27213/diff/18447/Python/ceval.c
File Python/ceval.c (right):

http://bugs.python.org/review/27213/diff/18447/Python/ceval.c#newcode3467
Python/ceval.c:3467: if (!PyTuple_Check(callargs)) {
On 2016/09/09 23:35:18, haypo wrote:
> Do we need PyTuple_CheckExact() instead of PyTuple_Check() here?

Old code checked PyTuple_Check(). All seems working.
Sign in to reply to this message.

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