[pypy-svn] r53863 - pypy/dist/pypy/jit/hintannotator
antocuni at codespeak.net
antocuni at codespeak.net
Fri Apr 18 18:38:31 CEST 2008
Author: antocuni
Date: Fri Apr 18 18:38:28 2008
New Revision: 53863
Modified:
pypy/dist/pypy/jit/hintannotator/annotator.py
Log:
simplify consider_op_new and implement consider_op_oonewarray
Modified: pypy/dist/pypy/jit/hintannotator/annotator.py
==============================================================================
--- pypy/dist/pypy/jit/hintannotator/annotator.py (original)
+++ pypy/dist/pypy/jit/hintannotator/annotator.py Fri Apr 18 18:38:28 2008
@@ -31,12 +31,13 @@
def consider_op_new(self, hs_TYPE):
TYPE = hs_TYPE.const
- if self.policy.novirtualcontainer:
- return hintmodel.SomeLLAbstractVariable(TYPE)
- else:
- # XXX: ootype
- vstructdef = self.bookkeeper.getvirtualcontainerdef(TYPE)
- return hintmodel.SomeLLAbstractContainer(vstructdef)
+ assert self.policy.novirtualcontainer, 'not supported by ootype'
+ return hintmodel.SomeLLAbstractVariable(TYPE)
+
+ def consider_op_oonewarray(self, hs_TYPE, hs_size):
+ TYPE = hs_TYPE.const
+ assert self.policy.novirtualcontainer, 'not supported by ootype'
+ return hintmodel.SomeLLAbstractVariable(TYPE)
def consider_op_malloc(self, hs_TYPE, hs_flags):
TYPE = hs_TYPE.const
More information about the Pypy-commit
mailing list