Author: David Schneider <[email protected]>
Branch: arm-backend-2
Changeset: r50212:9e1351914eb6
Date: 2011-12-06 17:08 +0100
http://bitbucket.org/pypy/pypy/changeset/9e1351914eb6/
Log: fix an issue with the private attribute renaming going on when
reading a field that starts with '__' and does not end with '__' in
the context of a class
diff --git a/pypy/jit/backend/arm/codebuilder.py
b/pypy/jit/backend/arm/codebuilder.py
--- a/pypy/jit/backend/arm/codebuilder.py
+++ b/pypy/jit/backend/arm/codebuilder.py
@@ -3,16 +3,16 @@
from pypy.jit.backend.arm import registers as reg
from pypy.jit.backend.arm.arch import (WORD, FUNC_ALIGN)
from pypy.jit.backend.arm.instruction_builder import define_instructions
-
+from pypy.jit.backend.llsupport.asmmemmgr import BlockBuilderMixin
+from pypy.jit.metainterp.history import ConstInt, BoxInt, AbstractFailDescr
+from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib.rmmap import alloc, PTR
from pypy.rpython.annlowlevel import llhelper
from pypy.rpython.lltypesystem import lltype, rffi, llmemory
-from pypy.jit.metainterp.history import ConstInt, BoxInt, AbstractFailDescr
-from pypy.rlib.objectmodel import we_are_translated
-from pypy.jit.backend.llsupport.asmmemmgr import BlockBuilderMixin
from pypy.tool.udir import udir
+from pypy.translator.tool.cbuild import ExternalCompilationInfo
-__clear_cache = rffi.llexternal(
+clear_cache = rffi.llexternal(
"__clear_cache",
[llmemory.Address, llmemory.Address],
lltype.Void,
@@ -292,9 +292,10 @@
return rawstart
def clear_cache(self, addr):
- startaddr = rffi.cast(llmemory.Address, addr)
- endaddr = rffi.cast(llmemory.Address, addr + self.get_relative_pos())
- __clear_cache(startaddr, endaddr)
+ if we_are_translated():
+ startaddr = rffi.cast(llmemory.Address, addr)
+ endaddr = rffi.cast(llmemory.Address, addr +
self.get_relative_pos())
+ clear_cache(startaddr, endaddr)
def copy_to_raw_memory(self, addr):
self._copy_to_raw_memory(addr)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit