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-98831: Identify instructions that don't use oparg by gvanrossum · Pull Request #100957 · python/cpython

Conversation

@gvanrossum

@gvanrossum gvanrossum commented Jan 11, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

For these the instr_format field uses I_ instead of IB.
Register instructions use I_, IB, IBB_, IBBB, etc.

  • Issue: Generate the interpreter #98831

Sorry, something went wrong.

Uh oh!

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

All reactions
@gvanrossum
Identify instructions that don't use oparg
6f88a1d
For these the instr_format field uses I_ instead of IB.
Register instructions use I_, IB, IBB_, IBBB, etc.
@gvanrossum gvanrossum added the skip news label Jan 11, 2023
@gvanrossum
gvanrossum requested a review from brandtbucher January 11, 2023 20:59
@bedevere-bot bedevere-bot added the awaiting core review label Jan 11, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jan 11, 2023
Generate the interpreter #98831
Closed
gvanrossum added 2 commits January 11, 2023 13:02
@gvanrossum
Merge remote-tracking branch 'origin/main' into cases-oparg
eeba509
@gvanrossum
Include the closing '}' in Blob.tokens, for completeness
2abfe9a
brandtbucher
brandtbucher requested changes Jan 12, 2023
View reviewed changes

@brandtbucher brandtbucher 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.

Looks mostly good, just a bit confused by the register formats you're generating.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Tools/cases_generator/generate_cases.py
fmt = "I" + "B"*num_regs + "_"*num_dummies
else:
fmt = "IB"
if variable_used(inst.block, "oparg"):

@brandtbucher brandtbucher Jan 12, 2023

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.

We don't know the actual opcode values yet, do we? If so, maybe we want to warn or something if this conflicts with HAVE_ARGUMENT.

Sorry, something went wrong.

Uh oh!

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

All reactions

@gvanrossum gvanrossum Jan 12, 2023

Copy link
Copy Markdown
Member Author

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.

Alas, we don't. I'd have to load opcode.py using the hack from your PR, which feels more infrastructure than I want to invest in for now (nothing is using the opcode metadata yet).

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Python/opcode_metadata.h Resolved

Uh oh!

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

Comment thread Tools/cases_generator/generate_cases.py Resolved

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting core review label Jan 12, 2023
@bedevere-bot

bedevere-bot commented Jan 12, 2023

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 Jan 12, 2023
@gvanrossum
Use 'X' for dummy byte; fix register pad formula
bfcbffb
@gvanrossum gvanrossum added skip news and removed skip news labels Jan 12, 2023
@gvanrossum

gvanrossum commented Jan 12, 2023

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 Jan 12, 2023
@bedevere-bot

bedevere-bot commented Jan 12, 2023

Copy link
Copy Markdown

Thanks for making the requested changes!

@brandtbucher: 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 brandtbucher January 12, 2023 05:32
brandtbucher
brandtbucher approved these changes Jan 14, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting change review labels Jan 14, 2023
@gvanrossum
gvanrossum merged commit 5134ef4 into python:main Jan 14, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Jan 14, 2023
@gvanrossum
gvanrossum deleted the cases-oparg branch January 14, 2023 01:06
@gvanrossum gvanrossum mentioned this pull request Jan 16, 2023
Variable length instructions faster-cpython/ideas#540
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brandtbucher brandtbucher brandtbucher approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@gvanrossum @bedevere-bot @brandtbucher
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.