From b8b23c38cc72eea6e71591e2167b5852117f9c2a Mon Sep 17 00:00:00 2001 From: Xuanteng Huang Date: Sat, 15 Mar 2025 20:12:06 +0800 Subject: [PATCH 1/2] fix compile error due to `BINARY_SUBSCR` --- Python/bytecodes.c | 1 - Python/executor_cases.c.h | 1 - Python/generated_cases.c.h | 1 - 3 files changed, 3 deletions(-) diff --git a/Python/bytecodes.c b/Python/bytecodes.c index aaa25161d0943f..9c29f396c8e3af 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -878,7 +878,6 @@ dummy_func( assert(res_o != NULL); res = PyStackRef_FromPyObjectNew(res_o); #endif - STAT_INC(BINARY_SUBSCR, hit); DECREF_INPUTS(); } diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index fb5b2240436f1c..9f05d4fe636898 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -1253,7 +1253,6 @@ assert(res_o != NULL); res = PyStackRef_FromPyObjectNew(res_o); #endif - STAT_INC(BINARY_SUBSCR, hit); _PyFrame_SetStackPointer(frame, stack_pointer); _PyStackRef tmp = list_st; list_st = res; diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 8cdbaf1a4d5761..ce8abb6ad50813 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -702,7 +702,6 @@ assert(res_o != NULL); res = PyStackRef_FromPyObjectNew(res_o); #endif - STAT_INC(BINARY_SUBSCR, hit); _PyFrame_SetStackPointer(frame, stack_pointer); _PyStackRef tmp = list_st; list_st = res; From f8c8f6265eb98e7c407b1129ef8e99643ad9bd0a Mon Sep 17 00:00:00 2001 From: Xuanteng Huang Date: Sat, 15 Mar 2025 20:18:26 +0800 Subject: [PATCH 2/2] replace stat_inc with `BINARY_OP` --- Python/bytecodes.c | 1 + Python/executor_cases.c.h | 1 + Python/generated_cases.c.h | 1 + 3 files changed, 3 insertions(+) diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 9c29f396c8e3af..7af4d642edb919 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -878,6 +878,7 @@ dummy_func( assert(res_o != NULL); res = PyStackRef_FromPyObjectNew(res_o); #endif + STAT_INC(BINARY_OP, hit); DECREF_INPUTS(); } diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 9f05d4fe636898..ff9f33b6db0187 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -1253,6 +1253,7 @@ assert(res_o != NULL); res = PyStackRef_FromPyObjectNew(res_o); #endif + STAT_INC(BINARY_OP, hit); _PyFrame_SetStackPointer(frame, stack_pointer); _PyStackRef tmp = list_st; list_st = res; diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index ce8abb6ad50813..558b0b48ceaa71 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -702,6 +702,7 @@ assert(res_o != NULL); res = PyStackRef_FromPyObjectNew(res_o); #endif + STAT_INC(BINARY_OP, hit); _PyFrame_SetStackPointer(frame, stack_pointer); _PyStackRef tmp = list_st; list_st = res;