
I think people not following IRC/pyp-svn etc may still be interested in this piece of information about progress.
As of end of last week the annotator is able to type-annotate all of the pypy codebase, at least as loaded by goal/buildcache2.py and goal/targetpypy.py, that means the interpreter plus the standard object space plus interp-level modules.
We still get some expected warnings in areas touched by faking, and some of that code may be delicate to translate.
Notice that the code-generators right now are not up to the task of using this result, gen-llvm is probably the most evoluted. Having them catch up with the annotator is the next important step. Trying to translate is also probably the only way in order to discover whether there are still problems with the annotator result.
Annotation takes around 15 mins on a 1.5Ghz Powerbook 15" and grows up to around .5Gb of memory also because we keep a lot of debug info about how annotations evolved during the process to facilitate type-pollution tracking.
.../goal$ python translate_pypy.py -no-t -no-c targetpypy Analysing target as defined by targetpypy faking <type 'unicode'> faking <type 'module'> faking <type 'file'> *builtin* *sys* *parser* *GetSetProperty* *Member* *Ellipsis* *method* *function* *generator* *staticmethod* *ControlFlowException* *NotImplemented* *traceback* *code* *cell* *internal-code* *internal-frame* *module* *frame* *list* *type* *tuple* *long* *str* *float* *int* *dict* *object* *unicode* *NoneType* *slice* *bool* *sequenceiterator* *basestring* *dictproxy* cache build finished getflowgraph (?:7) entry_point getflowgraph (pypy.objspace.std.intobject:15) __init__ getflowgraph (pypy.objspace.descroperation:460) binop_mul_impl getflowgraph (pypy.objspace.std.objspace:264) type getflowgraph (pypy.objspace.std.model:108) __init__ getflowgraph (pypy.interpreter.baseobjspace:28) getclass (pypy.objspace.std.model:108) __init__ -> SomePBC(const=None) getflowgraph (pypy.objspace.std.objspace:159) gettypeobject getflowgraph (pypy.interpreter.baseobjspace:102) loadfromcache getflowgraph (pypy.interpreter.baseobjspace:102) loadfromcache getflowgraph (pypy.tool.cache:21) getorbuild getflowgraph (pypy.tool.cache:21) getorbuild (pypy.objspace.std.intobject:15) __init__ -> SomePBC(const=None) (pypy.tool.cache:21) getorbuild -> SomeInstance(can_be_None=False, classdef=W_TypeObject) (pypy.interpreter.baseobjspace:102) loadfromcache -> SomeInstance(can_be_None=False, classdef=W_TypeObject) (pypy.objspace.std.objspace:159) gettypeobject -> SomeInstance(can_be_None=False, classdef=W_TypeObject) (pypy.interpreter.baseobjspace:28) getclass -> SomeInstance(can_be_None=False, classdef=W_TypeObject) (pypy.objspace.std.objspace:264) type -> SomeInstance(can_be_None=False, classdef=W_TypeObject) ... ... ... (pypy.objspace.std.listsort:119) gallop -> SomeInteger(nonneg=False, unsigned=False) (pypy.objspace.std.objspace:166) wrap__SomePBC__SI_ControlFlowException -> SomeInstance(can_be_None=False, classdef=BaseWrappable) (pypy.objspace.std.listsort:428) merge_at -> SomePBC(const=None) getflowgraph (pypy.objspace.std.listsort:216) merge_lo (pypy.objspace.std.objspace:166) wrap__SomePBC__SI_SApplicationException -> SomeInstance(can_be_None=False, classdef=BaseWrappable) (pypy.interpreter.pyframe:415) unroll -> SomeBool(const=True) getflowgraph (pypy.objspace.std.listsort:319) merge_hi (pypy.interpreter.pyframe:382) unroll -> SomeBool() getflowgraph (pypy.objspace.std.listsort:553) copyitems (pypy.objspace.std.listsort:553) copyitems -> SomeInstance(can_be_None=False, classdef=ListSlice) getflowgraph (pypy.objspace.std.listsort:567) popright getflowgraph (pypy.objspace.std.listsort:561) popleft (pypy.objspace.std.listsort:561) popleft -> SomeInstance(can_be_None=True, classdef=W_Root) (pypy.objspace.std.listsort:567) popright -> SomeInstance(can_be_None=True, classdef=W_Root) (pypy.objspace.std.listsort:216) merge_lo -> SomePBC(const=None) (pypy.objspace.std.listsort:319) merge_hi -> SomePBC(const=None) ====================================================================== Functions that have SomeObject in their signature ====================================================================== PyCode._from_code(SomeInstance, SomeObject, const SomeBool) -> SomeInstance pypy.interpreter.pycode:101
PyInterpFrame.MISSING_OPCODE(SomeInstance, SomeObject) -> ? pypy.interpreter.pyopcode:695
StdObjSpace.unwrap(const SomePBC, SomeInstance) -> SomeObject pypy.objspace.std.objspace:223
StdObjSpace.wrap__SomePBC__SomeObject(const SomePBC, SomeObject) -> SomeInstance pypy.objspace.std.objspace:166
W_FakeFile.__init__(SomeInstance, const SomePBC, SomeObject) -> const SomePBC pypy.objspace.std.fake:98
W_FakeFile.unwrap(SomeInstance) -> SomeObject pypy.objspace.std.fake:101
W_FakeModule.unwrap(SomeInstance) -> SomeObject pypy.objspace.std.fake:101
W_FakeUnicode.__init__(SomeInstance, const SomePBC, SomeObject) -> const SomePBC pypy.objspace.std.fake:98
W_FakeUnicode.unwrap(SomeInstance) -> SomeObject pypy.objspace.std.fake:101
W_LongObject.longval(SomeInstance) -> SomeObject pypy.objspace.std.longobject:32
W_LongObject.unwrap(SomeInstance) -> SomeObject pypy.objspace.std.longobject:39
W_TupleObject.unwrap(SomeInstance) -> SomeObject pypy.objspace.std.tupleobject:20
W_TypeObject.unwrap(SomeInstance) -> SomeObject pypy.objspace.std.typeobject:212
args_from_long(SomeObject) -> SomeTuple pypy.objspace.std.longobject:527
get_unique_interplevel_subclass(SomePBC, SomeObject, SomeBool) -> SomePBC pypy.interpreter.typedef:23
string_to_long(SomeString, SomeInteger) -> SomeObject pypy.objspace.std.strutil:77
====================================================================== somobjectness: 0 percent (16 out of 2951 functions get or return SomeObjects ====================================================================== ------------------------------------------------------------ Not generating C code. ------------------------------------------------------------ Done.

Samuele Pedroni pedronis@strakt.com writes:
I think people not following IRC/pyp-svn etc may still be interested in this piece of information about progress.
As of end of last week the annotator is able to type-annotate all of the pypy codebase, at least as loaded by goal/buildcache2.py and goal/targetpypy.py, that means the interpreter plus the standard object space plus interp-level modules.
Wow.
We still get some expected warnings in areas touched by faking, and some of that code may be delicate to translate.
Does special-casing in the translator code suffice?
Cheers, mwh
participants (2)
-
Michael Hudson
-
Samuele Pedroni