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-99955: standardize return values of functions in compiler's code-gen by iritkatriel · Pull Request #100010 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Dec 5, 2022 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Consistently return -1 for error, 0 for success.

  • Issue: error handling in the compiler is inconsistent #99955

Sorry, something went wrong.

Uh oh!

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

All reactions
iritkatriel added 30 commits December 4, 2022 15:41
@iritkatriel
compiler_setup returns SUCCESS/ERROR
97d929f
@iritkatriel
cfg_builder_init returns SUCCESS/ERROR
0e14141
@iritkatriel
compiler_set_qualname returns SUCCESS/ERROR
5d81ad0
@iritkatriel
basicblock_addop returns SUCCESS/ERROR
6d56a1b
@iritkatriel
cfg_builder_addop returns SUCCESS/ERROR
3b87215
@iritkatriel
cfg_builder_addop_noarg returns SUCCESS/ERROR
829ed2d
@iritkatriel
cfg_builder_addop_i returns SUCCESS/ERROR
8be8f0b
@iritkatriel
compiler_addop_name returns SUCCESS/ERROR
9374ac0
@iritkatriel
compiler_addop_o and compiler_addop_load_const returns SUCCESS/ERROR
9d21d49
@iritkatriel
cfg_builder_addop_j returns SUCCESS/ERROR
a67c612
@iritkatriel
prepend macros with _
844b78f
@iritkatriel
add new versions of the macros (not used yet)
4ca4b8c
@iritkatriel
compiler_enter_scope returns SUCCESS/ERROR
9baeb63
@iritkatriel
find_add returns bool
566acc5
@iritkatriel
compiler_push_fblock returns SUCCESS/ERROR
93287a1
@iritkatriel
compiler_call_exit_with_nones returns SUCCESS/ERROR
8515380
@iritkatriel
pop_except_and_reraise returns SUCCESS/ERROR
13583a3
@iritkatriel
compiler_add_yield_from returns SUCCESS/ERROR
1fd574a
@iritkatriel
compiler_unwind_fblock returns SUCCESS/ERROR
a3d5cad
@iritkatriel
compiler_unwind_fblock_stack returns SUCCESS/ERROR
6fe5dd7
@iritkatriel
compiler_body returns SUCCESS/ERROR
297a0d6
@iritkatriel
compiler_codegen returns SUCCESS/ERROR
c504cd3
@iritkatriel
compiler_make_closure returns SUCCESS/ERROR
b6028e2
@iritkatriel
compiler_decorators and compiler_apply_decorators return SUCCESS/ERROR
19235f7
@iritkatriel
compiler_visit_kwonlydefaults returns SUCCESS/ERROR
9d93635
@iritkatriel
forbidden_name returns bool
dfbe826
@iritkatriel
compiler_check_debug_one_arg, compiler_check_debug_args, compiler_che…
9757b0d
…ck_debug_args_seq return SUCCESS/ERROR
@iritkatriel
insert_instruction, wrap_in_stopiteration_handler return SUCCESS/ERROR
151e8f0
@iritkatriel
compiler_class returns SUCCESS/ERROR
1409c3e
@iritkatriel
compiler_return returns SUCCESS/ERROR
d1a28e4
iritkatriel added 3 commits December 5, 2022 13:28
@iritkatriel
use RETURN_IF_ERROR in a few places
e1a5414
@iritkatriel
minor tweaks
e2b6368
@iritkatriel
reduce diff, revert error
dad4799
@iritkatriel
iritkatriel requested a review from markshannon as a code owner December 5, 2022 14:56
@bedevere-bot bedevere-bot mentioned this pull request Dec 5, 2022
error handling in the compiler is inconsistent #99955
Closed
@bedevere-bot bedevere-bot added the awaiting core review label Dec 5, 2022
@iritkatriel
Merge remote-tracking branch 'upstream/main' into return_values
730f5fd
@iritkatriel iritkatriel added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 5, 2022
@bedevere-bot

bedevere-bot commented Dec 5, 2022

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @iritkatriel for commit 730f5fd 🤖

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 Dec 5, 2022
markshannon
markshannon reviewed Dec 12, 2022
View reviewed changes
Comment thread Python/compile.c Resolved

Uh oh!

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

@markshannon
markshannon self-requested a review December 12, 2022 10:14
markshannon
markshannon approved these changes Dec 12, 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.

Thanks for doing this. This makes the code so much easier to follow and maintain.

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 Dec 12, 2022
@markshannon

markshannon commented Dec 12, 2022

Copy link
Copy Markdown
Member

Actually, it is probably best to add a news item, so anyone familiar with the code knows about the change.

All reactions

Sorry, something went wrong.

Uh oh!

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

@iritkatriel
Merge branch 'main' into return_values
137a9b0
@netlify

netlify Bot commented Dec 12, 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 canceled.

Name Link
🔨 Latest commit a47b482
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/6397275b1af5c3000881e0e0
All reactions

Sorry, something went wrong.

Uh oh!

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

@blurb-it
📜🤖 Added by blurb_it.
9c7d675
iritkatriel
iritkatriel commented Dec 12, 2022
View reviewed changes
Comment thread Python/compile.c Resolved

Uh oh!

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

iritkatriel and others added 3 commits December 12, 2022 11:31
@iritkatriel
Remove unnecessary ()
4271c43
@iritkatriel @markshannon
-1 --> ERROR
48802dc
Co-authored-by: Mark Shannon <[email protected]>
@iritkatriel
Merge branch 'main' into return_values
77db056
iritkatriel
iritkatriel commented Dec 12, 2022
View reviewed changes
Comment thread Python/compile.c Resolved

Uh oh!

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

@iritkatriel
whitespace
a47b482
@iritkatriel
iritkatriel merged commit e4ea33b into python:main Dec 12, 2022
@bedevere-bot bedevere-bot removed the awaiting merge label Dec 12, 2022
@sobolevn sobolevn mentioned this pull request Dec 13, 2022
New GitHub warning: 'ERROR': macro redefinition #100213
Closed
carljm added a commit to carljm/cpython that referenced this pull request Dec 14, 2022
@carljm
Merge branch 'main' into typedocs
53d33a1
* main: (103 commits)
  pythongh-100248: Add missing `ssl_shutdown_timeout` parameter in `asyncio` docs (python#100249)
  Assorted minor fixes for specialization stats. (pythonGH-100219)
  pythongh-100176: venv: Remove redundant compat code for Python <= 3.2 (python#100177)
  pythonGH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code unit. (pythonGH-100223)
  pythongh-99955: undef ERROR and SUCCESS before redefining (fixes sanitizer warning) (python#100215)
  pythonGH-100206: use versionadded for the addition of sysconfig.get_default_scheme (python#100207)
  pythongh-81057: Move _Py_RefTotal to the "Ignored Globals" List (pythongh-100203)
  pythongh-81057: Move Signal-Related Globals to _PyRuntimeState (pythongh-100085)
  pythongh-81057: Move faulthandler Globals to _PyRuntimeState (pythongh-100152)
  pythongh-81057: Move tracemalloc Globals to _PyRuntimeState (pythongh-100151)
  pythonGH-100143: Improve collecting pystats for parts of runs (pythonGH-100144)
  pythongh-99955: standardize return values of functions in compiler's code-gen (python#100010)
  pythongh-79218: Define `MS_WIN64` macro for Mingw-w64 64bit on Windows (pythonGH-100137)
  Fix: typo (Indention) (pythonGH-99904)
  pythongh-96715 Remove redundant NULL check in `profile_trampoline` function (python#96716)
  pythongh-100176: remove incorrect version compatibility check from argument clinic (python#100190)
  clarify the 4300-digit limit on int-str conversion (python#100175)
  pythongh-70393: Clarify mention of "middle" scope (python#98839)
  pythongh-99688: Fix outdated tests in test_unary (python#99712)
  pythongh-100174: [Enum] Correct PowersOfThree example. (pythonGH-100178)
  ...
@carljm carljm mentioned this pull request Jun 21, 2023
Add a C API to assign a new version to a PyTypeObject #103091
Closed
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

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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