8000 More cleanup · python/cpython@44a024a · GitHub
[go: up one dir, main page]

Skip to content

Commit 44a024a

Browse files
committed
More cleanup
1 parent b63610e commit 44a024a

File tree

3 files changed

+214
-232
lines changed

3 files changed

+214
-232
lines changed

Python/jit.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,12 @@ copy_and_patch(char *base, const Stencil *stencil, uint64_t *patches)
286286
}
287287

288288
static void
289-
emit(const StencilGroup *stencil_group, uint64_t patches[])
289+
emit(const StencilGroup *group, uint64_t patches[])
290290
{
291291
char *data = (char *)patches[HoleValue_DATA];
292-
copy_and_patch(data, &stencil_group->data, patches);
292+
copy_and_patch(data, &group->data, patches);
293293
char *text = (char *)patches[HoleValue_TEXT];
294-
copy_and_patch(text, &stencil_group->text, patches);
294+
copy_and_patch(text, &group->text, patches);
295295
}
296296

297297
// This becomes the executor's execute member, and handles some setup/teardown:
@@ -316,9 +316,9 @@ _PyJIT_Compile(_PyUOpExecutorObject *executor)
316316
size_t data_size = 0;
317317
for (Py_ssize_t i = 0; i < Py_SIZE(executor); i++) {
318318
_PyUOpInstruction *instruction = &executor->trace[i];
319-
const StencilGroup *stencil_group = &stencil_groups[instruction->opcode];
320-
text_size += stencil_group->text.body_size;
321-
data_size += stencil_group->data.body_size;
319+
const StencilGroup *group = &stencil_groups[instruction->opcode];
320+
text_size += group->text.body_size;
321+
data_size += group->data.body_size;
322322
}
323323
// Round up to the nearest page (text and data need separate pages):
324324
size_t page_size = get_page_size();
@@ -334,10 +334,10 @@ _PyJIT_Compile(_PyUOpExecutorObject *executor)
334334
char *data = memory + text_size;
335335
for (Py_ssize_t i = 0; i < Py_SIZE(executor); i++) {
336336
_PyUOpInstruction *instruction = &executor->trace[i];
337-
const StencilGroup *stencil_group = &stencil_groups[instruction->opcode];
337+
const StencilGroup *group = &stencil_groups[instruction->opcode];
338338
// Think of patches as a dictionary mapping HoleValue to uint64_t:
339339
uint64_t patches[] = GET_PATCHES();
340-
patches[HoleValue_CONTINUE] = (uint64_t)text + stencil_group->text.body_size;
340+
patches[HoleValue_CONTINUE] = (uint64_t)text + group->text.body_size;
341341
patches[HoleValue_CURRENT_EXECUTOR] = (uint64_t)executor;
342342
patches[HoleValue_OPARG] = instruction->oparg;
343343
patches[HoleValue_OPERAND] = instruction->operand;
@@ -346,9 +346,9 @@ _PyJIT_Compile(_PyUOpExecutorObject *executor)
346346
patches[HoleValue_TEXT] = (uint64_t)text;
347347
patches[HoleValue_TOP] = (uint64_t)memory;
348348
patches[HoleValue_ZERO] = 0;
349-
emit(stencil_group, patches);
350-
text += stencil_group->text.body_size;
351-
data += stencil_group->data.body_size;
349+
emit(group, patches);
350+
text += group->text.body_size;
351+
data += group->data.body_size;
352352
}
353353
if (mark_executable(memory, text_size) ||
354354
mark_readable(memory + text_size, data_size))

0 commit comments

Comments
 (0)
0