[pypy-commit] pypy quad-color-gc: Skip correct test, disable checks in qcgc and prepare weakref registration
ntruessel
pypy.commits at gmail.com
Mon Sep 5 16:03:20 EDT 2016
Author: Nicolas Truessel <ntruessel at njsm.de>
Branch: quad-color-gc
Changeset: r86893:a2b97ba105dc
Date: 2016-09-05 22:02 +0200
http://bitbucket.org/pypy/pypy/changeset/a2b97ba105dc/
Log: Skip correct test, disable checks in qcgc and prepare weakref
registration
diff --git a/rpython/memory/gctransform/qcgcframework.py b/rpython/memory/gctransform/qcgcframework.py
--- a/rpython/memory/gctransform/qcgcframework.py
+++ b/rpython/memory/gctransform/qcgcframework.py
@@ -112,10 +112,15 @@
v_instance, = op.args
v_addr = hop.genop("cast_ptr_to_adr", [v_instance],
resulttype=llmemory.Address)
+ c_weakptr = rmodel.inputconst(lltype.Void, "weakptr")
hop.genop("bare_setfield",
- [v_result, rmodel.inputconst(lltype.Void, "weakptr"), v_addr])
+ [v_result, c_weakptr, v_addr])
v_weakref = hop.genop("cast_ptr_to_weakrefptr", [v_result],
resulttype=llmemory.WeakRefPtr)
+ # Register weakref
+ v_fieldaddr = hop.genop("direct_fieldptr", [v_result, c_weakptr],
+ resulttype=llmemory.Address)
+ #hop.genop("qcgc_register_weakref", [v_result, v_fieldaddr])
hop.cast_result(v_weakref)
class QcgcRootWalker(BaseRootWalker):
diff --git a/rpython/translator/c/src/qcgc/config.h b/rpython/translator/c/src/qcgc/config.h
--- a/rpython/translator/c/src/qcgc/config.h
+++ b/rpython/translator/c/src/qcgc/config.h
@@ -1,6 +1,6 @@
#pragma once
-#define CHECKED 1 // Enable runtime sanity checks
+#define CHECKED 0 // Enable runtime sanity checks
#define DEBUG_ZERO_ON_SWEEP 1 // Zero memory on sweep (debug only)
#define QCGC_INIT_ZERO 1 // Init new objects with zero bytes
@@ -8,7 +8,7 @@
/**
* Event logger
*/
-#define EVENT_LOG 1 // Enable event log
+#define EVENT_LOG 0 // Enable event log
#define LOGFILE "./qcgc_events.log" // Default logfile
#define LOG_ALLOCATION 0 // Enable allocation log (warning:
// significant performance impact)
diff --git a/rpython/translator/c/test/test_newgc.py b/rpython/translator/c/test/test_newgc.py
--- a/rpython/translator/c/test/test_newgc.py
+++ b/rpython/translator/c/test/test_newgc.py
@@ -1281,7 +1281,7 @@
GC_CAN_SHRINK_ARRAY = False
removetypeptr = True
- def test_framework_static_roots(self):
+ def test_framework_nongc_static_root(self):
py.test.skip("not implemented")
More information about the pypy-commit
mailing list