[pypy-svn] r17262 - in pypy/dist/pypy/rpython: . memory
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Sep 6 11:28:58 CEST 2005
Author: cfbolz
Date: Tue Sep 6 11:28:57 2005
New Revision: 17262
Modified:
pypy/dist/pypy/rpython/llinterp.py
pypy/dist/pypy/rpython/memory/gc.py
Log:
fix test_gc: llinterp was using py.log with keywords containing underscores
incref was not checking for NULL pointers
Modified: pypy/dist/pypy/rpython/llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/llinterp.py (original)
+++ pypy/dist/pypy/rpython/llinterp.py Tue Sep 6 11:28:57 2005
@@ -67,11 +67,11 @@
print operation
def find_roots(self):
- log.find_roots("starting")
+ log.findroots("starting")
frame = self.active_frame
roots = []
while frame is not None:
- log.find_roots("graph", frame.graph.name)
+ log.findroots("graph", frame.graph.name)
frame.find_roots(roots)
frame = frame.f_back
return roots
@@ -235,7 +235,7 @@
self.make_llexception(e)
def find_roots(self, roots):
- log.find_roots(self.curr_block.inputargs)
+ log.findroots(self.curr_block.inputargs)
for arg in self.curr_block.inputargs:
if (isinstance(arg, Variable) and
isinstance(self.getval(arg), self.llt._ptr)):
Modified: pypy/dist/pypy/rpython/memory/gc.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gc.py (original)
+++ pypy/dist/pypy/rpython/memory/gc.py Tue Sep 6 11:28:57 2005
@@ -405,6 +405,8 @@
raw_free(gc_info)
def incref(self, addr):
+ if addr == NULL:
+ return
(addr - self.size_gc_header()).signed[0] += 1
def decref(self, addr):
More information about the Pypy-commit
mailing list