Source

pypy / pypy / rpython / ootypesystem / rtuple.py

Author Commit Message Labels Comments Date
Armin Rigo
More.
Branches
exception-cannot-occur
Antonio Cuni
really fix test_tuple_immutable. I was sure to have run the test before checking in, but evidently I didn't
Armin Rigo
It doesn't make much sense to ask for the id() of a tuple. The AbstractTupleRepr provides an rtype_id() that complains appropriately.
Armin Rigo
In rtuple, renamed the interface "getitem()" to "getitem_internal()" to make it clear that it returns a value of the internal type-erased repr. Added a getitem() which returns the externally-expected variable. The reason is that using the internal repr is a bit dangerous now, because the root 'object' repr doesn't really handle the objects that can be tagged pointers. This caused a crash in string formatting (see test).
Armin Rigo
Added a global 'newtuple' in rtuple, which is more natural for calls from outside the rtyper.
Niklaus Haldimann
use Records for tuple iterators.
Niklaus Haldimann
remove unused tuple type caching code.
Niklaus Haldimann
really use Record now for tuples of ootypesystem.
Niklaus Haldimann
rename the Tuple type to "Record". Tuple was really too misleading.
Niklaus Haldimann
oops, i didn't mean to check this in with the last commit.
Niklaus Haldimann
bring rrange support to ootypesystem.
Niklaus Haldimann
(nik, pedronis consulting) introduce a new low-level type Tuple in ootypesystem. it's to be used for structure-like things such as tuples and iterators. this will resolve the recursion and ForwardReference problems that we currently have. these are mostly caused by the fact that Instances are compared by identity, the new Tuple type compares by structure. rtyping doesn't yet use the new type anywhere.
Antonio Cuni
Fixed a bug caused by the change of rlist's inteface.
Niklaus Haldimann
implement rtyping of list(sometuple) for ootypesystem.
Niklaus Haldimann
generalize iterator type construction for tuples and lists in ootypes.
Niklaus Haldimann
support tuple iterators for ootype. in theory, ootypesystem now has full support for tuples.
Niklaus Haldimann
make more tuple tests pass on ootypesystem. share more code between lltype/ootype rtuple. pleasant surprise, much of the implementation will be shared in the end.
Niklaus Haldimann
split rtuple into a version for the lltypesystem and the ootypesystem. make some tuple tests pass on ootypes. the ootype version is for now conceptually analoguous to the lltype one. this is a slightly invasive change, but as far as i can tell it doesn't break any tests or translation.