Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-41670: Remove outdated predict macro invocation. #22026

Merged
merged 6 commits into from Sep 29, 2020

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Aug 31, 2020

Comment on lines 1 to 2
Prevent line trace being skipped on Windows and Mac when a for loop is
nested within a try-except block.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would mention "Python compiled without USE_COMPUTED_GOTOS" instead because there isn't anything platform-specific AFAIK

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Computed gotos are a GCC specific feature, and is always on the release builds on platforms that use GCC.
We don't use GCC for Windows or Mac.
So it is kinda platform specific.
As far as the user is concerned, it's the platform they are using, not the compiler that we use that's relevant.

Copy link
Member

@pablogsal pablogsal Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Computed gotos are a GCC specific feature, and is always on the release builds on platforms that use GCC.

computed gotos (the capability) is actually a C language extension supported on many compilers (including gcc, clang, icc...but not the Microsoft compiler). It can perfectly be activated in Mac with clang for instance.

For instance, here is the test suite of clang: https://github.com/llvm-mirror/clang/blob/eba646b53dd71389216e9a36837fa204b934f8de/test/AST/ast-dump-stmt.c#L130

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I think we're already using computed gotos on mac according to @nedbat's comment here: nedbat/coveragepy#959 (comment)

@markshannon markshannon merged commit 17b5be0 into python:master Sep 29, 2020
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
Remove PREDICTion of POP_BLOCK from FOR_ITER.
@markshannon markshannon deleted the remove-old-predict branch October 19, 2020 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants