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: Get rid of super(), just use macro() by gvanrossum · Pull Request #100095 · python/cpython

Conversation

@gvanrossum

@gvanrossum gvanrossum commented Dec 8, 2022 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Instead of super(X) = Y + Z write macro(X) = Y + JOIN + Z and get rid of the code duplication for super and macro.

  • Issue: Generate the interpreter #98831

Sorry, something went wrong.

Uh oh!

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

All reactions
gvanrossum added 26 commits December 2, 2022 21:24
@gvanrossum
Make BINARY_OP_INPLACE_ADD_UNICODE a legit super instruction
6860ed7
This doesn't really make things much cleaner, but it works.
@gvanrossum
COMPARE_OP
dcba32e
@gvanrossum
COMPARE_OP_FLOAT_JUMP
30cb8cd
@gvanrossum
COMPARE_OP_INT_JUMP
6af0a5d
@gvanrossum
COMPARE_OP_STR_JUMP
039efbf
@gvanrossum
Support typed stack effects
2fd8822
This was more convoluted than I expected.
@gvanrossum
Refactor common code of analyze_{super,macro}
14bbd50
Also removed some dead code from the former
(somehow the case for CacheEffect had crept back in).
@gvanrossum
Reverse temporary variable numbering
00a2495
This makes the PEEK/POKE sequences less jarring.
@gvanrossum
STORE_ATTR
f01dff5
@gvanrossum
DELETE_ATTR
71ee089
@gvanrossum
STORE_GLOBAL
966da1a
@gvanrossum
STORE_ATTR_INSTANCE_VALUE
7c94591
@gvanrossum
STORE_ATTR_WITH_HINT
2c76046
@gvanrossum
STORE_ATTR_SLOT, and complete the store_attr family
d0f29f8
@gvanrossum
Complete the store_subscr family: STORE_SUBSCR{,DICT,LIST_INT}
001c418
STORE_SUBSCR was alread half converted,
but wasn't using cache effects yet.
@gvanrossum
DELETE_SUBSCR
05caa7e
@gvanrossum
PRINT_EXPR
8d445ae
@gvanrossum
INTERPRETER_EXIT (a bit weird, ends in return)
c1f3034
@gvanrossum
RETURN_VALUE
e2f376b
@gvanrossum
GET_AITER (had to restructure it some)
53c204e
The original had mysterious `SET_TOP(NULL)` before `goto error`.
I assume those just account for `obj` having been decref'ed,
so I got rid of them in favor of the cleanup implied by `ERROR_IF()`.
@gvanrossum
Typo in TODO comment
e0ba8bf
@gvanrossum
Emit PREDICT() macros right before DISPATCH()
f7a54d7
This should fix the build crash on Windows.
@gvanrossum
LIST_APPEND (a bit unhappy with it)
6ae9e6e
@gvanrossum
SET_ADD (also a bit unhappy with it)
34aa393
@gvanrossum
Super can be reformulated as macro with a special op
28e45f9
@gvanrossum
Rip out support for 'super' from the generator
248ecfe
@bedevere-bot bedevere-bot mentioned this pull request Dec 8, 2022
Generate the interpreter #98831
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Dec 8, 2022
@netlify

netlify Bot commented Dec 8, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

✅ Deploy Preview for python-cpython-preview ready!

Name Link
🔨 Latest commit 248ecfe
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/63912b17d4612d0009b1995a
😎 Deploy Preview https://deploy-preview-100095--python-cpython-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@gvanrossum gvanrossum mentioned this pull request Dec 8, 2022
Remove special syntax for super(X) = A + B in favor of macro(X) = A + JOIN + B faster-cpython/ideas#508
Closed
@gvanrossum

gvanrossum commented Dec 8, 2022

Copy link
Copy Markdown
Member Author

Closing in favor of #100124.

All reactions

Sorry, something went wrong.

Uh oh!

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

@gvanrossum gvanrossum closed this Dec 8, 2022
@gvanrossum
gvanrossum deleted the super-is-macro branch December 8, 2022 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon Awaiting requested review from markshannon markshannon will be requested when the pull request is marked ready for review markshannon is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

awaiting core review

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

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