Author: Brian Kearns <[email protected]>
Branch:
Changeset: r69995:d026840bbc03
Date: 2014-03-16 23:06 -0400
http://bitbucket.org/pypy/pypy/changeset/d026840bbc03/
Log: set oopspecindex for all versions of raw_malloc_varsize_char and
raw_free
diff --git a/rpython/jit/codewriter/jtransform.py
b/rpython/jit/codewriter/jtransform.py
--- a/rpython/jit/codewriter/jtransform.py
+++ b/rpython/jit/codewriter/jtransform.py
@@ -555,7 +555,7 @@
name += '_no_track_allocation'
TYPE = op.args[0].value
op1 = self.prepare_builtin_call(op, name, args, (TYPE,), TYPE)
- if name == 'raw_malloc_varsize' and TYPE.OF == lltype.Char:
+ if name.startswith('raw_malloc_varsize') and TYPE.OF == lltype.Char:
return self._handle_oopspec_call(op1, args,
EffectInfo.OS_RAW_MALLOC_VARSIZE_CHAR,
EffectInfo.EF_CAN_RAISE)
@@ -589,7 +589,7 @@
name += '_no_track_allocation'
op1 = self.prepare_builtin_call(op, name, [op.args[0]], (STRUCT,),
STRUCT)
- if name == 'raw_free':
+ if name.startswith('raw_free'):
return self._handle_oopspec_call(op1, [op.args[0]],
EffectInfo.OS_RAW_FREE,
EffectInfo.EF_CANNOT_RAISE)
diff --git a/rpython/jit/codewriter/test/test_jtransform.py
b/rpython/jit/codewriter/test/test_jtransform.py
--- a/rpython/jit/codewriter/test/test_jtransform.py
+++ b/rpython/jit/codewriter/test/test_jtransform.py
@@ -60,7 +60,7 @@
class FakeResidualCallControl:
def guess_call_kind(self, op):
return 'residual'
- def getcalldescr(self, op, **kwds):
+ def getcalldescr(self, op, oopspecindex=None, extraeffect=None):
return 'calldescr'
def calldescr_canraise(self, calldescr):
return True
diff --git a/rpython/jit/metainterp/test/test_rawmem.py
b/rpython/jit/metainterp/test/test_rawmem.py
--- a/rpython/jit/metainterp/test/test_rawmem.py
+++ b/rpython/jit/metainterp/test/test_rawmem.py
@@ -1,4 +1,3 @@
-import pytest
from rpython.jit.metainterp.test.support import LLJitMixin
from rpython.rtyper.lltypesystem import lltype, rffi
from rpython.rlib.rawstorage import (alloc_raw_storage, raw_storage_setitem,
@@ -46,7 +45,6 @@
self.check_operations_history({'call': 2, 'guard_no_exception': 1,
'raw_store': 1, 'raw_load': 1,
'finish': 1})
- pytest.skip("XXX alloc_raw_storage doesn't generate virtualizable raw
buffer")
self.metainterp.staticdata.stats.check_resops({'finish': 1},
omit_finish=False)
def test_raw_storage_float(self):
@@ -61,7 +59,6 @@
self.check_operations_history({'call': 2, 'guard_no_exception': 1,
'raw_store': 1, 'raw_load': 1,
'finish': 1})
- pytest.skip("XXX alloc_raw_storage doesn't generate virtualizable raw
buffer")
self.metainterp.staticdata.stats.check_resops({'finish': 1},
omit_finish=False)
def test_raw_storage_byte(self):
@@ -76,7 +73,6 @@
self.check_operations_history({'call': 2, 'guard_no_exception': 1,
'raw_store': 1, 'raw_load': 1,
'finish': 1})
- pytest.skip("XXX alloc_raw_storage doesn't generate virtualizable raw
buffer")
self.metainterp.staticdata.stats.check_resops({'finish': 1},
omit_finish=False)
def test_raw_storage_options(self):
@@ -91,7 +87,6 @@
self.check_operations_history({'call': 2, 'guard_no_exception': 1,
'raw_store': 1, 'raw_load': 1,
'finish': 1})
- pytest.skip("XXX alloc_raw_storage doesn't generate virtualizable raw
buffer")
self.metainterp.staticdata.stats.check_resops({'finish': 1},
omit_finish=False)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit