Commits

Maciej Fijalkowski  committed 6f649ae Merge

merge

  • Participants
  • Parent commits 5c7390b, 83bcc2a
  • Branches kill-someobject

Comments (0)

Files changed (5)

File pypy/annotation/bookkeeper.py

         """Get the ClassDef associated with the given user cls.
         Avoid using this!  It breaks for classes that must be specialized.
         """
-        if cls is object:
-            return None
+        assert cls is not object
         desc = self.getdesc(cls)
         return desc.getuniqueclassdef()
 

File pypy/annotation/model.py

     "Stands for an instance of a (user-defined) class."
 
     def __init__(self, classdef, can_be_None=False, flags={}):
+        assert classdef is not None
         self.classdef = classdef
         self.knowntype = classdef or object
         self.can_be_None = can_be_None

File pypy/rpython/memory/gctransform/test/test_transform.py

     etrafo = ExceptionTransformer(t)
     etrafo.transform_completely()
     graphs_borrowed = {}
-    for graph in t.graphs:
+    for graph in t.graphs[:]:
         graphs_borrowed[graph] = transformer.transform_graph(graph)
     if conftest.option.view:
         t.view()
     class A:
         def __init__(self, obj):
             self.x = obj
-    def f(v):
+    class B:
+        def __init__(self, i):
+            self.i = i
+    def f(i):
+        v = B(i)
         inst = A(v)
         llop.setfield(lltype.Void, inst, 'x', v)
         llop.bare_setfield(lltype.Void, inst, 'x', v)
 
-    t, transformer = rtype_and_transform(f, [object], _TestGCTransformer,
+    t, transformer = rtype_and_transform(f, [int], _TestGCTransformer,
                                          check=False)
     ops = getops(graphof(t, f))
-    assert len(ops.get('getfield', [])) == 1
+    # xxx no checking done any more

File pypy/translator/sandbox/test/test_pypy_interact.py

 
 
 def setup_module(mod):
-    t = Translation(mini_pypy_like_entry_point, backend='c',
-                   standalone=True, sandbox=True)
+    t = Translation(mini_pypy_like_entry_point, backend='c', sandbox=True)
     mod.executable = str(t.compile())
 
 

File pypy/translator/sandbox/test/test_sandbox.py

         g.flush()
 
 def compile(f, gc='ref'):
-    t = Translation(f, backend='c', standalone=True, sandbox=True, gc=gc,
+    t = Translation(f, backend='c', sandbox=True, gc=gc,
                     check_str_without_nul=True)
     return str(t.compile())