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: rewrite MAKE_FUNCTION and BUILD_SLICE in the instruction definition DSL by iritkatriel · Pull Request #101529 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Feb 3, 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 the interpreter #98831

Sorry, something went wrong.

Uh oh!

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

All reactions
@iritkatriel
iritkatriel requested a review from gvanrossum February 3, 2023 00:10
@bedevere-bot bedevere-bot added the awaiting core review label Feb 3, 2023
@bedevere-bot bedevere-bot mentioned this pull request Feb 3, 2023
Generate the interpreter #98831
Closed
@iritkatriel iritkatriel added skip news interpreter-core (Objects, Python, Grammar, and Parser dirs) 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Feb 3, 2023
@bedevere-bot

bedevere-bot commented Feb 3, 2023

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 90ff55e 🤖

If you want to schedule another build, you need to add the :hammer: test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Feb 3, 2023
gvanrossum
gvanrossum approved these changes Feb 3, 2023
View reviewed changes
Comment thread Python/bytecodes.c
kwdefaults if (oparg & 0x02),
annotations if (oparg & 0x04),
closure if (oparg & 0x08),
codeobj -- func)) {

@gvanrossum gvanrossum Feb 3, 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.

Too bad we can't write func: PyFunctionObject * yet -- I've gotta add that to the grammar, it would add the casts and save the ugly extra func_obj variable.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Python/bytecodes.c
Comment on lines 3042 to 3037
Py_DECREF(start);
Py_DECREF(stop);
Py_XDECREF(step);

@gvanrossum gvanrossum Feb 3, 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.

Oh, we should augment DECREF_INPUTS() to use XDECREF for conditional inputs.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Python/generated_cases.c.h
Comment on lines +3584 to +3591
PyObject *annotations = (oparg & 0x04) ? PEEK(1 + ((oparg & 0x08) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0)) : NULL;
PyObject *kwdefaults = (oparg & 0x02) ? PEEK(1 + ((oparg & 0x08) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0) + ((oparg & 0x02) ? 1 : 0)) : NULL;
PyObject *defaults = (oparg & 0x01) ? PEEK(1 + ((oparg & 0x08) ? 1 : 0) + ((oparg & 0x04) ? 1 : 0) + ((oparg & 0x02) ? 1 : 0) + ((oparg & 0x01) ? 1 : 0)) : NULL;

@gvanrossum gvanrossum Feb 3, 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.

Let's hope the compiler optimizes this. (Though it's not perf critical.)

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Feb 3, 2023
@iritkatriel
iritkatriel requested review from 1st1, asvetlov, kumaraditya303, rhettinger and vsajip as code owners February 3, 2023 12:04
iritkatriel added 2 commits February 3, 2023 13:13
@iritkatriel
MAKE_FUNCTION
6a05302
@iritkatriel
BUILD_SLICE
98c053b
@iritkatriel
iritkatriel force-pushed the slice_etc branch from 77af074 to 98c053b Compare February 3, 2023 13:16
@iritkatriel
iritkatriel removed request for 1st1, asvetlov, kumaraditya303, rhettinger and vsajip February 3, 2023 13:17
@iritkatriel
iritkatriel merged commit 433fb3e into python:main Feb 3, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Feb 3, 2023
@iritkatriel
iritkatriel deleted the slice_etc branch April 3, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gvanrossum gvanrossum gvanrossum approved these changes

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.

Uh oh!

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

3 participants

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