[pypy-svn] r50161 - pypy/branch/llvmgcroot/pypy/translator/c
arigo at codespeak.net
arigo at codespeak.net
Fri Dec 28 13:47:01 CET 2007
Author: arigo
Date: Fri Dec 28 13:46:59 2007
New Revision: 50161
Modified:
pypy/branch/llvmgcroot/pypy/translator/c/trackgcroot.py
Log:
Check the name at the end of the function.
Modified: pypy/branch/llvmgcroot/pypy/translator/c/trackgcroot.py
==============================================================================
--- pypy/branch/llvmgcroot/pypy/translator/c/trackgcroot.py (original)
+++ pypy/branch/llvmgcroot/pypy/translator/c/trackgcroot.py Fri Dec 28 13:46:59 2007
@@ -3,7 +3,7 @@
import re, sys, os
r_functionstart = re.compile(r"\t.type\s+(\w+),\s*[@]function\s*$")
-r_functionend = re.compile(r"\t.size\s+\w+,\s*[.]-\w+\s*$")
+r_functionend = re.compile(r"\t.size\s+(\w+),\s*[.]-(\w+)\s*$")
r_label = re.compile(r"([.]?\w+)[:]\s*$")
r_globl = re.compile(r"\t[.]globl\t(\w+)\s*$")
r_insn = re.compile(r"\t([a-z]\w*)\s")
@@ -106,6 +106,9 @@
def __init__(self, lines):
match = r_functionstart.match(lines[0])
self.funcname = match.group(1)
+ match = r_functionend.match(lines[-1])
+ assert self.funcname == match.group(1)
+ assert self.funcname == match.group(2)
self.lines = lines
self.inconsistent_state = {}
self.can_use_frame_pointer = False # unless changed by caller
More information about the Pypy-commit
mailing list