mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
GH-119866: Spill the stack around escaping calls. (GH-124392)
* Spill the evaluation around escaping calls in the generated interpreter and JIT. * The code generator tracks live, cached values so they can be saved to memory when needed. * Spills the stack pointer around escaping calls, so that the exact stack is visible to the cycle GC.
This commit is contained in:
parent
cda3b5a576
commit
da071fa3e8
25 changed files with 3841 additions and 2034 deletions
|
@ -79,7 +79,7 @@ for op in operators:
|
|||
opmap = {pattern.replace("\\", "") or "\\": op for op, pattern in operators.items()}
|
||||
|
||||
# Macros
|
||||
macro = r"# *(ifdef|ifndef|undef|define|error|endif|if|else|include|#)"
|
||||
macro = r"#.*\n"
|
||||
CMACRO = "CMACRO"
|
||||
|
||||
id_re = r"[a-zA-Z_][0-9a-zA-Z_]*"
|
||||
|
@ -333,6 +333,9 @@ def tokenize(src: str, line: int = 1, filename: str = "") -> Iterator[Token]:
|
|||
line += newlines
|
||||
else:
|
||||
begin = line, start - linestart
|
||||
if kind == CMACRO:
|
||||
linestart = end
|
||||
line += 1
|
||||
if kind != "\n":
|
||||
yield Token(
|
||||
filename, kind, text, begin, (line, start - linestart + len(text))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue