Author: Maciej Fijalkowski <[email protected]>
Branch: jitframe-on-heap
Changeset: r60556:32f451f7cffb
Date: 2013-01-27 23:16 +0200
http://bitbucket.org/pypy/pypy/changeset/32f451f7cffb/
Log: UH, that's what I get for naming variables wrongly
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
@@ -14,9 +14,9 @@
GCMAP = lltype.GcArray(lltype.Unsigned)
NULLGCMAP = lltype.nullptr(GCMAP)
-def jitframeinfo_set_depth(jfi, new_depth):
+def jitframeinfo_set_depth(jfi, base_ofs, new_depth):
jfi.jfi_frame_depth = new_depth
- jfi.jfi_frame_size = STATICSIZE + new_depth * SIZEOFSIGNED
+ jfi.jfi_frame_size = base_ofs + new_depth * SIZEOFSIGNED
JITFRAMEINFO = lltype.GcStruct(
'JITFRAMEINFO',
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
@@ -507,7 +507,7 @@
clt = CompiledLoopToken(self.cpu, looptoken.number)
clt.frame_info = lltype.malloc(jitframe.JITFRAMEINFO)
clt.allgcrefs = []
- clt.frame_info.set_frame_depth(0) # for now
+ clt.frame_info.set_frame_depth(0, 0) # for now
looptoken.compiled_loop_token = clt
clt._debug_nbargs = len(inputargs)
if not we_are_translated():
@@ -666,12 +666,13 @@
mc.copy_to_raw_memory(rawstart + pos_after_jz - 4)
def update_frame_depth(self, frame_depth):
- self.current_clt.frame_info.set_frame_depth(frame_depth)
+ baseofs = self.cpu.get_baseofs_of_frame_field()
+ self.current_clt.frame_info.set_frame_depth(baseofs, frame_depth)
new_jumping_to = []
for wref in self.current_clt.jumping_to:
clt = wref()
if clt is not None:
- clt.frame_info.set_frame_depth(max(frame_depth,
+ clt.frame_info.set_frame_depth(baseofs, max(frame_depth,
clt.frame_info.jfi_frame_depth))
new_jumping_to.append(weakref.ref(clt))
self.current_clt.jumping_to = new_jumping_to
@@ -898,7 +899,8 @@
# copy frame-info data
old_fi = oldlooptoken.compiled_loop_token.frame_info
new_fi = newlooptoken.compiled_loop_token.frame_info
- old_fi.set_frame_depth(new_fi.jfi_frame_depth)
+ baseofs = self.cpu.get_baseofs_of_frame_field()
+ old_fi.set_frame_depth(baseofs, new_fi.jfi_frame_depth)
mc = codebuf.MachineCodeBlockWrapper()
mc.JMP(imm(target))
if WORD == 4: # keep in sync with prepare_loop()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit