[pypy-svn] r77260 - pypy/branch/resoperation-refactoring/pypy/jit/metainterp
antocuni at codespeak.net
antocuni at codespeak.net
Wed Sep 22 11:24:37 CEST 2010
Author: antocuni
Date: Wed Sep 22 11:24:35 2010
New Revision: 77260
Modified:
pypy/branch/resoperation-refactoring/pypy/jit/metainterp/history.py
pypy/branch/resoperation-refactoring/pypy/jit/metainterp/pyjitpl.py
pypy/branch/resoperation-refactoring/pypy/jit/metainterp/resoperation.py
Log:
revert r77212, as it did not give any benefit
Modified: pypy/branch/resoperation-refactoring/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/branch/resoperation-refactoring/pypy/jit/metainterp/history.py (original)
+++ pypy/branch/resoperation-refactoring/pypy/jit/metainterp/history.py Wed Sep 22 11:24:35 2010
@@ -8,7 +8,7 @@
from pypy.tool.uid import uid
from pypy.conftest import option
-from pypy.jit.metainterp.resoperation import ResOperation, ResOperation_fast, rop
+from pypy.jit.metainterp.resoperation import ResOperation, rop
from pypy.jit.codewriter import heaptracker
# ____________________________________________________________
@@ -834,12 +834,6 @@
self.operations.append(op)
return op
- def record_fast(self, opnum, resbox, descr, *args):
- #op = ResOperation(opnum, argboxes, resbox, descr)
- op = ResOperation_fast(opnum, resbox, descr, *args)
- self.operations.append(op)
- return op
-
def substitute_operation(self, position, opnum, argboxes, descr=None):
resbox = self.operations[position].result
op = ResOperation(opnum, argboxes, resbox, descr)
Modified: pypy/branch/resoperation-refactoring/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/resoperation-refactoring/pypy/jit/metainterp/pyjitpl.py (original)
+++ pypy/branch/resoperation-refactoring/pypy/jit/metainterp/pyjitpl.py Wed Sep 22 11:24:35 2010
@@ -1444,8 +1444,8 @@
if rop._ALWAYS_PURE_FIRST <= opnum <= rop._ALWAYS_PURE_LAST:
return self._record_helper_pure(opnum, resbox, descr, *argboxes)
else:
- return self._record_helper_nonpure(opnum, resbox, descr,
- *argboxes)
+ return self._record_helper_nonpure_varargs(opnum, resbox, descr,
+ list(argboxes))
@specialize.arg(1)
def execute_and_record_varargs(self, opnum, argboxes, descr=None):
@@ -1470,7 +1470,7 @@
return resbox
else:
resbox = resbox.nonconstbox() # ensure it is a Box
- return self._record_helper_nonpure(opnum, resbox, descr, *argboxes)
+ return self._record_helper_nonpure_varargs(opnum, resbox, descr, list(argboxes))
def _record_helper_pure_varargs(self, opnum, resbox, descr, argboxes):
canfold = self._all_constants_varargs(argboxes)
@@ -1490,15 +1490,6 @@
self.attach_debug_info(op)
return resbox
- def _record_helper_nonpure(self, opnum, resbox, descr, *argboxes):
- assert resbox is None or isinstance(resbox, Box)
- # record the operation
- profiler = self.staticdata.profiler
- profiler.count_ops(opnum, RECORDED_OPS)
- op = self.history.record_fast(opnum, resbox, descr, *argboxes)
- self.attach_debug_info(op)
- return resbox
-
def attach_debug_info(self, op):
if (not we_are_translated() and op is not None
and getattr(self, 'framestack', None)):
Modified: pypy/branch/resoperation-refactoring/pypy/jit/metainterp/resoperation.py
==============================================================================
--- pypy/branch/resoperation-refactoring/pypy/jit/metainterp/resoperation.py (original)
+++ pypy/branch/resoperation-refactoring/pypy/jit/metainterp/resoperation.py Wed Sep 22 11:24:35 2010
@@ -1,7 +1,6 @@
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib.debug import make_sure_not_resized
-
def ResOperation(opnum, args, result, descr=None):
cls = opclasses[opnum]
op = cls(result)
@@ -12,17 +11,6 @@
return op
-def ResOperation_fast(opnum, result, descr, *args):
- cls = opclasses[opnum]
- op = cls(result)
- op.initarglist_fast(*args)
- if descr is not None:
- assert isinstance(op, ResOpWithDescr)
- op.setdescr(descr)
- return op
-
-
-
class AbstractResOp(object):
"""The central ResOperation class, representing one operation."""
@@ -46,10 +34,6 @@
"This is supposed to be called only just after the ResOp has been created"
raise NotImplementedError
- def initarglist_fast(self, *args):
- "This is supposed to be called only just after the ResOp has been created"
- raise NotImplementedError
-
def getarglist(self):
raise NotImplementedError
@@ -230,9 +214,6 @@
def initarglist(self, args):
assert len(args) == 0
- def initarglist_fast(self, *args):
- assert len(args) == 0
-
def getarglist(self):
return []
@@ -254,10 +235,6 @@
assert len(args) == 1
self._arg0, = args
- def initarglist_fast(self, *args):
- assert len(args) == 1
- self._arg0, = args
-
def getarglist(self):
return [self._arg0]
@@ -286,10 +263,6 @@
assert len(args) == 2
self._arg0, self._arg1 = args
- def initarglist_fast(self, *args):
- assert len(args) == 2
- self._arg0, self._arg1 = args
-
def getarglist(self):
return [self._arg0, self._arg1, self._arg2]
@@ -326,10 +299,6 @@
assert len(args) == 3
self._arg0, self._arg1, self._arg2 = args
- def initarglist_fast(self, *args):
- assert len(args) == 3
- self._arg0, self._arg1, self._arg2 = args
-
def getarglist(self):
return [self._arg0, self._arg1, self._arg2]
@@ -363,9 +332,6 @@
def initarglist(self, args):
self._args = args
- def initarglist_fast(self, *args):
- self._args = list(args)
-
def getarglist(self):
return self._args
@@ -489,7 +455,7 @@
'STRSETITEM/3',
'UNICODESETITEM/3',
'NEWUNICODE/1',
- #'RUNTIMENEW/1', # ootype operation
+ #'RUNTIMENEW/1', # ootype operation
'COND_CALL_GC_WB/2d', # [objptr, newvalue] (for the write barrier)
'DEBUG_MERGE_POINT/1', # debugging only
'VIRTUAL_REF_FINISH/2', # removed before it's passed to the backend
More information about the Pypy-commit
mailing list