[pypy-svn] r13454 - pypy/dist/pypy/rpython
arigo at codespeak.net
arigo at codespeak.net
Wed Jun 15 22:15:49 CEST 2005
Author: arigo
Date: Wed Jun 15 22:15:47 2005
New Revision: 13454
Modified:
pypy/dist/pypy/rpython/rbuiltin.py
Log:
Fix the rtyping of nullptr(). This gives a more general
rtype_const_result() that can be reused for getRuntimeTypeInfo() too.
Modified: pypy/dist/pypy/rpython/rbuiltin.py
==============================================================================
--- pypy/dist/pypy/rpython/rbuiltin.py (original)
+++ pypy/dist/pypy/rpython/rbuiltin.py Wed Jun 15 22:15:47 2005
@@ -118,7 +118,7 @@
resulttype = hop.r_result.lowleveltype)
def rtype_const_result(hop):
- return hop.inputconst(Void, hop.s_result.const)
+ return hop.inputconst(hop.r_result.lowleveltype, hop.s_result.const)
def rtype_cast_pointer(hop):
assert hop.args_s[0].is_constant()
@@ -127,9 +127,6 @@
return hop.genop('cast_pointer', [v_input], # v_type implicit in r_result
resulttype = hop.r_result.lowleveltype)
-def rtype_getRuntimeTypeInfo(hop):
- return hop.inputconst(Ptr(RuntimeTypeInfo), hop.s_result.const)
-
def rtype_runtime_type_info(hop):
assert isinstance(hop.args_r[0], rptr.PtrRepr)
vlist = hop.inputargs(hop.args_r[0])
@@ -141,6 +138,6 @@
BUILTIN_TYPER[lltype.cast_pointer] = rtype_cast_pointer
BUILTIN_TYPER[lltype.typeOf] = rtype_const_result
BUILTIN_TYPER[lltype.nullptr] = rtype_const_result
-BUILTIN_TYPER[lltype.getRuntimeTypeInfo] = rtype_getRuntimeTypeInfo
+BUILTIN_TYPER[lltype.getRuntimeTypeInfo] = rtype_const_result
BUILTIN_TYPER[lltype.runtime_type_info] = rtype_runtime_type_info
BUILTIN_TYPER[rarithmetic.intmask] = rtype_intmask
More information about the Pypy-commit
mailing list