Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Python/ceval_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,16 @@
# define TAIL_CALL_ARGS frame, stack_pointer, tstate, next_instr, instruction_funcptr_table, oparg
#endif

#if _Py_TAIL_CALL_INTERP
#if _Py_TAIL_CALL_INTERP && (defined(__clang__) || defined(__GNUC__))
# if !_Py__has_attribute(preserve_none) || !_Py__has_attribute(musttail)
# error "This compiler does not have support for efficient tail calling."
# endif
#endif

// Note: [[clang::musttail]] works for GCC 15, but not __attribute__((musttail)) at the moment.
# define Py_MUSTTAIL [[clang::musttail]]
# define Py_PRESERVE_NONE_CC __attribute__((preserve_none))
Py_PRESERVE_NONE_CC typedef PyObject* (*py_tail_call_funcptr)(TAIL_CALL_PARAMS);

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

'py_tail_call_funcptr': not in formal parameter list [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

function returns function [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

syntax error: missing ')' before 'type' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

syntax error: ')' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

syntax error: missing ')' before '(' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

'py_tail_call_funcptr': not in formal parameter list [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

function returns function [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

syntax error: missing ')' before 'type' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

syntax error: ')' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

syntax error: missing ')' before '(' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

'py_tail_call_funcptr': not in formal parameter list [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

function returns function [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

syntax error: missing ')' before 'type' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

syntax error: ')' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

syntax error: missing ')' before '(' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

'py_tail_call_funcptr': not in formal parameter list [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

function returns function [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

syntax error: missing ')' before 'type' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

syntax error: ')' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

syntax error: missing ')' before '(' [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

‘preserve_none’ attribute directive ignored [-Wattributes]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘preserve_none’ attribute directive ignored [-Wattributes]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

‘preserve_none’ attribute directive ignored [-Wattributes]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘preserve_none’ attribute directive ignored [-Wattributes]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

‘preserve_none’ attribute directive ignored [-Wattributes]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

‘preserve_none’ attribute directive ignored [-Wattributes]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘preserve_none’ attribute directive ignored [-Wattributes]

Check warning on line 90 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

‘preserve_none’ attribute directive ignored [-Wattributes]

# define TARGET(op) Py_PRESERVE_NONE_CC PyObject *_TAIL_CALL_##op(TAIL_CALL_PARAMS)
# define DISPATCH_GOTO() \
Expand All @@ -105,19 +110,19 @@
} while (0)
# endif
# define LABEL(name) TARGET(name)
#elif USE_COMPUTED_GOTOS

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64)

unexpected #elif [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64)

unexpected #elif [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64)

unexpected #elif [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64)

unexpected #elif [C:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

#elif without #if

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

#elif without #if

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

#elif without #if

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

#elif without #if

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

#elif without #if

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

#elif without #if

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

#elif without #if

Check failure on line 113 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

#elif without #if
# define TARGET(op) TARGET_##op:
# define DISPATCH_GOTO() goto *opcode_targets[opcode]
# define JUMP_TO_LABEL(name) goto name;
# define JUMP_TO_PREDICTED(name) goto PREDICTED_##name;
# define LABEL(name) name:
#else

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

#else without #if

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

#else without #if

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

#else without #if

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

#else without #if

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

#else without #if

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

#else without #if

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

#else without #if

Check failure on line 119 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

#else without #if
# define TARGET(op) case op: TARGET_##op:

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

case label not within a switch statement

Check failure on line 120 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

case label not within a switch statement
# define DISPATCH_GOTO() goto dispatch_opcode
# define JUMP_TO_LABEL(name) goto name;
# define JUMP_TO_PREDICTED(name) goto PREDICTED_##name;
# define LABEL(name) name:
#endif

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

#endif without #if

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

#endif without #if

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

#endif without #if

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

#endif without #if

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

#endif without #if

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

#endif without #if

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Cross build Linux

#endif without #if

Check failure on line 125 in Python/ceval_macros.h

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

#endif without #if

/* PRE_DISPATCH_GOTO() does lltrace if enabled. Normally a no-op */
#ifdef Py_DEBUG
Expand Down
Loading