コード例 #1
0
 def analyze(self, func, sig, func_to_analyze=None, backendopt=False):
     if func_to_analyze is None:
         func_to_analyze = func
     t = TranslationContext()
     t.buildannotator().build_types(func, sig)
     t.buildrtyper(type_system=self.type_system).specialize()
     if backendopt:
         backend_optimizations(t)
     if option.view:
         t.view()
     a = FinalizerAnalyzer(t)
     fgraph = graphof(t, func_to_analyze)
     result = a.analyze_light_finalizer(fgraph)
     return result
コード例 #2
0
ファイル: test_finalizer.py プロジェクト: nipengadmaster/pypy
 def analyze(self, func, sig, func_to_analyze=None, backendopt=False):
     if func_to_analyze is None:
         func_to_analyze = func
     t = TranslationContext()
     t.buildannotator().build_types(func, sig)
     t.buildrtyper(type_system=self.type_system).specialize()
     if backendopt:
         backend_optimizations(t)
     if option.view:
         t.view()
     a = FinalizerAnalyzer(t)
     fgraph = graphof(t, func_to_analyze)
     result = a.analyze_light_finalizer(fgraph)
     return result