Skip to content

Commit

Permalink
pythonGH-113710: Tier 2 optimizer: check the function instead of chec…
Browse files Browse the repository at this point in the history
…king globals. (pythonGH-116410)
  • Loading branch information
markshannon committed Mar 6, 2024
1 parent 33c0aa3 commit 27858e2
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 149 deletions.
217 changes: 108 additions & 109 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -4058,12 +4058,8 @@ dummy_func(
null = NULL;
}

tier2 op(_CHECK_GLOBALS, (dict/4 -- )) {
DEOPT_IF(GLOBALS() != dict);
}

tier2 op(_CHECK_BUILTINS, (dict/4 -- )) {
DEOPT_IF(BUILTINS() != dict);
tier2 op(_CHECK_FUNCTION, (func/4 -- )) {
DEOPT_IF(frame->f_funcobj != func);
}

/* Internal -- for testing executors */
Expand Down
12 changes: 3 additions & 9 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 27858e2

Please sign in to comment.