Source

pypy / pypy / objspace / flow / specialcase.py

Author Commit Message Labels Comments Date
Ronan Lamy
Simplify import handling and support relative imports
Branches
translation-cleanup
Ronan Lamy
Move parts of sc_import() to FlowObjSpace
Branches
translation-cleanup
Ronan Lamy
Simplify special case setup in FlowObjSpace * Remove specialcase.setup() and put the special case mapping in a constant dict instead. * Remove trivial helper FlowObjSpace.setup_executioncontext()
Branches
translation-cleanup
Armin Rigo
Redo the support for RPython-level print statements.
Branches
kill-geninterp
Armin Rigo
Intermediate check-in
Branches
kill-geninterp
Armin Rigo
Simplify the handling of we_are_translated() by moving it to the flow space already. It also has the benefit that the False path is not flowed at all.
Benjamin Peterson
merge from trunk
Branches
fast-forward
Benjamin Peterson
move more imports to toplevel
Bruno Gola
import needs 1 to 5 arguments now (the 5th is level, for absolute/relative imports)
Christian Tismer
some over-due relaxing to __import__ annotation
Armin Rigo
Support for "print" in RPython. * doesn't support "print >> f". * uses str() on each item, so inherits str()'s limitations. * the output is done with os.write(1,...) but it is line-buffered.
Armin Rigo
(arre, pedronis, arigo) Show a sane error when flowing functions with broken import statements. Refactored the flow space tests a bit.
Christian Tismer
removing the concept of delayed constants. :-X
Christian Tismer
rewrote the import special case logic. It uses the new delayed constantness feature of flow space.
Michael Hudson-Doyle
importfun vs objspace/ objspace/std is something of a mess
Christian Tismer
disabled storing of any source at all. The app-level compiler package is soo slow, and builtin compilation is so very fast, that I decided to store compiled source, only. This should make the compiled pypymuch quicker on any first error. Accessing a non-existant attribute of something has taken several minutes, most probably because some lazy source code needed to be compiled.
Christian Tismer
made the decision of whether to do imports immediately configurable. Special-casing still applies, since we don't want to expose our globals during an import. I had a very funny side-effect, after the last panic-checkin. Somehow, a reference to _formatting is kept around, even after we used _formatting globally. Changed geninterp in a way that it checks whether a module can be imported. If not, pypy/lib is temporarily added to sys.path during the import. Anyway, I guess our deliverable suffers from this problem and it will crash every time people are …
Christian Tismer
added the option to switch eager imports on and off. If it is off, then it is handled via an entry in builtin and still a little special-casing in specialcase.py, see that file. Note that I had to change a line in test_objspace, because lazy importing
Armin Rigo
Testing, quick fix.
Christian Tismer
issue46 resolved issue10 resulved - sys import works and behaves as expected - print works in flow space, and probably many other things - do_imports flag has vanished. The is no more any difference between flowing geninterp or anything else
Christian Tismer
ignore the arguments to __import__; instead, we just check the result. If it is sys, do the special thing.
Christian Tismer
solved the windows compatibility issue (puuh). The import of sys is now deferred to runtime. The trick is to capture the import and special-case import of sys. Instead of an import the Constant(sys) is used and pushed through function unspecialize(). unspecialize() turns sys into a SomeObject variable.
Armin Rigo
The flow objspace will now replace all calls to built-in functions in the known list with the corresponding space operation. So for example the flow graphs can no longer contain either a 'len' operation or a 'simple_call' to the built-in len; they always use the 'len' operation variant. This makes annotation/builtin.py more reasonable.
Samuele Pedroni
2.2 compatibility is not a good reason to break tests!
Seo Sanghyeon
2.2 compatibilities.
Christian Tismer
made normalize_exception flowable by rewriting isinstance(x, tuple) into single isinstance calls. No idea if the space should support this. I might support it in geninterp for static tuples. Removed the normalize_exception special case.
Christian Tismer
added a flag to translator/flowspace that disables immediate imports during flowgraphing.
Samuele Pedroni
- annotation for list.extend - comment about never used code
Armin Rigo
Partial clean-up of the flow object space. Instead of a set of 'crnt_*' attributes, the FlowExecutionContext now has a 'recorder' attribute pointing to a Recorder. The standard BlockRecorder records operations into a block; the main alternate one is Replayer (which was ReplayList).
holger krekel
merge of the dist-interpapp branch where Samuele Armin and me worked for 9 days (summing up to a hundred commits, as you may have noticed in your inbox). Major results (apart from little stuff here and there) are: - a new app2interp mechanism that is now indepedent from the interp2app implementation - a new way to do "mixed modules" which contain applevel and interplevel definitions. We also ported the builtin and sys module and they now live as packages/directory structures. in pypy/module/sys2/__init__.py and pypy/module/builtin/__i…
  1. Prev
  2. 1
  3. 2
  4. Next