[pypy-commit] pypy default: ups fix
fijal
noreply at buildbot.pypy.org
Wed Oct 30 10:53:15 CET 2013
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r67732:287e43d11ca8
Date: 2013-10-29 12:35 +0200
http://bitbucket.org/pypy/pypy/changeset/287e43d11ca8/
Log: ups fix
diff --git a/rpython/rtyper/rbuiltin.py b/rpython/rtyper/rbuiltin.py
--- a/rpython/rtyper/rbuiltin.py
+++ b/rpython/rtyper/rbuiltin.py
@@ -735,14 +735,15 @@
r_dict = hop.r_result
cDICT = hop.inputconst(lltype.Void, r_dict.DICT)
v_result = hop.gendirectcall(ll_newdict, cDICT)
- v_eqfn = hop.inputarg(r_dict.r_rdict_eqfn, arg=0)
- v_hashfn = hop.inputarg(r_dict.r_rdict_hashfn, arg=1)
- if r_dict.r_rdict_eqfn.lowleveltype != lltype.Void:
- cname = hop.inputconst(lltype.Void, 'fnkeyeq')
- hop.genop('setfield', [v_result, cname, v_eqfn])
- if r_dict.r_rdict_hashfn.lowleveltype != lltype.Void:
- cname = hop.inputconst(lltype.Void, 'fnkeyhash')
- hop.genop('setfield', [v_result, cname, v_hashfn])
+ if hasattr(r_dict, 'r_dict_eqfn'):
+ v_eqfn = hop.inputarg(r_dict.r_rdict_eqfn, arg=0)
+ v_hashfn = hop.inputarg(r_dict.r_rdict_hashfn, arg=1)
+ if r_dict.r_rdict_eqfn.lowleveltype != lltype.Void:
+ cname = hop.inputconst(lltype.Void, 'fnkeyeq')
+ hop.genop('setfield', [v_result, cname, v_eqfn])
+ if r_dict.r_rdict_hashfn.lowleveltype != lltype.Void:
+ cname = hop.inputconst(lltype.Void, 'fnkeyhash')
+ hop.genop('setfield', [v_result, cname, v_hashfn])
return v_result
BUILTIN_TYPER[objectmodel.instantiate] = rtype_instantiate
More information about the pypy-commit
mailing list