[prev in list] [next in list] [prev in thread] [next in thread]
List: pypy-svn
Subject: [pypy-svn] r9490 - pypy/dist/pypy/annotation
From: pedronis () codespeak ! net
Date: 2005-02-24 18:04:44
Message-ID: 20050224180444.D787C27B4C () code1 ! codespeak ! net
[Download RAW message or body]
Author: pedronis
Date: Thu Feb 24 19:04:44 2005
New Revision: 9490
Modified:
pypy/dist/pypy/annotation/builtin.py
pypy/dist/pypy/annotation/model.py
Log:
some more builtins
Modified: pypy/dist/pypy/annotation/builtin.py
==============================================================================
--- pypy/dist/pypy/annotation/builtin.py (original)
+++ pypy/dist/pypy/annotation/builtin.py Thu Feb 24 19:04:44 2005
@@ -3,6 +3,7 @@
"""
import types
+import sys
from pypy.tool.ansi_print import ansi_print
from pypy.annotation.model import SomeInteger, SomeObject, SomeChar, SomeBool
from pypy.annotation.model import SomeList, SomeString, SomeTuple, SomeSlice
@@ -44,6 +45,12 @@
def builtin_id(o):
return SomeInteger()
+def builtin_hex(o):
+ return SomeString()
+
+def builtin_abs(o):
+ return o.__class__()
+
def builtin_unicode(s_obj):
return SomeString()
@@ -167,6 +174,9 @@
def exception_init(s_self, *args):
s_self.setattr(immutablevalue('args'), SomeTuple(args))
+def count(s_obj):
+ return SomeInteger()
+
# collect all functions
import __builtin__
BUILTIN_ANALYZERS = {}
@@ -178,4 +188,4 @@
BUILTIN_ANALYZERS[pypy.objspace.std.restricted_int.r_int] = builtin_int
BUILTIN_ANALYZERS[pypy.objspace.std.restricted_int.r_uint] = restricted_uint
BUILTIN_ANALYZERS[Exception.__init__.im_func] = exception_init
-
+BUILTIN_ANALYZERS[sys.getrefcount] = count
Modified: pypy/dist/pypy/annotation/model.py
==============================================================================
--- pypy/dist/pypy/annotation/model.py (original)
+++ pypy/dist/pypy/annotation/model.py Thu Feb 24 19:04:44 2005
@@ -66,6 +66,7 @@
def contains(self, other):
return self == other or pair(self, other).union() == self
+
def is_constant(self):
return hasattr(self, 'const')
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic