Skip to content

gh-128563: Move labels in ceval.c to bytecodes.c #129112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jan 27, 2025
Merged
Prev Previous commit
Next Next commit
Address review
  • Loading branch information
Fidget-Spinner committed Jan 25, 2025
commit f89f147940645823bda29669b7870adb67530cdc
29 changes: 6 additions & 23 deletions Lib/test/test_generated_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,29 +248,12 @@ def run_cases_test(self, input: str, expected: str):
)

with open(self.temp_output_filename) as temp_output:
lines = temp_output.readlines()
while lines and lines[0].startswith(("// ", "#", " #", "\n")):
lines.pop(0)
while lines and lines[-1].startswith(("#", "\n")):
lines.pop(-1)
while lines and tier1_generator.INSTRUCTION_START_MARKER not in lines[0]:
lines.pop(0)
lines.pop(0)
for instruction_end_marker_index, line in enumerate(lines):
if tier1_generator.INSTRUCTION_END_MARKER in line:
break
else:
assert False, "No instruction end marker found."
for label_start_marker_index, line in enumerate(lines):
if tier1_generator.LABEL_START_MARKER in line:
break
else:
assert False, "No label start marker found."
del lines[instruction_end_marker_index:label_start_marker_index+1]
# Pop the label markers themselves
lines.pop(0)
lines.pop(-1)
actual = "".join(lines)
lines = temp_output.read()
_, rest = lines.split(tier1_generator.INSTRUCTION_START_MARKER)
instructions, labels_with_prelude_and_postlude = rest.split(tier1_generator.INSTRUCTION_END_MARKER)
_, labels_with_postlude = labels_with_prelude_and_postlude.split(tier1_generator.LABEL_START_MARKER)
labels, _ = labels_with_postlude.split(tier1_generator.LABEL_END_MARKER)
actual = instructions + labels
# if actual.strip() != expected.strip():
# print("Actual:")
# print(actual)
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy