1. Pypy
  2. Untitled project
  3. pypy

Commits

Armin Rigo  committed 6aade58

Fix: allow other types too, e.g. an AddressAsInt instance.

  • Participants
  • Parent commits af5e7f0
  • Branches default

Comments (0)

Files changed (1)

File rpython/rtyper/lltypesystem/opimpl.py

View file
 def op_raw_store(p, ofs, newvalue):
     from rpython.rtyper.lltypesystem import rffi
     TP = lltype.typeOf(p)
-    if TP != llmemory.Address:
-        assert TP == llmemory.GCREF
-        p = rffi.cast(llmemory.Address, p)
+    p = rffi.cast(llmemory.Address, p)
     TVAL = lltype.typeOf(newvalue)
     p = rffi.cast(rffi.CArrayPtr(TVAL), p + ofs)
     p[0] = newvalue
 def op_raw_load(TVAL, p, ofs):
     from rpython.rtyper.lltypesystem import rffi
     TP = lltype.typeOf(p)
-    if TP != llmemory.Address:
-        assert TP == llmemory.GCREF
-        p = rffi.cast(llmemory.Address, p)
+    p = rffi.cast(llmemory.Address, p)
     p = rffi.cast(rffi.CArrayPtr(TVAL), p + ofs)
     return p[0]
 op_raw_load.need_result_type = True