[pypy-svn] r74250 - in pypy/trunk/pypy: annotation jit/backend/test jit/backend/x86/test rpython/test
fijal at codespeak.net
fijal at codespeak.net
Thu Apr 29 23:01:42 CEST 2010
Author: fijal
Date: Thu Apr 29 23:01:41 2010
New Revision: 74250
Modified:
pypy/trunk/pypy/annotation/annrpython.py
pypy/trunk/pypy/jit/backend/test/support.py
pypy/trunk/pypy/jit/backend/x86/test/test_zrpy_gc.py
pypy/trunk/pypy/rpython/test/test_llinterp.py
Log:
Attaching entry_point_graph got annoying pretty quickly. Allow build_types
to take a flag whether or not this is the main entry point.
Modified: pypy/trunk/pypy/annotation/annrpython.py
==============================================================================
--- pypy/trunk/pypy/annotation/annrpython.py (original)
+++ pypy/trunk/pypy/annotation/annrpython.py Thu Apr 29 23:01:41 2010
@@ -83,7 +83,8 @@
#___ convenience high-level interface __________________
- def build_types(self, function, input_arg_types, complete_now=True):
+ def build_types(self, function, input_arg_types, complete_now=True,
+ main_entry_point=False):
"""Recursively build annotations about the specific entry point."""
assert isinstance(function, types.FunctionType), "fix that!"
@@ -97,6 +98,8 @@
assert isinstance(flowgraph, annmodel.SomeObject)
return flowgraph
+ if main_entry_point:
+ self.translator.entry_point_graph = flowgraph
return self.build_graph_types(flowgraph, inputcells, complete_now=complete_now)
def get_call_parameters(self, function, args_s, policy):
Modified: pypy/trunk/pypy/jit/backend/test/support.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/test/support.py (original)
+++ pypy/trunk/pypy/jit/backend/test/support.py Thu Apr 29 23:01:41 2010
@@ -56,9 +56,9 @@
""" % (arglist,))
exec src.compile() in locals()
- t.buildannotator().build_types(function, [int] * len(args))
+ t.buildannotator().build_types(function, [int] * len(args),
+ main_entry_point=True)
t.buildrtyper(type_system=self.type_system).specialize()
- t.entry_point_graph = graphof(t, function)
warmrunnerdesc = WarmRunnerDesc(t, translate_support_code=True,
CPUClass=self.CPUClass,
**kwds)
Modified: pypy/trunk/pypy/jit/backend/x86/test/test_zrpy_gc.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/test/test_zrpy_gc.py (original)
+++ pypy/trunk/pypy/jit/backend/x86/test/test_zrpy_gc.py Thu Apr 29 23:01:41 2010
@@ -82,7 +82,7 @@
for name, value in kwds.items():
setattr(t.config.translation, name, value)
ann = t.buildannotator(policy=annpolicy.StrictAnnotatorPolicy())
- ann.build_types(f, [s_list_of_strings])
+ ann.build_types(f, [s_list_of_strings], main_entry_point=True)
t.buildrtyper().specialize()
if kwds['jit']:
apply_jit(t, optimizer=OPTIMIZER_SIMPLE)
Modified: pypy/trunk/pypy/rpython/test/test_llinterp.py
==============================================================================
--- pypy/trunk/pypy/rpython/test/test_llinterp.py (original)
+++ pypy/trunk/pypy/rpython/test/test_llinterp.py Thu Apr 29 23:01:41 2010
@@ -43,7 +43,7 @@
t = TranslationContext(config=config)
t.config.set(**extraconfigopts)
a = t.buildannotator(policy=policy)
- timelog("annotating", a.build_types, func, argtypes)
+ timelog("annotating", a.build_types, func, argtypes, main_entry_point=True)
if viewbefore == 'auto':
viewbefore = getattr(conftest.option, 'view', False)
if viewbefore:
@@ -62,7 +62,6 @@
t.view()
desc = t.annotator.bookkeeper.getdesc(func)
graph = desc.specialize(argtypes)
- t.entry_point_graph = graph
return t, typer, graph
_lastinterpreted = []
More information about the Pypy-commit
mailing list