[pypy-commit] pypy ffi-backend: backout 0f692101e5a9: it changes too much random details
arigo
noreply at buildbot.pypy.org
Tue Aug 7 17:39:55 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r56643:d2ab5b72ac98
Date: 2012-08-07 17:33 +0200
http://bitbucket.org/pypy/pypy/changeset/d2ab5b72ac98/
Log: backout 0f692101e5a9: it changes too much random details
diff --git a/pypy/rpython/memory/lltypelayout.py b/pypy/rpython/memory/lltypelayout.py
--- a/pypy/rpython/memory/lltypelayout.py
+++ b/pypy/rpython/memory/lltypelayout.py
@@ -37,8 +37,6 @@
elif isinstance(TYPE, lltype.Struct):
curr = 0
for name in TYPE._names:
- align = fixed_align_estimate(TYPE._flds[name])
- curr = (curr + align-1) & ~ (align-1)
layout[name] = curr
curr += get_fixed_size(TYPE._flds[name])
layout["_size"] = curr
@@ -107,13 +105,6 @@
else:
return fixedsize + i * varsize
-def fixed_align_estimate(TYPE):
- size = get_fixed_size(TYPE)
- for i in [8, 4, 2]:
- if i <= memory_alignment and (size % i) == 0:
- return i
- return 1
-
def convert_offset_to_int(offset):
if isinstance(offset, llmemory.FieldOffset):
layout = get_layout(offset.TYPE)
More information about the pypy-commit
mailing list