Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r69799:8270fc367b9d
Date: 2014-03-08 12:45 +0100
http://bitbucket.org/pypy/pypy/changeset/8270fc367b9d/
Log: in-progress
diff --git a/rpython/memory/gctransform/framework.py
b/rpython/memory/gctransform/framework.py
--- a/rpython/memory/gctransform/framework.py
+++ b/rpython/memory/gctransform/framework.py
@@ -725,6 +725,7 @@
self.pop_roots(hop, livevars)
def gct_gc_can_move(self, hop):
+ assert not self.translator.config.translation.stm, "XXX"
op = hop.spaceop
v_addr = hop.genop('cast_ptr_to_adr',
[op.args[0]], resulttype=llmemory.Address)
@@ -735,6 +736,7 @@
if self.shrink_array_ptr is None:
return GCTransformer.gct_shrink_array(self, hop)
op = hop.spaceop
+ assert not self.translator.config.translation.stm, "XXX"
v_addr = hop.genop('cast_ptr_to_adr',
[op.args[0]], resulttype=llmemory.Address)
v_length = op.args[1]
@@ -776,6 +778,7 @@
ofs = llmemory.offsetof(self.c_const_gc.concretetype.TO,
'inst_' + attrname)
c_ofs = rmodel.inputconst(lltype.Signed, ofs)
+ assert not self.translator.config.translation.stm, "XXX"
v_gc_adr = hop.genop('cast_ptr_to_adr', [self.c_const_gc],
resulttype=llmemory.Address)
hop.genop('adr_add', [v_gc_adr, c_ofs], resultvar=op.result)
@@ -790,6 +793,7 @@
ofs = llmemory.offsetof(self.c_const_gcdata.concretetype.TO,
'inst_' + attrname)
c_ofs = rmodel.inputconst(lltype.Signed, ofs)
+ assert not self.translator.config.translation.stm, "XXX"
v_gcdata_adr = hop.genop('cast_ptr_to_adr', [self.c_const_gcdata],
resulttype=llmemory.Address)
hop.genop('adr_add', [v_gcdata_adr, c_ofs], resultvar=op.result)
diff --git a/rpython/memory/gctransform/stmframework.py
b/rpython/memory/gctransform/stmframework.py
--- a/rpython/memory/gctransform/stmframework.py
+++ b/rpython/memory/gctransform/stmframework.py
@@ -56,6 +56,11 @@
for var in reversed(livevars):
hop.genop("stm_pop_root_into", [var])
+ def transform_generic_set(self, hop):
+ opname = hop.spaceop.opname
+ # XXX DO STUFF HERE
+ hop.rename('bare_' + opname)
+
def gc_header_for(self, obj, needs_hash=False):
return self.gcdata.gc.gcheaderbuilder.header_of_object(obj)
diff --git a/rpython/rtyper/lltypesystem/rstr.py
b/rpython/rtyper/lltypesystem/rstr.py
--- a/rpython/rtyper/lltypesystem/rstr.py
+++ b/rpython/rtyper/lltypesystem/rstr.py
@@ -108,6 +108,14 @@
"""
# xxx Warning: same note as above apply: don't do this at home
assert length >= 0
+
+ if rgc.stm_is_enabled():
+ i = 0
+ while i < length:
+ ptrdst[i] = src.chars[srcstart + i]
+ i += 1
+ return
+
# from here, no GC operations can happen
src = _get_raw_buf(SRC_TP, src, srcstart)
adr = llmemory.cast_ptr_to_adr(ptrdst)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit