Skip to content

Commit b10960f

Browse files
committed
Add back underscores
1 parent 11b0e43 commit b10960f

File tree

6 files changed

+143
-143
lines changed

6 files changed

+143
-143
lines changed

Include/internal/pycore_optimizer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ extern bool _Py_uop_sym_is_null(_Py_UOpsSymType *sym);
8686
extern bool _Py_uop_sym_is_not_null(_Py_UOpsSymType *sym);
8787
extern bool _Py_uop_sym_is_const(_Py_UOpsSymType *sym);
8888
extern PyObject *_Py_uop_sym_get_const(_Py_UOpsSymType *sym);
89-
extern _Py_UOpsSymType *_Py_uop_sym_newunknown(_Py_UOpsAbstractInterpContext *ctx);
89+
extern _Py_UOpsSymType *_Py_uop_sym_new_unknown(_Py_UOpsAbstractInterpContext *ctx);
9090
extern _Py_UOpsSymType *_Py_uop_sym_new_notnull(_Py_UOpsAbstractInterpContext *ctx);
9191
extern _Py_UOpsSymType *_Py_uop_sym_new_type(
9292
_Py_UOpsAbstractInterpContext *ctx, PyTypeObject *typ);
93-
extern _Py_UOpsSymType *_Py_uop_sym_newconst(_Py_UOpsAbstractInterpContext *ctx, PyObject *const_val);
94-
extern _Py_UOpsSymType *_Py_uop_sym_newnull(_Py_UOpsAbstractInterpContext *ctx);
93+
extern _Py_UOpsSymType *_Py_uop_sym_new_const(_Py_UOpsAbstractInterpContext *ctx, PyObject *const_val);
94+
extern _Py_UOpsSymType *_Py_uop_sym_new_null(_Py_UOpsAbstractInterpContext *ctx);
9595
extern bool _Py_uop_sym_matches_type(_Py_UOpsSymType *sym, PyTypeObject *typ);
9696
extern void _Py_uop_sym_set_null(_Py_UOpsSymType *sym);
9797
extern void _Py_uop_sym_set_type(_Py_UOpsSymType *sym, PyTypeObject *tp);

Lib/test/test_generated_cases.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def test_overridden_abstract_args(self):
900900
901901
case OP2: {
902902
_Py_UOpsSymType *out;
903-
out = _Py_uop_sym_newunknown(ctx);
903+
out = _Py_uop_sym_new_unknown(ctx);
904904
if (out == NULL) goto out_of_space;
905905
stack_pointer[-1] = out;
906906
break;
@@ -925,7 +925,7 @@ def test_no_overridden_case(self):
925925
output = """
926926
case OP: {
927927
_Py_UOpsSymType *out;
928-
out = _Py_uop_sym_newunknown(ctx);
928+
out = _Py_uop_sym_new_unknown(ctx);
929929
if (out == NULL) goto out_of_space;
930930
stack_pointer[-1] = out;
931931
break;

Python/optimizer_analysis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer,
278278
#define _LOAD_ATTR_NOT_NULL \
279279
do { \
280280
OUT_OF_SPACE_IF_NULL(attr = _Py_uop_sym_new_notnull(ctx)); \
281-
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_newnull(ctx)); \
281+
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_new_null(ctx)); \
282282
} while (0);
283283

284284

Python/tier2_redundancy_eliminator_bytecodes.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dummy_func(void) {
4545
op(_LOAD_FAST_AND_CLEAR, (-- value)) {
4646
value = GETLOCAL(oparg);
4747
_Py_UOpsSymType *temp;
48-
OUT_OF_SPACE_IF_NULL(temp = _Py_uop_sym_newnull(ctx));
48+
OUT_OF_SPACE_IF_NULL(temp = _Py_uop_sym_new_null(ctx));
4949
GETLOCAL(oparg) = temp;
5050
}
5151

@@ -54,7 +54,7 @@ dummy_func(void) {
5454
}
5555

5656
op(_PUSH_NULL, (-- res)) {
57-
res = _Py_uop_sym_newnull(ctx);
57+
res = _Py_uop_sym_new_null(ctx);
5858
if (res == NULL) {
5959
goto out_of_space;
6060
};
@@ -96,7 +96,7 @@ dummy_func(void) {
9696
if (temp == NULL) {
9797
goto error;
9898
}
99-
OUT_OF_SPACE_IF_NULL(res = _Py_uop_sym_newconst(ctx, temp));
99+
OUT_OF_SPACE_IF_NULL(res = _Py_uop_sym_new_const(ctx, temp));
100100
// TODO gh-115506:
101101
// replace opcode with constant propagated one and add tests!
102102
}
@@ -114,7 +114,7 @@ dummy_func(void) {
114114
if (temp == NULL) {
115115
goto error;
116116
}
117-
OUT_OF_SPACE_IF_NULL(res = _Py_uop_sym_newconst(ctx, temp));
117+
OUT_OF_SPACE_IF_NULL(res = _Py_uop_sym_new_const(ctx, temp));
118118
// TODO gh-115506:
119119
// replace opcode with constant propagated one and add tests!
120120
}
@@ -132,7 +132,7 @@ dummy_func(void) {
132132
if (temp == NULL) {
133133
goto error;
134134
}
135-
OUT_OF_SPACE_IF_NULL(res = _Py_uop_sym_newconst(ctx, temp));
135+
OUT_OF_SPACE_IF_NULL(res = _Py_uop_sym_new_const(ctx, temp));
136136
// TODO gh-115506:
137137
// replace opcode with constant propagated one and add tests!
138138
}
@@ -151,7 +151,7 @@ dummy_func(void) {
151151
if (temp == NULL) {
152152
goto error;
153153
}
154-
res = _Py_uop_sym_newconst(ctx, temp);
154+
res = _Py_uop_sym_new_const(ctx, temp);
155155
// TODO gh-115506:
156156
// replace opcode with constant propagated one and update tests!
157157
}
@@ -170,7 +170,7 @@ dummy_func(void) {
170170
if (temp == NULL) {
171171
goto error;
172172
}
173-
res = _Py_uop_sym_newconst(ctx, temp);
173+
res = _Py_uop_sym_new_const(ctx, temp);
174174
// TODO gh-115506:
175175
// replace opcode with constant propagated one and update tests!
176176
}
@@ -189,7 +189,7 @@ dummy_func(void) {
189189
if (temp == NULL) {
190190
goto error;
191191
}
192-
res = _Py_uop_sym_newconst(ctx, temp);
192+
res = _Py_uop_sym_new_const(ctx, temp);
193193
// TODO gh-115506:
194194
// replace opcode with constant propagated one and update tests!
195195
}
@@ -205,21 +205,21 @@ dummy_func(void) {
205205
}
206206

207207
op(_LOAD_CONST_INLINE, (ptr/4 -- value)) {
208-
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_newconst(ctx, ptr));
208+
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_new_const(ctx, ptr));
209209
}
210210

211211
op(_LOAD_CONST_INLINE_BORROW, (ptr/4 -- value)) {
212-
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_newconst(ctx, ptr));
212+
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_new_const(ctx, ptr));
213213
}
214214

215215
op(_LOAD_CONST_INLINE_WITH_NULL, (ptr/4 -- value, null)) {
216-
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_newconst(ctx, ptr));
217-
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_newnull(ctx));
216+
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_new_const(ctx, ptr));
217+
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_new_null(ctx));
218218
}
219219

220220
op(_LOAD_CONST_INLINE_BORROW_WITH_NULL, (ptr/4 -- value, null)) {
221-
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_newconst(ctx, ptr));
222-
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_newnull(ctx));
221+
OUT_OF_SPACE_IF_NULL(value = _Py_uop_sym_new_const(ctx, ptr));
222+
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_new_null(ctx));
223223
}
224224

225225

@@ -257,7 +257,7 @@ dummy_func(void) {
257257

258258
op(_LOAD_ATTR_MODULE, (index/1, owner -- attr, null if (oparg & 1))) {
259259
(void)index;
260-
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_newnull(ctx));
260+
OUT_OF_SPACE_IF_NULL(null = _Py_uop_sym_new_null(ctx));
261261
attr = NULL;
262262
if (this_instr[-1].opcode == _NOP) {
263263
// Preceding _CHECK_ATTR_MODULE was removed: mod is const and dict is watched.
@@ -268,7 +268,7 @@ dummy_func(void) {
268268
PyObject *res = convert_global_to_const(this_instr, dict);
269269
if (res != NULL) {
270270
this_instr[-1].opcode = _POP_TOP;
271-
OUT_OF_SPACE_IF_NULL(attr = _Py_uop_sym_newconst(ctx, res));
271+
OUT_OF_SPACE_IF_NULL(attr = _Py_uop_sym_new_const(ctx, res));
272272
}
273273
}
274274
if (attr == NULL) {
@@ -383,7 +383,7 @@ dummy_func(void) {
383383
/* This has to be done manually */
384384
(void)seq;
385385
for (int i = 0; i < oparg; i++) {
386-
OUT_OF_SPACE_IF_NULL(values[i] = _Py_uop_sym_newunknown(ctx));
386+
OUT_OF_SPACE_IF_NULL(values[i] = _Py_uop_sym_new_unknown(ctx));
387387
}
388388
}
389389

@@ -392,7 +392,7 @@ dummy_func(void) {
392392
(void)seq;
393393
int totalargs = (oparg & 0xFF) + (oparg >> 8) + 1;
394394
for (int i = 0; i < totalargs; i++) {
395-
OUT_OF_SPACE_IF_NULL(values[i] = _Py_uop_sym_newunknown(ctx));
395+
OUT_OF_SPACE_IF_NULL(values[i] = _Py_uop_sym_new_unknown(ctx));
396396
}
397397
}
398398

0 commit comments

Comments
 (0)