[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-250-gc0fcba1
Richard B. Kreckel
git at ginac.de
Thu Dec 9 21:50:12 CET 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GiNaC -- a C++ library for symbolic computations".
The branch, master has been updated
via c0fcba137d26486085ed5d4104b34d2c44978693 (commit)
via 866b3eb23253a272788d8791b1ed023e63674d50 (commit)
via 9177e7536ea82b739c72d3e41a319af7dbc15661 (commit)
via a6e5a7a5974dc95afe71c077f6a5e66b322c9d2c (commit)
via ab6a9475aef3d8f97a1b520731ad528603946410 (commit)
via 4b8098a96848d75490e04ba4746f67acb74daa9f (commit)
via 94ead6345f31939c9c9eff70ce88d74cf36a8004 (commit)
via c4da34c70ce1b9e3803317ebfe48b162cf9d3408 (commit)
via e56d94889fcfb729ad15d5088d5db3e9409bb6a4 (commit)
via adb222a4d30fade5b53e94e2750b8c0ba83e90b6 (commit)
via d6ab150eb3016ddb416f0533606ae3a393003e9e (commit)
via 3aec0ba298693329c1194e547043fef1a78b1b0d (commit)
from f5abf61d2cb1a1d1809d270a24fa098575b172c4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c0fcba137d26486085ed5d4104b34d2c44978693
Author: Alexei Sheplyakov <alexei.sheplyakov at gmail.com>
Date: Wed Jan 6 19:55:43 2010 +0200
Use C style cast when converting void* into function pointer.
Building GiNaC 1.5.5 with GCC 3.4 fails with the following error:
libtool: compile: ccache g++-3.4 -DHAVE_CONFIG_H -I. -I../../ginac -I../config -I/home/pc7135/varg/target/x86_64-linux-gnu/include -O2 -g -Wall -pipe -MT builtin_fcns.lo -MD -MP -MF .deps/builtin_fcns.Tpo -c ../../ginac/parser/builtin_fcns.cpp -fPIC -DPIC -o .libs/builtin_fcns.o
../../ginac/parser/builtin_fcns.cpp: In function `GiNaC::ex (* GiNaC::encode_serial_as_reader_func(unsigned int))(const GiNaC::exvector&)':
/home/pc7135/varg/tmp/build/GiNaC/build-linux-gcc-3.4/ginac/../../ginac/parser/builtin_fcns.cpp|67| error: ISO C++ forbids casting between pointer-to-function and pointer-to-object
make[2]: *** [builtin_fcns.lo] Error 1
The C++98 standard [expr.reinterpret.cast] does not allow
reinterpret_cast<function_pointer>(void*)
reinterpret_cast<void*>(function_pointer)
But the ability to do so is important for a lot of practical uses. So soon
after the C++98 standard was approved, a language defect report was filed
on this topic, see
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#195
The result is that compilers will be allowed to support reinterpret_cast
conversions of function pointers to other (pointers) types, and vice a versa.
Such conversions work with *current* compilers (GCC 4.x), but don't work
with older ones, hence this patch.
commit 866b3eb23253a272788d8791b1ed023e63674d50
Author: Jens Vollinga <jensv at nikhef.nl>
Date: Sun Aug 9 23:38:48 2009 +0200
Added get_builtin_reader() that parses only the builtin GiNaC functions
and pow, sqrt, and power.
commit 9177e7536ea82b739c72d3e41a319af7dbc15661
Author: Jens Vollinga <jensv at nikhef.nl>
Date: Sun Aug 9 23:27:10 2009 +0200
Fixed include of stdint.h (parser.cpp needs the header as well).
commit a6e5a7a5974dc95afe71c077f6a5e66b322c9d2c
Author: Alexei Sheplyakov <varg at metalica.kh.ua>
Date: Sat Aug 8 11:43:12 2009 +0300
Fix the compliation error *for real* ... and restore performance
Commit 8bf0597dde55e4c94a2ff39f1d8130902e3d7a9b (titled as 'Fixed the parser
such that it can read in user defined classes again.') made the parser a bit
slower, especially if the input contains many terms of user-defined type.
The reason for that is quite simple: we throw and catch an exception every
time we construct an object of user-defined type:
// dirty hack to distinguish between serial numbers of functions and real
// pointers.
GiNaC::function* f = NULL;
try {
unsigned serial = (unsigned)(unsigned long)(void *)(reader->second);
f = new GiNaC::function(serial, args);
}
catch ( std::runtime_error ) {
if ( f ) delete f;
ex ret = reader->second(args);
return ret;
}
Fortunately functions are aligned and we can use much more efficient
technique to distinguish between serial and pointers to functions.
commit ab6a9475aef3d8f97a1b520731ad528603946410
Author: Alexei Sheplyakov <varg at metalica.kh.ua>
Date: Fri Aug 7 23:22:18 2009 +0300
Fix the compliation error *for real*
commit 4b8098a96848d75490e04ba4746f67acb74daa9f
Author: Jens Vollinga <jensv at balin.nikhef.nl>
Date: Fri Jul 31 17:54:16 2009 +0200
Fixed memory leak.
commit 94ead6345f31939c9c9eff70ce88d74cf36a8004
Author: Jens Vollinga <jensv at balin.nikhef.nl>
Date: Fri Jul 31 15:29:17 2009 +0200
Fixed the fix in commit f059ebe117d15292e0d262e6e8e232e835c7e33c.
commit c4da34c70ce1b9e3803317ebfe48b162cf9d3408
Author: Jens Vollinga <jensv at balin.nikhef.nl>
Date: Fri Jul 31 14:41:08 2009 +0200
Fixed dirty hack in parser to distinguish between serial numbers and pointers.
commit e56d94889fcfb729ad15d5088d5db3e9409bb6a4
Author: Jens Vollinga <jensv at balin.nikhef.nl>
Date: Fri Jul 31 12:48:58 2009 +0200
Fixed the parser such that it can read in user defined classes again.
Fixed default reader to parse also pow, sqrt and power.
commit adb222a4d30fade5b53e94e2750b8c0ba83e90b6
Author: Jens Vollinga <jensv at balin.nikhef.nl>
Date: Fri Jul 31 11:14:01 2009 +0200
Fixed cast that caused compile error on 64bit machines.
commit d6ab150eb3016ddb416f0533606ae3a393003e9e
Author: Jens Vollinga <jensv at nikhef.nl>
Date: Wed Jul 15 08:26:33 2009 +0200
Allow user defined functions to be parsed.
This patch is an ugly hack that does the same as the commit
f38cbcd651246fb5c1294705d29399f3cbfddaf5
but without changing the ABI (so it can be used in ginac_1-5).
commit 3aec0ba298693329c1194e547043fef1a78b1b0d
Author: Alexei Sheplyakov <Alexei.Sheplyakov at gmail.com>
Date: Thu Dec 9 20:42:50 2010 +0200
Revert "Changed the parser such that it understands all defined functions"
This reverts commit f38cbcd651246fb5c1294705d29399f3cbfddaf5, which
broke parsing user-defined classes.
-----------------------------------------------------------------------
Summary of changes:
INSTALL | 3 +-
configure.ac | 4 +
ginac/Makefile.am | 18 +++++-
ginac/function.pl | 8 ++-
ginac/parser/builtin_fcns.def | 14 ++++
ginac/parser/default_reader.tpl | 145 +++++++++++++++++++++++++++++++++++++++
ginac/parser/parse_context.cpp | 20 ------
ginac/parser/parse_context.h | 32 +++++++--
ginac/parser/parser.cpp | 42 +++++++++++-
9 files changed, 253 insertions(+), 33 deletions(-)
create mode 100644 ginac/parser/builtin_fcns.def
create mode 100644 ginac/parser/default_reader.tpl
hooks/post-receive
--
GiNaC -- a C++ library for symbolic computations
More information about the GiNaC-devel
mailing list