[pypy-svn] pypy default: (arigo, fijal, alex) Improve parser a bit

fijal commits-noreply at bitbucket.org
Tue Mar 15 19:40:44 CET 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r42679:90095e723230
Date: 2011-03-15 14:39 -0400
http://bitbucket.org/pypy/pypy/changeset/90095e723230/

Log:	(arigo, fijal, alex) Improve parser a bit

diff --git a/pypy/tool/jitlogparser/parser.py b/pypy/tool/jitlogparser/parser.py
--- a/pypy/tool/jitlogparser/parser.py
+++ b/pypy/tool/jitlogparser/parser.py
@@ -147,8 +147,9 @@
     # factory method
     TraceForOpcode = TraceForOpcode
 
-    def __init__(self, chunks, path, storage):
+    def __init__(self, chunks, path, storage, inputargs):
         self.path = path
+        self.inputargs = inputargs
         self.chunks = chunks
         for chunk in self.chunks:
             if chunk.filename is not None:
@@ -160,7 +161,7 @@
         self.storage = storage
 
     @classmethod
-    def from_operations(cls, operations, storage, limit=None):
+    def from_operations(cls, operations, storage, limit=None, inputargs=''):
         """ Slice given operation list into a chain of TraceForOpcode chunks.
         Also detect inlined functions and make them Function
         """
@@ -196,11 +197,11 @@
         # wrap stack back up
         if not stack:
             # no ops whatsoever
-            return cls([], getpath(stack), storage)
+            return cls([], getpath(stack), storage, inputargs)
         while True:
             next = stack.pop()
             if not stack:
-                return cls(next, getpath(stack), storage)
+                return cls(next, getpath(stack), storage, inputargs)
             stack[-1].append(cls(next, getpath(stack), storage))
 
 


More information about the Pypy-commit mailing list