[pypy-commit] pypy quad-color-gc: Implement push and pop
ntruessel
pypy.commits at gmail.com
Fri Aug 19 10:12:25 EDT 2016
Author: Nicolas Truessel <ntruessel at njsm.de>
Branch: quad-color-gc
Changeset: r86320:bc2d69f739ed
Date: 2016-08-19 16:11 +0200
http://bitbucket.org/pypy/pypy/changeset/bc2d69f739ed/
Log: Implement push and pop
diff --git a/rpython/translator/c/funcgen.py b/rpython/translator/c/funcgen.py
--- a/rpython/translator/c/funcgen.py
+++ b/rpython/translator/c/funcgen.py
@@ -943,3 +943,10 @@
cdecl(typename, ''),
self.expr(op.args[0]),
self.expr(op.result))
+
+ def OP_QCGC_PUSH_ROOT(self, op):
+ obj = self.expr(op.args[0])
+ return 'qcgc_shadowstack_push((object_t *) %s);' % (obj,)
+
+ def OP_QCGC_POP_ROOT(self, op):
+ return 'qcgc_shadowstack_pop();'
diff --git a/rpython/translator/c/gc.py b/rpython/translator/c/gc.py
--- a/rpython/translator/c/gc.py
+++ b/rpython/translator/c/gc.py
@@ -471,13 +471,11 @@
return eci
- # def gc_startup_code(self):
- # super(QcgcFrameworkGcPolicy, self).gc_startup_code()
- # if sys.platform == 'win32':
- # pass # yield 'assert(GC_all_interior_pointers == 0);'
- # else:
- # yield 'GC_all_interior_pointers = 0;'
- # yield 'boehm_gc_startup_code();'
+ def gc_startup_code(self):
+ s = list(super(QcgcFrameworkGcPolicy, self).gc_startup_code())
+ for i in s:
+ yield i
+ yield 'qcgc_initialize();'
name_to_gcpolicy = {
'boehm': BoehmGcPolicy,
More information about the pypy-commit
mailing list