[pypy-commit] pypy optresult: check only for gc stuff

fijal noreply at buildbot.pypy.org
Fri Jun 12 13:25:02 CEST 2015


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: optresult
Changeset: r78040:afd28a605eaf
Date: 2015-06-12 13:25 +0200
http://bitbucket.org/pypy/pypy/changeset/afd28a605eaf/

Log:	check only for gc stuff

diff --git a/rpython/jit/backend/llsupport/llmodel.py b/rpython/jit/backend/llsupport/llmodel.py
--- a/rpython/jit/backend/llsupport/llmodel.py
+++ b/rpython/jit/backend/llsupport/llmodel.py
@@ -577,18 +577,21 @@
     @specialize.argtype(1)
     def bh_setfield_gc_i(self, struct, newvalue, fielddescr):
         ofs, size, _ = self.unpack_fielddescr_size(fielddescr)
-        fielddescr.check_correct_type(struct)
+        if isinstance(lltype.typeOf(struct), lltype.Ptr):
+            fielddescr.check_correct_type(struct)
         self.write_int_at_mem(struct, ofs, size, newvalue)
 
     def bh_setfield_gc_r(self, struct, newvalue, fielddescr):
         ofs = self.unpack_fielddescr(fielddescr)
-        fielddescr.check_correct_type(struct)
+        if isinstance(lltype.typeOf(struct), lltype.Ptr):
+            fielddescr.check_correct_type(struct)
         self.write_ref_at_mem(struct, ofs, newvalue)
 
     @specialize.argtype(1)
     def bh_setfield_gc_f(self, struct, newvalue, fielddescr):
         ofs = self.unpack_fielddescr(fielddescr)
-        fielddescr.check_correct_type(struct)
+        if isinstance(lltype.typeOf(struct), lltype.Ptr):
+            fielddescr.check_correct_type(struct)
         self.write_float_at_mem(struct, ofs, newvalue)
 
     bh_setfield_raw_i = bh_setfield_gc_i


More information about the pypy-commit mailing list