GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-99876: make optimizer maintain the invariant that oparg == 0 for an instruction that does not have an arg by iritkatriel · Pull Request #99877 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Nov 29, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This is nice to have anyway, but even more so when we transition to 3-opargs. (After this PR we do not use HAS_ARG outside of assertions and debug printing).

Fixes #99876.

  • Issue: compiler optimizations violate oparg invariants #99876

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iritkatriel
pythongh-99876: make optimizer maintain the invariant that oparg == 0…
5e4c199
… for an instruction that does not have an arg
@iritkatriel
iritkatriel requested a review from markshannon as a code owner November 29, 2022 16:07
@bedevere-bot bedevere-bot mentioned this pull request Nov 29, 2022
compiler optimizations violate oparg invariants #99876
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Nov 29, 2022
@iritkatriel iritkatriel added skip news interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Nov 29, 2022
@iritkatriel
iritkatriel requested a review from sweeneyde November 29, 2022 16:28
@iritkatriel
magic number
a9bfc0d
@iritkatriel
iritkatriel marked this pull request as draft November 29, 2022 17:34
iritkatriel added 2 commits November 29, 2022 18:36
@iritkatriel
Revert "magic number"
dfff7b8
This reverts commit a9bfc0d.
@iritkatriel
fix INSTR_SET_OP1 macro to access arg once
e911001
@iritkatriel
iritkatriel marked this pull request as ready for review November 29, 2022 19:08
@iritkatriel
Merge branch 'main' into instr_set_op
1f2657c
markshannon
markshannon requested changes Nov 30, 2022
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Invariants are always good.
A few minor issues.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Python/compile.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/compile.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/compile.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting core review label Nov 30, 2022
@bedevere-bot

bedevere-bot commented Nov 30, 2022

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label Nov 30, 2022
iritkatriel added 2 commits November 30, 2022 12:50
@iritkatriel
implement Mark's suggestions
857db4e
@iritkatriel
Merge remote-tracking branch 'upstream/main' into instr_set_op
4d046a7
@iritkatriel

iritkatriel commented Nov 30, 2022

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Nov 30, 2022
@bedevere-bot

bedevere-bot commented Nov 30, 2022

Copy link
Copy Markdown

Thanks for making the requested changes!

@markshannon: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from markshannon November 30, 2022 12:53
markshannon
markshannon approved these changes Nov 30, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels Nov 30, 2022
@markshannon

markshannon commented Nov 30, 2022

Copy link
Copy Markdown
Member

👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iritkatriel
iritkatriel merged commit 18a6967 into python:main Nov 30, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Nov 30, 2022
carljm added a commit to carljm/cpython that referenced this pull request Dec 1, 2022
@carljm
Merge branch 'main' into fixinspect
12f7659
* main: (112 commits)
  pythongh-99894: Ensure the local names don't collide with the test file in traceback suggestion error checking (python#99895)
  pythongh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (pythonGH-99613)
  Doc: Add summary line to isolation_level & autocommit sqlite3.connect params (python#99917)
  pythonGH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (pythonGH-98916)
  pythongh-89189: More compact range iterator (pythonGH-27986)
  bpo-47220: Document the optional callback parameter of weakref.WeakMethod (pythonGH-25491)
  pythonGH-99905: Fix output of misses in summarize_stats.py execution counts (pythonGH-99906)
  pythongh-99845: PEP 670: Convert PyObject macros to functions (python#99850)
  pythongh-99845: Use size_t type in __sizeof__() methods (python#99846)
  pythonGH-99877)
  Fix typo in exception message in `multiprocessing.pool` (python#99900)
  pythongh-87092: move all localsplus preparation into separate function called from assembler stage (pythonGH-99869)
  pythongh-99891: Fix infinite recursion in the tokenizer when showing warnings (pythonGH-99893)
  pythongh-99824: Document that sqlite3.connect implicitly open a transaction if autocommit=False (python#99825)
  pythonGH-81057: remove static state from suggestions.c (python#99411)
  Improve zip64 limit error message (python#95892)
  pythongh-98253: Break potential reference cycles in external code worsened by typing.py lru_cache (python#98591)
  pythongh-99127: Allow some features of syslog to the main interpreter only (pythongh-99128)
  pythongh-82836: fix private network check (python#97733)
  Docs: improve accuracy of socketserver reference (python#24767)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon approved these changes
@sweeneyde sweeneyde Awaiting requested review from sweeneyde

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

compiler optimizations violate oparg invariants

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@iritkatriel @bedevere-bot @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.