Commits

Antonio Cuni committed fb4c2ec

use the correct tuple types in the cli backend; test_builtin passes again

  • Participants
  • Parent commits af86268

Comments (0)

Files changed (2)

File pypy/rpython/ootypesystem/module/ll_os.py

 # mostly-deprecated module
 
 from pypy.rpython.ootypesystem import ootype
-
-def _make_tuple(FIELDS):
-    n = len(FIELDS)
-    fieldnames = ['item%d' % i for i in range(n)]
-    fields = dict(zip(fieldnames, FIELDS))
-    return ootype.Record(fields)
-
+from pypy.rpython.ootypesystem.rtupletype import TUPLE_TYPE
 from pypy.rpython.module.ll_os_stat import PORTABLE_STAT_FIELDS
 
-STAT_RESULT = _make_tuple([_TYPE for _name, _TYPE in PORTABLE_STAT_FIELDS])
+STAT_RESULT = TUPLE_TYPE([_TYPE for _name, _TYPE in PORTABLE_STAT_FIELDS])

File pypy/translator/cli/database.py

 from pypy.translator.cli.support import string_literal, Counter
 from pypy.translator.cli.cts import types
 from pypy.rpython.ootypesystem import ootype
-from pypy.rpython.ootypesystem.module import ll_os
+from pypy.rpython.ootypesystem.module import ll_os, ll_math
+from pypy.rpython.ootypesystem.rtupletype import TUPLE_TYPE
 from pypy.translator.cli import dotnet
 from pypy.rlib.objectmodel import CDefinedIntSymbolic
 from pypy.translator.oosupport.database import Database as OODatabase
     from sets import Set as set
 
 BUILTIN_RECORDS = {
-    ootype.Record({"item0": ootype.Signed, "item1": ootype.Signed}):
-    '[pypylib]pypy.runtime.Record_Signed_Signed',
-    
-    ootype.Record({"item0": ootype.Float, "item1": ootype.Signed}):
-    '[pypylib]pypy.runtime.Record_Float_Signed',
-    
-    ootype.Record({"item0": ootype.Float, "item1": ootype.Float}):
-    '[pypylib]pypy.runtime.Record_Float_Float',
+    TUPLE_TYPE([ootype.Signed, ootype.Signed]):
+        '[pypylib]pypy.runtime.Record_Signed_Signed',
+    TUPLE_TYPE([ootype.String, ootype.String]): 
+        '[pypylib]pypy.runtime.Record_String_String',
 
-    ootype.Record({"item0": ootype.String, "item1": ootype.String}):
-    '[pypylib]pypy.runtime.Record_String_String',
-
+    ll_math.FREXP_RESULT: '[pypylib]pypy.runtime.Record_Float_Signed',    
+    ll_math.MODF_RESULT: '[pypylib]pypy.runtime.Record_Float_Float',
     ll_os.STAT_RESULT: '[pypylib]pypy.runtime.Record_Stat_Result',
     }