Source

pypy / pypy / rpython / rptr.py

Author Commit Message Labels Comments Date
Alex Gaynor
Introduce StringBuilder.append_charpsize, which takes a char* and a size and adds that to the builder, then use this in a few plcaes.
Amaury Forgeot d'Arc
merge from trunk
Branches
fast-forward
Carl Friedrich Bolz
continue the move of pypy.annotation.pairtype to pypy.tool.pairtype: fix imports and kill the import forwarding file.
Armin Rigo
(arigo, cfbolz): Merge the kill-keepalives-again branch: - change the way interior pointers into structures and arrays are handled. Interior pointers are not allowed to cross function barriers any more. To achieve this, some new operations (setinteriorfield, getinteriorfield, getinteriorarraysize) are introduced - refactor the way the framework GCs are tested and move the semispace GC to the same type-saf…
Anders Chrigström
(arre, pedronis) support ll-ptr(*args) calls, with tests.
Armin Rigo
(arigo, some pedronis) * added GCHeaderBuilder that contains the mappings between GcStructs and their GC headers. In this way the mapping is not global but specific to the currently compiled GC. * some fixes in the annotator to still propagate the constantness of Symbolics, without trying to constant-fold operations on them. * general niceifications
Armin Rigo
'value' attribute of char arrays.
Carl Friedrich Bolz
use inputconst instead of constructing the Constant by hand -- thanks Samuele
Carl Friedrich Bolz
add a new last argument to indirect_calls. it is a Constant of a list of graphs that can be called by that call. Does not work in all cases, the most notable is rbuiltin.ll_instantiate
Carl Friedrich Bolz
introduce a new ll operation: indirect_call. It is used if the function that is being called is a Variable. This makes attaching of the possibly called functions to the operation (which I will be doing next) much cleaner, as I can abuse an argument for it.
Armin Rigo
Merging, step 3: copy relevant files and directories from the branch. The branch should not be modified any more now.
Michael Hudson-Doyle
importfun suggestions for rpython/
Michael Hudson-Doyle
remove rpython/lltype.py (easy!) and fix all the references to it to be to rpython/lltypesystem/lltype.py (tedious!). haven't run ALL the tests yet, will do that on snake.
Samuele Pedroni
* type erasure for lists * doing that discovered a bug in the rtyper logic for splitting a llops block when the operation that can raise an exception is in the middle * support for attaching methods (ADT meths) to ll container types, should make the code for supporting fixed size list in the rtyper reasonable: if l is some kind of list it should be now possible to express generalized access to items or length as l.ll_it…
Boris Feigin
* Adding rpython/ from hl-backend branch into trunk.
Armin Rigo
issue105 testing Require explicit care about exception catching in the RTyper. This is done with an extension of the interface of 'hop' -- which is already quite complicated :-( * hop.has_implicit_exception(cls) checks if the current high-level op is in the scope of a branch catching 'cls', as previously, but now also records that the rtyper cares about this case. * hop.exception_is_here() is called with no …
Samuele Pedroni
avoid obscure repr keys clashes, with basic test
Armin Rigo
Removed slightly fragile and unnecessary support for known-to-be-NULL pointers.
Armin Rigo
Bordering on the insane, here is the start of rtyper support for exceptions, including converting from an exception set by CPython to an instance of the corresponding RPython class. More general fun with strange code all around the place.
Armin Rigo
Support for array of primitives in rtyper and genc. Fix bugs thus discovered in node.py. This change breaks tests in the svn head. Working on merging now...
Armin Rigo
Fix the caching logic in getrepr(). Now each rtyper_makerepr() method must come together with a rtyper_makekey(), which must return something hashable with the following rule: if two SomeXxx() instances would produce different representations with rtyper_makerepr(), then the keys must be different. In other words, rtyper_makekey() should return something like a tuple of all the data from the SomeXxx() instance that are relevant for choosing the representation. All this because SomeXxx() are not hashable -- which is good but not here :-/
Samuele Pedroni
- renamed _PtrType -> Ptr - resurrected on-its-way-out genc/test/test_lltyped, I had to fix stuff in genc anyway to avoid it choking on import
Armin Rigo
Merged a small branch for a rpython refactoring: - Introduced the XxxRepr class hierarchy, similar to the SomeXxx hierarchy but oriented towards low-level representation. Each XxxRepr has a .lowleveltype attribute, and contains the rtype_*() methods that know how to manipulate data in this low-level representation. Each SomeXxx has a single new method, rtyper_makerepr(), that choose the best XxxRepr representation. While a SomeXxx …
Armin Rigo
Support the nullptr() and nullgcptr() functions in the annotator and typer. Some improved conversions.
Armin Rigo
- First try at implementing strings. - is_true(), eq(), ne() operations on pointers.
Armin Rigo
Some refactoring, according to the lines of the pypy-dev post http://codespeak.net/pipermail/pypy-dev/2005q2/002109.html In a word, the thread-local storage is gone and we pass around a HighLevelOp object ('hop' for short :-)
Armin Rigo
RTyper support for method calls. list.append() seems to work, but it would be nice to have a real way to check the generated flow graphs instead of just asserting that the rtyper didn't crash and looking around a bit in pygame.
Armin Rigo
Reworked rlist.py to be kind of reasonable. Then changed everything around it to support the new way it's written. The idea is that the rtyper is organized is a similar way than the annotator. It uses __extend__(pairtype(SomeX, SomeY)) to define methods than handle specific cases; the difference is that the methods (called rtype_*) have the purpose of producing low-level operations which will replace the original high-level operation. The logic about producing type-specialized versions of the low-level types …