This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Split ceval.c into small files
Type: Stage:
Components: Versions: Python 3.6
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, pitrou, rhettinger, serhiy.storchaka, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2016-02-05 17:43 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
split_ceval.patch vstinner, 2016-02-05 17:43 review
Messages (5)
msg259682 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-02-05 17:43
Attached patch splits the huge "switch (opcode)" of ceval.c into smaller ceval_xxx.h files. New files:

   93 Python/ceval_stack.h
  142 Python/ceval_condjump.h
  155 Python/ceval_misc.h
  162 Python/ceval_fast.h
  180 Python/ceval_module.h
  238 Python/ceval_ctx.h
  249 Python/ceval_func.h
  262 Python/ceval_iter.h
  268 Python/ceval_build.h
  384 Python/ceval_number.h

Maybe we can put more files per .h file, maybe less. I don't really care.

It will allow to keep the code readable even with new optimizations like the issue #21955.

What do you think?
msg259683 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-02-05 17:56
I don't think this will make the code more readable. Rather less readable, since macros are defined in different file than used.
msg259687 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-02-05 19:37
I have a similar worry as Serhiy as I don't know where to find something like GET_AWAITABLE with that organization.
msg259769 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-02-07 08:52
I'm also -1 on the split for the reasons listed by Brett and Serhiy.
msg259845 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-02-08 13:58
Ok. At least I tried :-) With 3 strongs -1 votes, and no positive vote, I abandon my change.
History
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70486
2016-02-08 13:58:04vstinnersetstatus: open -> closed
resolution: rejected
messages: + msg259845
2016-02-07 08:52:55rhettingersetnosy: + rhettinger
messages: + msg259769
2016-02-05 19:37:45brett.cannonsetnosy: + brett.cannon
messages: + msg259687
2016-02-05 17:56:58serhiy.storchakasetmessages: + msg259683
2016-02-05 17:43:14vstinnercreate