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-105481: add OPCODE_IS_INSTRUMENTED (generated from bytecodes.c) to replace MIN_INSTRUMENTED_OPCODE (defined in opcode.py) by iritkatriel · Pull Request #107276 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Jul 25, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Issue: Generate opcode metadata from bytecodes.c instead of opcode.py #105481

Sorry, something went wrong.

Uh oh!

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

All reactions
@iritkatriel
pythongh-105481: add OPCODE_IS_INSTRUMENTED (generated from bytecodes…
d642083
….c) to replace MIN_INSTRUMENTED_OPCODE (defined in opcode.py)
@iritkatriel
iritkatriel requested a review from gvanrossum July 25, 2023 22:49
@iritkatriel
iritkatriel requested a review from markshannon as a code owner July 25, 2023 22:49
@bedevere-bot bedevere-bot mentioned this pull request Jul 20, 2023
Generate opcode metadata from bytecodes.c instead of opcode.py #105481
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Jul 25, 2023
@iritkatriel
regen-all
f7ae491
@iritkatriel iritkatriel added the skip news label Jul 26, 2023
@iritkatriel
fix test__opcode. Special case INSTRUMENTED_LINE in generator
02f7a9f
@iritkatriel
iritkatriel force-pushed the instrumented branch from 91ef606 to 02f7a9f Compare July 26, 2023 12:58
@iritkatriel
Merge remote-tracking branch 'upstream/main' into instrumented
c12c317
iritkatriel
iritkatriel commented Jul 26, 2023
View reviewed changes
Comment thread Tools/cases_generator/generate_cases.py
" (((OP) >= 0) && ((OP) < OPCODE_METADATA_SIZE) && \\\n"
" (_PyOpcode_opcode_metadata[(OP)].valid_entry))"
" (_PyOpcode_opcode_metadata[(OP)].valid_entry)) || \\\n"
" ((OP) == INSTRUMENTED_LINE)" # implemented in ceval.c, not bytecodes.c

@iritkatriel iritkatriel Jul 26, 2023 •
edited
Loading

Uh oh!

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

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.

I had to special-case INSTRUMENTED_LINE because it's implemented in ceval.c rather than bytecodes.c, so doesn't appear in the metadata. We could instead do something else like add it to the instr list after bytecode.c is parsed. I'm not sure which option is less bad.

Sorry, something went wrong.

Uh oh!

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

All reactions
@iritkatriel
iritkatriel marked this pull request as draft July 26, 2023 15:42
@bedevere-bot bedevere-bot removed the awaiting core review label Jul 26, 2023
@iritkatriel

iritkatriel commented Jul 26, 2023

Copy link
Copy Markdown
Member Author

After speaking to @markshannon I decided not to add this metadata but to generate MIN_INSTRUMENTED_OPCODE to replicate what we have now.

All reactions

Sorry, something went wrong.

Uh oh!

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

@iritkatriel iritkatriel closed this Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gvanrossum gvanrossum Awaiting requested review from gvanrossum
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

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.

2 participants

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