[pypy-svn] r79406 - in pypy/branch/reflex-support2/pypy: config jit/backend/llgraph/test jit/codewriter jit/codewriter/test jit/metainterp jit/metainterp/optimizeopt jit/tl module/cppyy module/pypyjit translator/c translator/tool
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Nov 23 16:13:24 CET 2010
Author: cfbolz
Date: Tue Nov 23 16:13:22 2010
New Revision: 79406
Added:
pypy/branch/reflex-support2/pypy/module/cppyy/ (props changed)
- copied from r79403, pypy/branch/reflex-support/pypy/module/cppyy/
Modified:
pypy/branch/reflex-support2/pypy/config/pypyoption.py
pypy/branch/reflex-support2/pypy/jit/backend/llgraph/test/test_llgraph.py
pypy/branch/reflex-support2/pypy/jit/codewriter/effectinfo.py
pypy/branch/reflex-support2/pypy/jit/codewriter/test/test_effectinfo.py
pypy/branch/reflex-support2/pypy/jit/metainterp/optimizeopt/heap.py
pypy/branch/reflex-support2/pypy/jit/metainterp/warmspot.py
pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_child.py
pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_demo.py
pypy/branch/reflex-support2/pypy/module/pypyjit/policy.py
pypy/branch/reflex-support2/pypy/translator/c/genc.py
pypy/branch/reflex-support2/pypy/translator/tool/cbuild.py
Log:
merge in the changes from reflex-support:
------------------------------------------------------------------------
r79226 | wlav | 2010-11-18 03:10:29 +0100 (Thu, 18 Nov 2010) | 1 line
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
rpython and comment fixes
------------------------------------------------------------------------
r79220 | cfbolz | 2010-11-17 19:47:56 +0100 (Wed, 17 Nov 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
fix another issue
------------------------------------------------------------------------
r79219 | cfbolz | 2010-11-17 19:24:23 +0100 (Wed, 17 Nov 2010) | 4 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
- factor some common code out into a helper function
- also use space.interp_w to make sure that the objects in question are really
W_CPPInstances. This should help translation.
------------------------------------------------------------------------
r79209 | cfbolz | 2010-11-17 18:57:20 +0100 (Wed, 17 Nov 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
use the official way to check whether w_value is an int
------------------------------------------------------------------------
r79156 | cfbolz | 2010-11-16 17:56:23 +0100 (Tue, 16 Nov 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
try to fix some RPython issues
------------------------------------------------------------------------
r79137 | wlav | 2010-11-16 00:48:06 +0100 (Tue, 16 Nov 2010) | 1 line
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/helper.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_helper.py
mods to be rpython compliant
------------------------------------------------------------------------
r78903 | wlav | 2010-11-09 02:18:57 +0100 (Tue, 09 Nov 2010) | 1 line
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
array support for all integer types
------------------------------------------------------------------------
r76862 | wlav | 2010-09-03 20:52:08 +0200 (Fri, 03 Sep 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Initial long array data member access.
------------------------------------------------------------------------
r76861 | wlav | 2010-09-03 20:50:49 +0200 (Fri, 03 Sep 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Initial unsigned int array data member access.
------------------------------------------------------------------------
r76860 | wlav | 2010-09-03 20:20:24 +0200 (Fri, 03 Sep 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Initial int array data member access.
------------------------------------------------------------------------
r76828 | wlav | 2010-09-02 02:31:09 +0200 (Thu, 02 Sep 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Initial support for unsigned short int data member access.
------------------------------------------------------------------------
r76827 | wlav | 2010-09-02 02:20:18 +0200 (Thu, 02 Sep 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/helper.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/datatypes.h
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_helper.py
Initial implementation for passing short int arrays.
------------------------------------------------------------------------
r76674 | wlav | 2010-08-20 02:19:47 +0200 (Fri, 20 Aug 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Allow setting of boolean data members.
------------------------------------------------------------------------
r76481 | wlav | 2010-08-05 00:10:46 +0200 (Thu, 05 Aug 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Executors and converters for more integer types
------------------------------------------------------------------------
r76462 | wlav | 2010-08-04 00:33:26 +0200 (Wed, 04 Aug 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Enable float and double data members
------------------------------------------------------------------------
r76461 | wlav | 2010-08-03 23:49:16 +0200 (Tue, 03 Aug 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Enable passing int value to C char
------------------------------------------------------------------------
r76460 | wlav | 2010-08-03 23:22:05 +0200 (Tue, 03 Aug 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/helper.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/pythonify.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Support for public data members of type (unsigned) char and renaming various names for consistency.
------------------------------------------------------------------------
r76333 | wlav | 2010-07-24 01:36:35 +0200 (Sat, 24 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Allow passing of C-floats.
------------------------------------------------------------------------
r76283 | wlav | 2010-07-19 19:56:55 +0200 (Mon, 19 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
Initial converters/executors for char and unsigned char.
------------------------------------------------------------------------
r76234 | wlav | 2010-07-15 12:28:20 +0200 (Thu, 15 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
Improved error reporting when an overload fails.
------------------------------------------------------------------------
r76208 | wlav | 2010-07-14 17:29:51 +0200 (Wed, 14 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/Makefile
A /pypy/branch/reflex-support/pypy/module/cppyy/test/datatypes.cxx
A /pypy/branch/reflex-support/pypy/module/cppyy/test/datatypes.h
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
A /pypy/branch/reflex-support/pypy/module/cppyy/test/test_datatypes.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
Preparation of new test for the builtin datatypes (modified from roottest), and a bool executor/converter.
------------------------------------------------------------------------
r76194 | wlav | 2010-07-14 11:09:13 +0200 (Wed, 14 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/pythonify.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.h
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
Enable returning objects from static classes and some code cleanup/cutification.
------------------------------------------------------------------------
r76188 | wlav | 2010-07-13 17:26:09 +0200 (Tue, 13 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/pythonify.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
Allow methods to return instances.
------------------------------------------------------------------------
r76180 | antocuni | 2010-07-13 14:29:22 +0200 (Tue, 13 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
fix translation
------------------------------------------------------------------------
r76175 | arigo | 2010-07-13 12:16:38 +0200 (Tue, 13 Jul 2010) | 4 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/codewriter/effectinfo.py
M /pypy/branch/reflex-support/pypy/jit/codewriter/test/test_effectinfo.py
M /pypy/branch/reflex-support/pypy/jit/metainterp/optimizeopt.py
M /pypy/branch/reflex-support/pypy/jit/metainterp/pyjitpl.py
Extend the EffectInfo to distinguish between the cases EF_PURE etc.,
even for cases of general escaping where we don't have any list of
fields.
------------------------------------------------------------------------
r76163 | wlav | 2010-07-12 22:26:26 +0200 (Mon, 12 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.h
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
Allow executor calls returning objects to succeed (the resulting return object is not yet usuable, though).
------------------------------------------------------------------------
r76157 | arigo | 2010-07-12 19:08:30 +0200 (Mon, 12 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/codewriter/effectinfo.py
M /pypy/branch/reflex-support/pypy/jit/codewriter/test/test_effectinfo.py
M /pypy/branch/reflex-support/pypy/translator/backendopt/graphanalyze.py
Revert r76155, which does not help, and the test in r76154,
which is a bit bogus.
------------------------------------------------------------------------
r76155 | arigo | 2010-07-12 18:43:30 +0200 (Mon, 12 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/codewriter/effectinfo.py
M /pypy/branch/reflex-support/pypy/translator/backendopt/graphanalyze.py
Fix the bug in a not-completely-satisfying way...
------------------------------------------------------------------------
r76154 | arigo | 2010-07-12 18:29:37 +0200 (Mon, 12 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/codewriter/test/test_effectinfo.py
A failing test.
------------------------------------------------------------------------
r76070 | antocuni | 2010-07-09 13:02:29 +0200 (Fri, 09 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
fix incorrect signature
------------------------------------------------------------------------
r76069 | cfbolz | 2010-07-09 12:53:46 +0200 (Fri, 09 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy
M /pypy/branch/reflex-support/pypy/module/cppyy/include
M /pypy/branch/reflex-support/pypy/module/cppyy/include/cppyy.h
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/pythonify.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test
M /pypy/branch/reflex-support/pypy/module/cppyy/test/bench1.py
fixeol and fix svn properties
------------------------------------------------------------------------
r76064 | wlav | 2010-07-09 11:38:47 +0200 (Fri, 09 Jul 2010) | 2 lines
Changed paths:
A /pypy/branch/reflex-support/pypy/module/cppyy/test/bench1.cxx
Initial C++ benchmark.
------------------------------------------------------------------------
r76062 | arigo | 2010-07-09 11:10:27 +0200 (Fri, 09 Jul 2010) | 2 lines
Changed paths:
A /pypy/branch/reflex-support/pypy/module/cppyy/test/bench1.py
A benchmark.
------------------------------------------------------------------------
r76061 | antocuni | 2010-07-09 11:01:34 +0200 (Fri, 09 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/helper.py
translation fix
------------------------------------------------------------------------
r76059 | wlav | 2010-07-09 10:45:56 +0200 (Fri, 09 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/test/Makefile
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
A /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.h
(cfbolz, wlav) Cleanup example01 C++ code in test.
------------------------------------------------------------------------
r76058 | antocuni | 2010-07-09 10:44:15 +0200 (Fri, 09 Jul 2010) | 4 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
(arigo, antocuni): revert r76042 as it makes things slower. Moreover, turn
get_methptr_getter into a pure function, to help the jit
------------------------------------------------------------------------
r76053 | wlav | 2010-07-08 20:30:36 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
Make C API consistent.
------------------------------------------------------------------------
r76051 | arigo | 2010-07-08 20:23:57 +0200 (Thu, 08 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/translator/c/genc.py
Tentatively fix the Makefile to not call trackgcroot.py on
some C files, and on all other files (.cpp, .cxx...)
------------------------------------------------------------------------
r76048 | wlav | 2010-07-08 20:04:20 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
Some more tests.
------------------------------------------------------------------------
r76046 | wlav | 2010-07-08 19:37:02 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
A /pypy/branch/reflex-support/pypy/module/cppyy/helper.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
A /pypy/branch/reflex-support/pypy/module/cppyy/test/test_helper.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
(wlav, cfbolz): work enough to be able to pass an instance as an argument.
------------------------------------------------------------------------
r76044 | arigo | 2010-07-08 18:17:14 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
Translation fix.
------------------------------------------------------------------------
r76043 | antocuni | 2010-07-08 18:06:02 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/config/pypyoption.py
always enable this module on the branch
------------------------------------------------------------------------
r76042 | antocuni | 2010-07-08 18:04:42 +0200 (Thu, 08 Jul 2010) | 5 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
(antocuni, arigo around) huge pile of custom hacks to convince the jit that
the function pointer to the method that we get is constant, given the dynamic
class of the cpp object
------------------------------------------------------------------------
r76041 | arigo | 2010-07-08 18:01:43 +0200 (Thu, 08 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/metainterp/pyjitpl.py
M /pypy/branch/reflex-support/pypy/jit/metainterp/warmspot.py
M /pypy/branch/reflex-support/pypy/jit/tl/pypyjit_child.py
Update pypyjit_child.py to force the jitcodes to be dumped to disk
in that case.
------------------------------------------------------------------------
r76040 | wlav | 2010-07-08 17:43:20 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
(cfbolz, wlav) Implementation of overloads for constructors from the python side.
------------------------------------------------------------------------
r76039 | arigo | 2010-07-08 17:35:13 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/tl/pypyjit_demo.py
Fixes.
------------------------------------------------------------------------
r76038 | arigo | 2010-07-08 17:23:45 +0200 (Thu, 08 Jul 2010) | 5 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/translator/tool/cbuild.py
Running some tests depending on cbuild would create externmod_1.so,
externmod_2.so, etc., in a random directory, the list growing forever.
Attempt to fix that by forcing the externmod_x.so to be created in
the usession directory.
------------------------------------------------------------------------
r76036 | antocuni | 2010-07-08 17:08:22 +0200 (Thu, 08 Jul 2010) | 4 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
introduce two new types, cppyy_typehandle_t and cppyy_object_t, which are just
void* but make the code a bit easier to understand
------------------------------------------------------------------------
r76035 | arigo | 2010-07-08 17:06:40 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/tl/pypyjit_demo.py
Fix with full relative path.
------------------------------------------------------------------------
r76033 | arigo | 2010-07-08 16:21:00 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
Translation fix.
------------------------------------------------------------------------
r76029 | arigo | 2010-07-08 16:02:20 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
Translation fixes.
------------------------------------------------------------------------
r76020 | arigo | 2010-07-08 13:25:00 +0200 (Thu, 08 Jul 2010) | 7 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/Makefile
(antocuni, arigo)
Hack: manually do the fast-path construction enabled by
--with-methptrgetter for methods of signature 'int m(int)' only.
The JIT should speed that case up.
------------------------------------------------------------------------
r76019 | wlav | 2010-07-08 13:12:42 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/pythonify.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
(wlav, cfbolz): add support for constructing an instance of a class and calling methods on it.
------------------------------------------------------------------------
r76018 | arigo | 2010-07-08 12:53:20 +0200 (Thu, 08 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/Makefile
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
Support two installations: either genreflex is installed,
or ROOT is in $ROOTSYS.
------------------------------------------------------------------------
r76017 | wlav | 2010-07-08 12:38:17 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/__init__.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/pythonify.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
(wlav, cfbolz): start exposing c++ classes and support static methods on them.
------------------------------------------------------------------------
r76014 | antocuni | 2010-07-08 12:20:39 +0200 (Thu, 08 Jul 2010) | 3 lines
Changed paths:
A /pypy/branch/reflex-support/pypy/module/cppyy/genreflex-methptrgetter.patch
(arigo, antocuni)
a patch for genreflex.py that adds the MethPtrGetter property to the FunctionMembers of a class
------------------------------------------------------------------------
r76011 | wlav | 2010-07-08 11:00:42 +0200 (Thu, 08 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/__init__.py
A /pypy/branch/reflex-support/pypy/module/cppyy/pythonify.py
A /pypy/branch/reflex-support/pypy/module/cppyy/test/test_pythonify.py
(cfbolz,wlav) New module pythonify for user interface, and its test. Make load_lib cache resulting libraries.
------------------------------------------------------------------------
r75998 | wlav | 2010-07-07 20:04:02 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
Support calls for double and char* on instances.
------------------------------------------------------------------------
r75991 | antocuni | 2010-07-07 18:28:02 +0200 (Wed, 07 Jul 2010) | 5 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/include/cppyy.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
lookup and print the property "MethPtrGetter" for methods; so far it's unused
and it's always empty, because genreflex.py does not generate this information
yet.
------------------------------------------------------------------------
r75987 | wlav | 2010-07-07 18:13:31 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
Merge static and method call for resolution on the C++ side.
------------------------------------------------------------------------
r75985 | wlav | 2010-07-07 17:48:01 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
Use an opaque handle instead of class name to locate Reflex::Type.
------------------------------------------------------------------------
r75964 | wlav | 2010-07-07 12:46:51 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
Made method call also use executors.
------------------------------------------------------------------------
r75963 | cfbolz | 2010-07-07 12:44:06 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
(cfbolz, wlav, arigo): make this work in C
------------------------------------------------------------------------
r75962 | arigo | 2010-07-07 12:16:48 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
Tentative fix of translation.
------------------------------------------------------------------------
r75961 | arigo | 2010-07-07 11:47:53 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
M /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
Remove svn:executable.
------------------------------------------------------------------------
r75960 | wlav | 2010-07-07 11:44:56 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
A /pypy/branch/reflex-support/pypy/module/cppyy/capi.py
A /pypy/branch/reflex-support/pypy/module/cppyy/executor.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(cfbolz, wlav) Make use of the new executor module and moved all Reflex-C interface code to capi.py.
------------------------------------------------------------------------
r75955 | arigo | 2010-07-07 10:43:49 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/backend/llgraph/llimpl.py
Fix for metainterp/test/test_ztranslation.
------------------------------------------------------------------------
r75954 | arigo | 2010-07-07 10:36:41 +0200 (Wed, 07 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/backend/llsupport/support.py
Fix for x86/test/test_basic.test_raw_malloc_and_access
------------------------------------------------------------------------
r75953 | cfbolz | 2010-07-07 10:25:38 +0200 (Wed, 07 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/backend/llsupport/descr.py
(arigo, cfbolz): add some sanity asserts to check that C arrays don't need a
typeid. don't try to get a typeid for raw arrays.
------------------------------------------------------------------------
r75940 | cfbolz | 2010-07-06 19:49:36 +0200 (Tue, 06 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
(cfbolz, arigo, antocuni): refactor exception handling to help the JIT for
completely unobvious reasons :-(
------------------------------------------------------------------------
r75935 | wlav | 2010-07-06 19:15:42 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(wlav) Add handling for char* return type on static functions.
------------------------------------------------------------------------
r75934 | cfbolz | 2010-07-06 19:03:23 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/backend/llgraph/llimpl.py
M /pypy/branch/reflex-support/pypy/jit/backend/llgraph/test/test_llgraph.py
(cfbolz, arigo): slightly obscure: need an unsafe cast in setarrayitem_raw_int
------------------------------------------------------------------------
r75932 | wlav | 2010-07-06 18:45:10 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(wlav, cfbolz) Add const char* argument passing and refactor converter lookup.
------------------------------------------------------------------------
r75931 | arigo | 2010-07-06 18:26:59 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/annotation/bookkeeper.py
M /pypy/branch/reflex-support/pypy/annotation/model.py
M /pypy/branch/reflex-support/pypy/annotation/test/test_model.py
M /pypy/branch/reflex-support/pypy/jit/backend/llsupport/descr.py
M /pypy/branch/reflex-support/pypy/jit/backend/llsupport/llmodel.py
M /pypy/branch/reflex-support/pypy/jit/backend/llsupport/symbolic.py
M /pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_descr.py
M /pypy/branch/reflex-support/pypy/jit/backend/llsupport/test/test_symbolic.py
M /pypy/branch/reflex-support/pypy/jit/backend/x86/assembler.py
M /pypy/branch/reflex-support/pypy/jit/backend/x86/regalloc.py
M /pypy/branch/reflex-support/pypy/module/_locale/interp_locale.py
M /pypy/branch/reflex-support/pypy/rlib/rlocale.py
M /pypy/branch/reflex-support/pypy/rpython/lltypesystem/rffi.py
M /pypy/branch/reflex-support/pypy/rpython/lltypesystem/test/test_rffi.py
M /pypy/branch/reflex-support/pypy/rpython/memory/lltypelayout.py
Merge trunk, r75828:HEAD.
------------------------------------------------------------------------
r75928 | cfbolz | 2010-07-06 17:36:01 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
add some more hints
------------------------------------------------------------------------
r75925 | cfbolz | 2010-07-06 17:17:10 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/codewriter/jtransform.py
M /pypy/branch/reflex-support/pypy/jit/codewriter/test/test_flatten.py
start some support for very simple force_cast cases
------------------------------------------------------------------------
r75917 | cfbolz | 2010-07-06 16:31:31 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/pypyjit/policy.py
let the JIT see our new module
------------------------------------------------------------------------
r75913 | cfbolz | 2010-07-06 16:12:39 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/jit/tl/pypyjit.py
M /pypy/branch/reflex-support/pypy/jit/tl/pypyjit_demo.py
the code that we would like to make fast with the JIT
------------------------------------------------------------------------
r75910 | cfbolz | 2010-07-06 16:01:27 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
(wlav, cfbolz, antocuni, arigo): refactor stuff to hopefully be more JIT-friendly
------------------------------------------------------------------------
r75904 | cfbolz | 2010-07-06 15:09:56 +0200 (Tue, 06 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
(antocuni, cfbolz, wlav, arigo): fix one annotation problem, not sure it's the
only one. Prefix all C-functions with "c_".
------------------------------------------------------------------------
r75899 | cfbolz | 2010-07-06 13:13:14 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(wlav, cfbolz, antocuni, arigo around): test and fix
------------------------------------------------------------------------
r75896 | cfbolz | 2010-07-06 12:50:11 +0200 (Tue, 06 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(antocuni, wlav, cfbolz, arigo around): fix memory leak. test overloading by
number of arguments.
------------------------------------------------------------------------
r75895 | cfbolz | 2010-07-06 12:37:23 +0200 (Tue, 06 Jul 2010) | 3 lines
Changed paths:
A /pypy/branch/reflex-support/pypy/module/cppyy/converter.py
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(antocuni, cfbolz, wlav, arigo around): start going in the direction of
supporting overloading. support returning doubles from static methods.
------------------------------------------------------------------------
r75882 | arigo | 2010-07-06 09:11:59 +0200 (Tue, 06 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
Kill the svn:executable property on this file.
------------------------------------------------------------------------
r75847 | cfbolz | 2010-07-05 19:09:53 +0200 (Mon, 05 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(antocuni, cfbolz, wlav, arigo): call the destructor too.
------------------------------------------------------------------------
r75843 | cfbolz | 2010-07-05 18:48:06 +0200 (Mon, 05 Jul 2010) | 2 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/include/cppyy.h
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
(arigo, antocuni, wlav, cfbolz): clean up the calling of constructors.
------------------------------------------------------------------------
r75839 | cfbolz | 2010-07-05 18:23:24 +0200 (Mon, 05 Jul 2010) | 4 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/include/cppyy.h
M /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
M /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(arigo, wlav, antocuni, cfbolz): hack some more until we are able to construct
an object (with a complete hack) and call a method on it. This still leaks
memory.
------------------------------------------------------------------------
r75835 | cfbolz | 2010-07-05 17:19:56 +0200 (Mon, 05 Jul 2010) | 3 lines
Changed paths:
A /pypy/branch/reflex-support/pypy/module/cppyy/include
A /pypy/branch/reflex-support/pypy/module/cppyy/include/cppyy.h
A /pypy/branch/reflex-support/pypy/module/cppyy/include/reflexcwrapper.h
M /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
A /pypy/branch/reflex-support/pypy/module/cppyy/src
A /pypy/branch/reflex-support/pypy/module/cppyy/src/reflexcwrapper.cxx
(cfbolz, wlav, antocuni, arigo): write just enough code to be able to call a
static method
------------------------------------------------------------------------
r75834 | cfbolz | 2010-07-05 15:25:54 +0200 (Mon, 05 Jul 2010) | 3 lines
Changed paths:
M /pypy/branch/reflex-support/pypy/module/cppyy/__init__.py
A /pypy/branch/reflex-support/pypy/module/cppyy/interp_cppyy.py
M /pypy/branch/reflex-support/pypy/module/cppyy/test
A /pypy/branch/reflex-support/pypy/module/cppyy/test/Makefile
A /pypy/branch/reflex-support/pypy/module/cppyy/test/example01.cxx
A /pypy/branch/reflex-support/pypy/module/cppyy/test/test_cppyy.py
(arigo, antocuni, cfbolz, wlav): a tiny C++ class and a test of how we want the
interface to look for now. Now the real fun starts.
------------------------------------------------------------------------
r75831 | cfbolz | 2010-07-05 13:54:02 +0200 (Mon, 05 Jul 2010) | 2 lines
Changed paths:
A /pypy/branch/reflex-support/pypy/module/cppyy
A /pypy/branch/reflex-support/pypy/module/cppyy/__init__.py
A /pypy/branch/reflex-support/pypy/module/cppyy/test
A /pypy/branch/reflex-support/pypy/module/cppyy/test/__init__.py
(arigo, antocuni, cfbolz, wlav) the empty module that we want to write
------------------------------------------------------------------------
r75828 | cfbolz | 2010-07-05 11:56:12 +0200 (Mon, 05 Jul 2010) | 2 lines
Changed paths:
A /pypy/branch/reflex-support (from /pypy/trunk:75827)
branch for the CERN sprint
------------------------------------------------------------------------
Modified: pypy/branch/reflex-support2/pypy/config/pypyoption.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/config/pypyoption.py (original)
+++ pypy/branch/reflex-support2/pypy/config/pypyoption.py Tue Nov 23 16:13:22 2010
@@ -31,7 +31,7 @@
"crypt", "signal", "_rawffi", "termios", "zlib",
"struct", "md5", "sha", "bz2", "_minimal_curses", "cStringIO",
"thread", "itertools", "pyexpat", "_ssl", "cpyext", "array",
- "_bisect"]
+ "_bisect", "cppyy"]
))
translation_modules = default_modules.copy()
Modified: pypy/branch/reflex-support2/pypy/jit/backend/llgraph/test/test_llgraph.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/jit/backend/llgraph/test/test_llgraph.py (original)
+++ pypy/branch/reflex-support2/pypy/jit/backend/llgraph/test/test_llgraph.py Tue Nov 23 16:13:22 2010
@@ -32,6 +32,21 @@
assert heaptracker.adr2int(llmemory.NULL) == 0
assert heaptracker.int2adr(0) == llmemory.NULL
+def test_force_cast_ptr_to_other_ptr():
+ from pypy.jit.backend.llgraph import llimpl
+ from pypy.rpython.lltypesystem import rffi, llmemory
+ x = lltype.malloc(rffi.DOUBLEP.TO, 1, flavor='raw')
+ x[0] = 0.1
+ args = lltype.malloc(rffi.CArray(rffi.VOIDP), 1, flavor='raw', zero=True)
+ assert not args[0]
+ arrayasint = llmemory.cast_adr_to_int(llmemory.cast_ptr_to_adr(args), mode="symbolic")
+ ptrasint = llmemory.cast_adr_to_int(llmemory.cast_ptr_to_adr(x), mode="symbolic")
+ llimpl.do_setarrayitem_raw_int(arrayasint, 0, ptrasint)
+ assert args[0]
+ lltype.free(x, flavor='raw')
+ lltype.free(args, flavor='raw')
+
+
## these tests never worked
## class TestOOTypeLLGraph(LLGraphTest):
## from pypy.jit.backend.llgraph.runner import OOtypeCPU as cpu_type
Modified: pypy/branch/reflex-support2/pypy/jit/codewriter/effectinfo.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/jit/codewriter/effectinfo.py (original)
+++ pypy/branch/reflex-support2/pypy/jit/codewriter/effectinfo.py Tue Nov 23 16:13:22 2010
@@ -51,9 +51,9 @@
write_descrs_fields, write_descrs_arrays,
extraeffect=EF_CAN_RAISE,
oopspecindex=OS_NONE):
- key = (frozenset(readonly_descrs_fields),
- frozenset(write_descrs_fields),
- frozenset(write_descrs_arrays),
+ key = (_frozenset_or_none(readonly_descrs_fields),
+ _frozenset_or_none(write_descrs_fields),
+ _frozenset_or_none(write_descrs_arrays),
extraeffect,
oopspecindex)
if key in cls._cache:
@@ -70,12 +70,17 @@
def check_forces_virtual_or_virtualizable(self):
return self.extraeffect >= self.EF_FORCES_VIRTUAL_OR_VIRTUALIZABLE
+
+def _frozenset_or_none(x):
+ if x is None: return None
+ return frozenset(x)
+
def effectinfo_from_writeanalyze(effects, cpu,
extraeffect=EffectInfo.EF_CAN_RAISE,
oopspecindex=EffectInfo.OS_NONE):
from pypy.translator.backendopt.writeanalyze import top_set
if effects is top_set:
- return None
+ return EffectInfo(None, None, None, extraeffect)
readonly_descrs_fields = []
# readonly_descrs_arrays = [] --- not enabled for now
write_descrs_fields = []
Modified: pypy/branch/reflex-support2/pypy/jit/codewriter/test/test_effectinfo.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/jit/codewriter/test/test_effectinfo.py (original)
+++ pypy/branch/reflex-support2/pypy/jit/codewriter/test/test_effectinfo.py Tue Nov 23 16:13:22 2010
@@ -3,6 +3,7 @@
from pypy.rpython.ootypesystem import ootype
from pypy.jit.codewriter.effectinfo import effectinfo_from_writeanalyze,\
EffectInfo
+from pypy.translator.backendopt.writeanalyze import top_set
class FakeCPU:
def fielddescrof(self, T, fieldname):
@@ -86,3 +87,19 @@
assert not effectinfo.readonly_descrs_fields
assert not effectinfo.write_descrs_fields
assert not effectinfo.write_descrs_arrays
+
+def test_no_effectinfo():
+ effectinfo = effectinfo_from_writeanalyze(top_set, None,
+ EffectInfo.EF_CANNOT_RAISE)
+ assert effectinfo.readonly_descrs_fields is None
+ assert effectinfo.write_descrs_fields is None
+ assert effectinfo.write_descrs_arrays is None
+ assert effectinfo.extraeffect == EffectInfo.EF_CANNOT_RAISE
+ #
+ effectinfo2 = effectinfo_from_writeanalyze(top_set, None,
+ EffectInfo.EF_CANNOT_RAISE)
+ assert effectinfo2 is effectinfo
+ #
+ effectinfo3 = effectinfo_from_writeanalyze(top_set, None,
+ EffectInfo.EF_PURE)
+ assert effectinfo3.extraeffect == EffectInfo.EF_PURE
Modified: pypy/branch/reflex-support2/pypy/jit/metainterp/optimizeopt/heap.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/jit/metainterp/optimizeopt/heap.py (original)
+++ pypy/branch/reflex-support2/pypy/jit/metainterp/optimizeopt/heap.py Tue Nov 23 16:13:22 2010
@@ -118,7 +118,8 @@
effectinfo = None
else:
effectinfo = op.getdescr().get_extra_info()
- if effectinfo is not None:
+ if (effectinfo is not None and
+ effectinfo.readonly_descrs_fields is not None):
# XXX we can get the wrong complexity here, if the lists
# XXX stored on effectinfo are large
for fielddescr in effectinfo.readonly_descrs_fields:
Modified: pypy/branch/reflex-support2/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/jit/metainterp/warmspot.py (original)
+++ pypy/branch/reflex-support2/pypy/jit/metainterp/warmspot.py Tue Nov 23 16:13:22 2010
@@ -148,7 +148,8 @@
class WarmRunnerDesc(object):
def __init__(self, translator, policy=None, backendopt=True, CPUClass=None,
- optimizer=None, ProfilerClass=EmptyProfiler, **kwds):
+ optimizer=None, ProfilerClass=EmptyProfiler,
+ write_jitcodes_directory=False, **kwds):
pyjitpl._warmrunnerdesc = self # this is a global for debugging only!
self.set_translator(translator)
self.build_cpu(CPUClass, **kwds)
@@ -177,6 +178,8 @@
self.rewrite_jit_merge_points(policy)
verbose = not self.cpu.translate_support_code
+ if write_jitcodes_directory:
+ verbose = False
self.codewriter.make_jitcodes(verbose=verbose)
self.rewrite_can_enter_jits()
self.rewrite_set_param()
Modified: pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_child.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_child.py (original)
+++ pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_child.py Tue Nov 23 16:13:22 2010
@@ -35,5 +35,6 @@
warmspot.jittify_and_run(interp, graph, [], policy=policy,
listops=True, CPUClass=CPUClass,
backendopt=True, inline=True,
+ write_jitcodes_directory=True,
optimizer=OPTIMIZER_FULL)
Modified: pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_demo.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_demo.py (original)
+++ pypy/branch/reflex-support2/pypy/jit/tl/pypyjit_demo.py Tue Nov 23 16:13:22 2010
@@ -1,72 +1,14 @@
-## base = object
+import cppyy
-## class Number(base):
-## __slots__ = ('val', )
-## def __init__(self, val=0):
-## self.val = val
-
-## def __add__(self, other):
-## if not isinstance(other, int):
-## other = other.val
-## return Number(val=self.val + other)
-
-## def __cmp__(self, other):
-## val = self.val
-## if not isinstance(other, int):
-## other = other.val
-## return cmp(val, other)
-
-## def __nonzero__(self):
-## return bool(self.val)
-
-## def g(x, inc=2):
-## return x + inc
-
-## def f(n, x, inc):
-## while x < n:
-## x = g(x, inc=1)
-## return x
-
-## import time
-## #t1 = time.time()
-## #f(10000000, Number(), 1)
-## #t2 = time.time()
-## #print t2 - t1
-## t1 = time.time()
-## f(10000000, 0, 1)
-## t2 = time.time()
-## print t2 - t1
-
-try:
- from array import array
-
- def coords(w,h):
- y = 0
- while y < h:
- x = 0
- while x < w:
- yield x,y
- x += 1
- y += 1
-
- def f(img):
- sa=0
- for x, y in coords(4,4):
- sa += x * y
- return sa
-
- #img=array('h',(1,2,3,4))
- print f(3)
-except Exception, e:
- print "Exception: ", type(e)
- print e
-
-## def f():
-## a=7
-## i=0
-## while i<4:
-## if i<0: break
-## if i<0: break
-## i+=1
-
-## f()
+import time
+import cppyy
+lib = cppyy.load_lib("../../module/cppyy/test/example01Dict.so")
+cls = cppyy._type_byname('example01')
+inst = cls.construct(-17)
+
+t1 = time.time()
+res = 0
+for i in range(10):
+ res += inst.invoke("addDataToInt", i)
+t2 = time.time()
+print t2 - t1
Modified: pypy/branch/reflex-support2/pypy/module/pypyjit/policy.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/module/pypyjit/policy.py (original)
+++ pypy/branch/reflex-support2/pypy/module/pypyjit/policy.py Tue Nov 23 16:13:22 2010
@@ -12,7 +12,7 @@
if '.' in modname:
modname, _ = modname.split('.', 1)
if modname in ['pypyjit', 'signal', 'micronumpy', 'math', 'exceptions',
- 'imp', 'sys', 'array', '_ffi']:
+ 'imp', 'sys', 'array', '_ffi', 'cppyy']:
return True
return False
Modified: pypy/branch/reflex-support2/pypy/translator/c/genc.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/translator/c/genc.py (original)
+++ pypy/branch/reflex-support2/pypy/translator/c/genc.py Tue Nov 23 16:13:22 2010
@@ -571,16 +571,15 @@
mk.rule(*rule)
if self.config.translation.gcrootfinder == 'asmgcc':
- trackgcfiles = [cfile[:-2] for cfile in mk.cfiles]
- if self.translator.platform.name == 'msvc':
+ trackgcfiles = [cfile[:-2] for cfile in mk.cfiles
+ if cfile.endswith('.c')]
+ if 1: # XXX do that more cleanly
trackgcfiles = [f for f in trackgcfiles
if f.startswith(('implement', 'testing',
'../module_cache/module'))]
sfiles = ['%s.s' % (c,) for c in trackgcfiles]
- lblsfiles = ['%s.lbl.s' % (c,) for c in trackgcfiles]
gcmapfiles = ['%s.gcmap' % (c,) for c in trackgcfiles]
mk.definition('ASMFILES', sfiles)
- mk.definition('ASMLBLFILES', lblsfiles)
mk.definition('GCMAPFILES', gcmapfiles)
mk.definition('DEBUGFLAGS', '-O2 -fomit-frame-pointer -g')
@@ -595,17 +594,32 @@
python = sys.executable + ' '
if self.translator.platform.name == 'msvc':
- lblofiles = []
- for cfile in mk.cfiles:
- f = cfile[:-2]
- if f in trackgcfiles:
- ofile = '%s.lbl.obj' % (f,)
- else:
- ofile = '%s.obj' % (f,)
-
- lblofiles.append(ofile)
- mk.definition('ASMLBLOBJFILES', lblofiles)
- mk.definition('OBJECTS', 'gcmaptable.obj $(ASMLBLOBJFILES)')
+ o_ext = '.obj'
+ lbl_ext = '.lbl.obj'
+ else:
+ o_ext = '.o'
+ lbl_ext = '.lbl.s'
+
+ objectfiles = []
+ nontrackgcexts = set()
+ for cfile in mk.cfiles:
+ f = cfile[:-2]
+ if f in trackgcfiles:
+ ofile = f + lbl_ext
+ else:
+ f, ext = os.path.splitext(cfile)
+ nontrackgcexts.add(ext)
+ ofile = f + o_ext
+ objectfiles.append(ofile)
+ if self.translator.platform.name == 'msvc':
+ objectfiles.append('gcmaptable.obj')
+ else:
+ objectfiles.append('gcmaptable.s')
+ mk.definition('OBJECTS', objectfiles)
+ nontrackgcexts = list(nontrackgcexts)
+ nontrackgcexts.sort()
+
+ if self.translator.platform.name == 'msvc':
# /Oi (enable intrinsics) and /Ob1 (some inlining) are mandatory
# even in debug builds
mk.definition('ASM_CFLAGS', '$(CFLAGS) $(CFLAGSEXTRA) /Oi /Ob1')
@@ -618,9 +632,13 @@
)
mk.rule('gcmaptable.c', '$(GCMAPFILES)',
'cmd /c ' + python + '$(PYPYDIR)/translator/c/gcc/trackgcroot.py -fmsvc $(GCMAPFILES) > $@')
+ mk.rule('gcmaptable.c', '$(GCMAPFILES)',
+ 'cmd /c ' + python + '$(PYPYDIR)/translator/c/gcc/trackgcroot.py -fmsvc $(GCMAPFILES) > $@')
+ for ext in nontrackgcexts:
+ mk.rule(ext + '.obj', '',
+ '$(CC) /nologo $(CFLAGS) $(CFLAGSEXTRA) /Fo$@ /c $< $(INCLUDEDIRS)')
else:
- mk.definition('OBJECTS', '$(ASMLBLFILES) gcmaptable.s')
mk.rule('%.s', '%.c', '$(CC) $(CFLAGS) $(CFLAGSEXTRA) -frandom-seed=$< -o $@ -S $< $(INCLUDEDIRS)')
mk.rule('%.lbl.s %.gcmap', '%.s',
[python +
@@ -633,6 +651,9 @@
'$(GCMAPFILES) > $@.tmp',
'mv $@.tmp $@'])
mk.rule('.PRECIOUS', '%.s', "# don't remove .s files if Ctrl-C'ed")
+ for ext in nontrackgcexts:
+ mk.rule('%.o', '%' + ext,
+ '$(CC) $(CFLAGS) $(CFLAGSEXTRA) -o $@ -c $< $(INCLUDEDIRS)')
else:
mk.definition('DEBUGFLAGS', '-O1 -g')
Modified: pypy/branch/reflex-support2/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/branch/reflex-support2/pypy/translator/tool/cbuild.py (original)
+++ pypy/branch/reflex-support2/pypy/translator/tool/cbuild.py Tue Nov 23 16:13:22 2010
@@ -271,15 +271,10 @@
if not self.separate_module_files:
return self
if outputfilename is None:
- # find more or less unique name there
- basepath = py.path.local(self.separate_module_files[0]).dirpath()
- pth = basepath.join('externmod').new(ext=host.so_ext)
- num = 0
- while pth.check():
- pth = basepath.join(
- 'externmod_%d' % (num,)).new(ext=host.so_ext)
- num += 1
- outputfilename=pth.purebasename
+ global _counter_so_names
+ counter = _counter_so_names
+ _counter_so_names = counter + 1
+ outputfilename = str(udir.join('externmod_%d' % counter))
lib = str(host.compile([], self, outputfilename=outputfilename,
standalone=False))
d = self._copy_attributes()
@@ -288,6 +283,8 @@
d['separate_module_sources'] = ()
return ExternalCompilationInfo(**d)
+_counter_so_names = 0
+
# ____________________________________________________________
#
More information about the Pypy-commit
mailing list