[pypy-commit] pypy jitframe-on-heap: raw malloc is not zeroed
fijal
noreply at buildbot.pypy.org
Tue Mar 5 16:48:41 CET 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: jitframe-on-heap
Changeset: r62095:157864d68fa3
Date: 2013-03-05 17:48 +0200
http://bitbucket.org/pypy/pypy/changeset/157864d68fa3/
Log: raw malloc is not zeroed
diff --git a/rpython/jit/backend/arm/assembler.py b/rpython/jit/backend/arm/assembler.py
--- a/rpython/jit/backend/arm/assembler.py
+++ b/rpython/jit/backend/arm/assembler.py
@@ -598,7 +598,7 @@
jitframe.JITFRAMEINFO_SIZE, alignment=WORD)
clt.frame_info = rffi.cast(jitframe.JITFRAMEINFOPTR, frame_info)
clt.allgcrefs = []
- clt.frame_info.update_frame_depth(0, 0) # for now
+ clt.frame_info.clear() # for now
if False and log:
operations = self._inject_debugging_code(looptoken, operations,
diff --git a/rpython/jit/backend/llsupport/jitframe.py b/rpython/jit/backend/llsupport/jitframe.py
--- a/rpython/jit/backend/llsupport/jitframe.py
+++ b/rpython/jit/backend/llsupport/jitframe.py
@@ -20,6 +20,10 @@
jfi.jfi_frame_depth = new_depth
jfi.jfi_frame_size = base_ofs + new_depth * SIZEOFSIGNED
+def jitframeinfo_clear(jfi):
+ jfi.jfi_frame_size = 0
+ jfi.jfi_frame_depth = 0
+
JITFRAMEINFO_SIZE = 2 * SIZEOFSIGNED # make sure this stays correct
JITFRAMEINFO = lltype.Struct(
@@ -30,6 +34,7 @@
('jfi_frame_size', lltype.Signed),
adtmeths = {
'update_frame_depth': jitframeinfo_update_depth,
+ 'clear': jitframeinfo_clear,
},
)
diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -474,7 +474,7 @@
jitframe.JITFRAMEINFO_SIZE, alignment=WORD)
clt.frame_info = rffi.cast(jitframe.JITFRAMEINFOPTR, frame_info)
clt.allgcrefs = []
- clt.frame_info.update_frame_depth(0, 0) # for now
+ clt.frame_info.clear() # for now
if log:
operations = self._inject_debugging_code(looptoken, operations,
More information about the pypy-commit
mailing list