GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code unit. (GH-100223)

This commit is contained in:
Mark Shannon 2022-12-14 11:12:53 +00:00 • committed by GitHub
parent 985a71032b
commit 6997e77bdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 150 additions and 134 deletions

View file

@ -205,7 +205,7 @@ class Instruction:
else:
typ = f"uint{bits}_t "
func = f"read_u{bits}"
out.emit(f"{typ}{ceffect.name} = {func}(next_instr + {cache_offset});")
out.emit(f"{typ}{ceffect.name} = {func}(&next_instr[{cache_offset}].cache);")
cache_offset += ceffect.size
assert cache_offset == self.cache_offset + cache_adjust