compbench-devel Mailing List for CompBenchmarks (Page 22)
Brought to you by:
xfred
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(51) |
Nov
(66) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(242) |
Feb
(56) |
Mar
(95) |
Apr
(120) |
May
(127) |
Jun
(32) |
Jul
(10) |
Aug
(55) |
Sep
(114) |
Oct
(3) |
Nov
|
Dec
|
From: Frederic T. <xf...@us...> - 2007-03-13 17:41:58
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29787 Added Files: description.xml options.xml Log Message: First import. --- NEW FILE: options.xml --- <?xml version="1.0" ?> <cel> <cel-include> <cel-str>gxx/options.xml</cel-str> </cel-include> <!-- elide-constructors --> <cel-function-def> <cel-str>kb-gxx-option-elide-constructors-is-compatible</cel-str> <cel-var-set> <cel-str>return</cel-str> <cel-function-call> <cel-str>kb-gxx-option-gcc2.95-is-compatible</cel-str> </cel-function-call> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> <cel-str>1</cel-str> </cel-cmp-eq> <cel-cond-if> <cel-logic-or> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O2</cel-str> </cel-cmp-eq> <cel-cmp-eq> <cel-var-get> <cel-str>kb-option-mainoptimization</cel-str> </cel-var-get> <cel-str>-O3</cel-str> </cel-cmp-eq> </cel-logic-or> <cel-var-set> <cel-str>return</cel-str> <cel-str>option implied by -O2 and -O3</cel-str> </cel-var-set> </cel-cond-if> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> </cel> --- NEW FILE: description.xml --- <?xml version="1.0" ?> <options> <include file="gxx/description.xml"/> <option id="elide-constructors"> <value>-felide-constructors</value> <short-description>Elide constructors when this seems possible</short-description> <editor-description> Elide constructors when this seems plausible (C++ only). With this flag, GNU C++ initializes y directly from the call to foo without going through a temporary in the following code: A foo (); A y = foo (); Without this option, GNU C++ first initializes y by calling the appropriate constructor for type A; then assigns the result of foo to a temporary; and, finally, replaces the initial value of `y' with the temporary. The default behavior (`-fno-elide-constructors') is specified by the draft ANSI C++ standard. If your program's constructors have side effects, using `-felide-constructors' can make your program act differently, since some constructor calls may be omitted. </editor-description> </option> </options> |
From: Frederic T. <xf...@us...> - 2007-03-13 17:41:43
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/common In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29761 Added Files: common.xml Log Message: First import. --- NEW FILE: common.xml --- <?xml version="1.0" ?> <cel> <!-- GLOBALS --> <!-- Array for storing current compiler options in CEL --> <cel-array-def> <cel-str>kb-options</cel-str> </cel-array-def> <cel-var-set> <cel-str>kb-option-mainoptimization</cel-str> <cel-str>0</cel-str> </cel-var-set> <!-- Set to 1 if an option is inhibiting binary size optimizations --> <cel-var-set> <cel-str>kb-option-size-optimizations-invaliding</cel-str> <cel-str>0</cel-str> </cel-var-set> <!-- Convenience function to reset stored options --> <!-- and start options' evaluation on another compiler or option set --> <cel-function-def> <cel-str>kb-common-option-reset</cel-str> <cel-var-set> <cel-str>kb-option-size-optimizations-invaliding</cel-str> <cel-str>0</cel-str> </cel-var-set> <cel-var-set> <cel-str>kb-option-mainoptimization</cel-str> <cel-str>0</cel-str> </cel-var-set> <cel-array-undef> <cel-str>kb-options</cel-str> </cel-array-undef> <cel-array-def> <cel-str>kb-options</cel-str> </cel-array-def> </cel-function-def> <!-- Common call to try adding a new option is current option set --> <!-- The TOS item is the value while the BOS refers to the --> <!-- variable name used to store the variable globaly. --> <!-- This function is useful just to keep track of option in --> <!-- some identified CEL variables --> <!-- If the corresponding CEL variable is not initialised, --> <!-- option is pushed to kb-options and 1 is returned --> <cel-function-def> <cel-str>kb-common-option-apply</cel-str> <cel-var-set> <cel-str>value</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>option-var</cel-str> <cel-stack-pop/> </cel-var-set> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> </cel-var-get> <cel-str>0</cel-str> </cel-cmp-eq> <!-- CEL variable not set; set it to value, and push value --> <!-- in options --> <cel-block> <cel-array-add> <cel-str>kb-options</cel-str> <cel-var-get><cel-str>value</cel-str></cel-var-get> </cel-array-add> <cel-var-set> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> </cel-var-set> </cel-block> <!-- CEL variable previously set : return error message --> <cel-block> <cel-cond-if> <cel-cmp-eq> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> <cel-var-get> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> </cel-var-get> </cel-cmp-eq> <cel-str-concat> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> <cel-str-sp/> <cel-str>has already been set</cel-str> </cel-str-concat> <cel-str-concat> <cel-var-get> <cel-str>value</cel-str> </cel-var-get> <cel-str-sp/> <cel-str>is incompatible with</cel-str> <cel-str-sp/> <cel-var-get> <cel-var-get> <cel-str>option-var</cel-str> </cel-var-get> </cel-var-get> </cel-str-concat> </cel-cond-if> </cel-block> </cel-cond-if> </cel-function-def> <!-- Returns 1 if the passed compiler version matches the minimum --> <!-- version given in 2d argument --> <cel-function-def> <cel-str>kb-common-option-version-is-compatible</cel-str> <cel-var-set> <cel-str>compiler-min-version</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>compiler-version</cel-str> <cel-stack-pop/> </cel-var-set> <cel-var-set> <cel-str>return</cel-str> <cel-str>1</cel-str> </cel-var-set> <cel-cond-if> <cel-logic-not> <cel-cmp-ae> <cel-var-get> <cel-str>compiler-min-version</cel-str> </cel-var-get> <cel-var-get> <cel-str>compiler-version</cel-str> </cel-var-get> </cel-cmp-ae> </cel-logic-not> <cel-var-set> <cel-str>return</cel-str> <cel-str>g++ or gcc >= 2.95.0 needed</cel-str> </cel-var-set> </cel-cond-if> <cel-var-get> <cel-str>return</cel-str> </cel-var-get> </cel-function-def> </cel> |
From: Frederic T. <xf...@us...> - 2007-03-13 17:40:51
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/common In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29338/common Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/common added to the repository |
From: Frederic T. <xf...@us...> - 2007-03-13 17:40:51
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29338/gxx Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/gxx added to the repository |
From: Frederic T. <xf...@us...> - 2007-03-13 17:40:51
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29338/g++ Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB/g++ added to the repository |
From: Frederic T. <xf...@us...> - 2007-03-13 17:40:31
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29322/KB Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/KB added to the repository |
From: Frederic T. <xf...@us...> - 2007-03-12 21:48:42
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4739 Modified Files: 05-CEL.pl Log Message: Minor updates on <cel-include/> test. Index: 05-CEL.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/05-CEL.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 05-CEL.pl 11 Mar 2007 18:46:06 -0000 1.5 --- 05-CEL.pl 12 Mar 2007 21:48:38 -0000 1.6 *************** *** 631,635 **** $I->add($f); ! ok($I->Evaluate() eq "test", "include(cel-str.xml) returns test"); } --- 631,635 ---- $I->add($f); ! ok($I->Evaluate() eq " test", "include(cel-str.xml) returns test"); } |
From: Frederic T. <xf...@us...> - 2007-03-12 21:48:06
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4375 Added Files: 05-KB-Options.pl Log Message: First import. --- NEW FILE: 05-KB-Options.pl --- #!/usr/bin/perl -w -I .. use strict; use CBM; my $sys; my $kb_srcdir; push(@INC, "lib"); require "libtest.pl"; my @OPTIONS_O = ( ['O0', "gcxc", "2.97.0", "g++ or gcc needed"], ['O0', "gcxc", "2.91.0", "g++ or gcc needed"], ['O0', "gcc", "2.92.0", "g++ or gcc >= 2.95.0 needed"], ['O0', "gcc", "2.95.0", "1"], ['reset'], ['O0', "gcc", "2.99.0", "1"], ['reset'], ['O0', "gcc", "2.92.0", "g++ or gcc >= 2.95.0 needed"], ['O0', "gcc", "2.95.0", "1"], ['reset'], ['O0', "gcc", "2.95.0", "1"], ['O0', "gcc", "2.95.0", "-O0 has already been set"], ['reset'], ['O0', "gcc", "2.95.0", "1"], ['reset'], ['O0', "gcc", "2.96.0", "1"], ['reset'], ['O0', "gcc", "3.3.0", "1"], ['reset'], ['O0', "gcc", "4.1.0", "1"], ['reset'], ['Os', "gcc", "2.92.0", "g++ or gcc >= 2.95.0 needed"], ['reset'], ['Os', "gcc", "2.95.0", "1"], ['reset'], ['Os', "gcc", "2.96.0", "1"], ['reset'], ['Os', "gcc", "3.3.0", "1"], ['reset'], ['Os', "gcc", "4.1.0", "1"], ['reset'], ['Os', "gcc", "4.1.0", "1"], ['O0', "gcc", "4.1.0", "-O0 is incompatible with -Os"], ); use Test::More; sub plan_count_O_tests { my $n = 0; foreach(@OPTIONS_O) { if ((@{$_}+0)==4) { $n++; } else { $n++; } } return($n); } plan tests => (plan_count_O_tests() + 1); our $top_srcdir; my $T; my $F; sub call_reset { my $fc = new CBM::CelFunctionCall(); my $fcn = new CBM::CelStr("kb-common-option-reset"); $fc->add($fcn); my $e = $fc->Evaluate(); return($e); } sub call_option_function { my $function = shift; my $compiler_id = shift; my $version = shift; my $BL = new CBM::CelBlock(); my $fc = new CBM::CelFunctionCall(); my $fcn = new CBM::CelStr("kb-gxx-option-$function-is-compatible"); my $comp = new CBM::CelStr($compiler_id); my $ver = new CBM::CelVersion($version); my $SP0 = new CBM::CelStackPush(); $SP0->add($comp); $BL->add($SP0); my $SP1 = new CBM::CelStackPush(); $SP1->add($ver); $BL->add($SP1); $fc->add($fcn); $BL->add($fc); my $e = $BL->Evaluate(); return($e); } sub test_options_O { my $f = "$kb_srcdir/gxx/options.xml"; my $R = new CBM::CelReader($f); my $D = $R->parse(); ok(defined($D), "$f can be parsed"); $D->Evaluate(); my $o; foreach $o (@OPTIONS_O) { my ($option_compat_function, $compiler, $version, $msg) = @{$o}; if ($option_compat_function ne "reset") { my $e = call_option_function($option_compat_function, $compiler, $version); ok($e eq "$msg", "Testing $option_compat_function with compiler $compiler (version $version); expected : '$msg', has '$e'"); } else { my $e = call_reset(); ok($e eq "1", "CEL reset from common.xml gives 1"); } } } my $p = `pwd`; chomp($p); $sys = CBM::Init(); $kb_srcdir="$top_srcdir/../../libcompbenchmarks/share/KB"; test_options_O(); $sys->done(); |
From: Frederic T. <xf...@us...> - 2007-03-11 18:51:35
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23154 Modified Files: CEL-Atom.h Log Message: Evaluate() renamed to evaluate(); Evaluate() introduced. Other API changes. Index: CEL-Atom.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Atom.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CEL-Atom.h 8 Mar 2007 17:09:18 -0000 1.4 --- CEL-Atom.h 11 Mar 2007 18:51:32 -0000 1.5 *************** *** 31,37 **** std::vector<celArray_t*> celArrays; - virtual void varDone(void); - virtual void arrayDone(void); - protected: CelAtom *parent; --- 31,34 ---- *************** *** 46,50 **** --- 43,51 ---- virtual CelAtom *varOwner(void); + virtual std::string evaluate(void) = 0; public: + virtual void varDone(void); + virtual void arrayDone(void); + virtual std::string xmlEntityName(void) = 0; virtual std::vector<CelAtom *>& Childs(void); *************** *** 65,69 **** virtual void add(CelAtom *_atom); ! virtual std::string Evaluate(void) = 0; virtual std::string str(int _indent = 0); --- 66,70 ---- virtual void add(CelAtom *_atom); ! virtual std::string Evaluate(void); virtual std::string str(int _indent = 0); *************** *** 73,81 **** class CelContainer : public CelAtom { protected: public: CelContainer(); virtual std::string xmlEntityName(void); - virtual std::string Evaluate(void); virtual ~CelContainer(); --- 74,82 ---- class CelContainer : public CelAtom { protected: + virtual std::string evaluate(void); public: CelContainer(); virtual std::string xmlEntityName(void); virtual ~CelContainer(); |
From: Frederic T. <xf...@us...> - 2007-03-11 18:50:50
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22763 Modified Files: CEL-Atom.cpp Log Message: Evaluate() renamed to evaluate(); <cel-block/> not variable owner anymore. celDebug and Evaluate() introduced. Index: CEL-Atom.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Atom.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CEL-Atom.cpp 8 Mar 2007 17:09:18 -0000 1.4 --- CEL-Atom.cpp 11 Mar 2007 18:50:47 -0000 1.5 *************** *** 7,13 **** ------------------------------------------------------------------------- */ #include <CEL/CEL-Atom.h> ! #include <stdlib.h> using namespace CBM; --- 7,15 ---- ------------------------------------------------------------------------- */ #include <CEL/CEL-Atom.h> ! #include <iostream> #include <stdlib.h> + int celDebug = 0; + using namespace CBM; *************** *** 67,71 **** e=ptr->xmlEntityName(); if ((e=="cel-function-def") || ! (e=="cel-block") || (e=="cel")) { return(ptr); --- 69,73 ---- e=ptr->xmlEntityName(); if ((e=="cel-function-def") || ! /* (e=="cel-block") || */ (e=="cel")) { return(ptr); *************** *** 242,245 **** --- 244,281 ---- } + std::string CelAtom::Evaluate(void) + { + std::string r; + CelAtom *P = parent; + int n = 0; + int i = 0; + + + if (celDebug) { + while (P) { + n++; + P=P->parent; + } + i = n; + + while (i--) { + std::cerr << " "; + } + std::cerr << "Evaluating " << xmlEntityName() << std::endl; + } + + r=evaluate(); + + if (celDebug) { + i = n; + while (i--) { + std::cerr << " "; + } + std::cerr << "~Evaluating " << xmlEntityName() << " '" << r << "'" << std::endl; + } + + return(r); + } + std::string CelAtom::str(int _indent) { *************** *** 305,314 **** } ! std::string CelContainer::xmlEntityName(void) ! { ! return("cel"); ! } ! ! std::string CelContainer::Evaluate(void) { int i; --- 341,345 ---- } ! std::string CelContainer::evaluate(void) { int i; *************** *** 326,329 **** --- 357,365 ---- } + std::string CelContainer::xmlEntityName(void) + { + return("cel"); + } + CelContainer::~CelContainer() { |
From: Frederic T. <xf...@us...> - 2007-03-11 18:49:47
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22274 Modified Files: CEL-Cmp.cpp Log Message: Evaluate() renamed to evaluate(); <cel-cmp-ae/> fixed. Index: CEL-Cmp.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Cmp.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Cmp.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Cmp.cpp 11 Mar 2007 18:49:44 -0000 1.2 *************** *** 31,35 **** } ! std::string CelCmpEq::Evaluate(void) { int i; --- 31,35 ---- } ! std::string CelCmpEq::evaluate(void) { int i; *************** *** 70,75 **** } ! ! std::string CelCmpAE::Evaluate(void) { int i; --- 70,74 ---- } ! std::string CelCmpAE::evaluate(void) { int i; *************** *** 88,95 **** if (previousSet) { dum=A->Evaluate(); - tmp=atoi(dum.c_str()); ! if (tmp < previous_tmp) return("0"); } else { previousSet=1; --- 87,95 ---- if (previousSet) { dum=A->Evaluate(); ! tmp=atoi(dum.c_str()); ! if (tmp > previous_tmp) return("0"); + previous_tmp=tmp; } else { previousSet=1; |
From: Frederic T. <xf...@us...> - 2007-03-11 18:49:14
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22203 Modified Files: CEL-Version.cpp Log Message: Evaluate() renamed to evaluate(); More checks on input version string. Index: CEL-Version.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Version.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Version.cpp 6 Mar 2007 19:31:15 -0000 1.2 --- CEL-Version.cpp 11 Mar 2007 18:49:10 -0000 1.3 *************** *** 41,51 **** digits=0; ! while ( (cur=cbmSystem->Split(_version, ".", i))!="") { ! tmp=atoi(cur.c_str()); ! internal+=tmp; ! internal*=100; ! mul*=100; ! i++; ! digits+=2; } internal/=100; --- 41,54 ---- digits=0; ! ! if (_version.find(".", 0)>0) { ! while ( (cur=cbmSystem->Split(_version, ".", i))!="") { ! tmp=atoi(cur.c_str()); ! internal+=tmp; ! internal*=100; ! mul*=100; ! i++; ! digits+=2; ! } } internal/=100; *************** *** 80,88 **** char c[16]; /* sprintf(c, "%d", internal); */ ! sprintf(c, "%0*d", digits, internal); ! x_version=c; } ! std::string CelVersion::Evaluate(void) { return(x_version); --- 83,96 ---- char c[16]; /* sprintf(c, "%d", internal); */ ! ! if (digits>0) { ! sprintf(c, "%0*d", digits, internal); ! x_version=c; ! } else { ! x_version="0"; ! } } ! std::string CelVersion::evaluate(void) { return(x_version); |
From: Frederic T. <xf...@us...> - 2007-03-11 18:48:34
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21814 Modified Files: CEL-Cmp.h CEL-Version.h Log Message: Evaluate() renamed to evaluate(); Index: CEL-Version.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Version.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Version.h 6 Mar 2007 19:31:15 -0000 1.2 --- CEL-Version.h 11 Mar 2007 18:48:30 -0000 1.3 *************** *** 29,38 **** virtual std::string xmlEntityName(void); virtual std::string xmlValue(void); public: CelVersion(std::string _version); - virtual std::string Evaluate(void); - virtual ~CelVersion(); }; --- 29,37 ---- virtual std::string xmlEntityName(void); virtual std::string xmlValue(void); + virtual std::string evaluate(void); public: CelVersion(std::string _version); virtual ~CelVersion(); }; Index: CEL-Cmp.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Cmp.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Cmp.h 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Cmp.h 11 Mar 2007 18:48:30 -0000 1.2 *************** *** 26,34 **** protected: virtual std::string xmlEntityName(void); public: CelCmpEq(); - virtual std::string Evaluate(void); - virtual ~CelCmpEq(); }; --- 26,34 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelCmpEq(); virtual ~CelCmpEq(); }; *************** *** 39,47 **** protected: virtual std::string xmlEntityName(void); public: CelCmpAE(); - virtual std::string Evaluate(void); - virtual ~CelCmpAE(); }; --- 39,47 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelCmpAE(); virtual ~CelCmpAE(); }; |
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21384 Modified Files: CEL-Array.cpp CEL-Array.h CEL-Block.cpp CEL-Block.h CEL-Cond.cpp CEL-Cond.h CEL-Function.cpp CEL-Function.h CEL-Include.cpp CEL-Include.h CEL-Logic.cpp CEL-Logic.h CEL-Loop.cpp CEL-Loop.h CEL-Math.cpp CEL-Math.h CEL-Reader.cpp CEL-Stack.cpp CEL-Stack.h CEL-Str.cpp CEL-Str.h CEL-Var.cpp CEL-Var.h Log Message: Evaluate() renamed to evaluate(); Index: CEL-Cond.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Cond.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Cond.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Cond.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 31,35 **** } ! std::string CelCondIf::Evaluate(void) { int n = childs.size(); --- 31,35 ---- } ! std::string CelCondIf::evaluate(void) { int n = childs.size(); *************** *** 55,59 **** return(NOK->Evaluate()); else ! return(0); } } --- 55,59 ---- return(NOK->Evaluate()); else ! return("0"); } } Index: CEL-Math.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Math.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Math.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Math.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 31,35 **** ! std::string CelMathInc::Evaluate(void) { int i; --- 31,35 ---- ! std::string CelMathInc::evaluate(void) { int i; *************** *** 67,71 **** ! std::string CelMathDec::Evaluate(void) { int i; --- 67,71 ---- ! std::string CelMathDec::evaluate(void) { int i; Index: CEL-Block.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Block.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Block.h 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Block.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 17,25 **** protected: virtual std::string xmlEntityName(void); public: CelBlock(); - virtual std::string Evaluate(void); - virtual ~CelBlock(); }; --- 17,25 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelBlock(); virtual ~CelBlock(); }; Index: CEL-Cond.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Cond.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Cond.h 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Cond.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 26,34 **** protected: virtual std::string xmlEntityName(void); public: CelCondIf(); - virtual std::string Evaluate(void); - virtual ~CelCondIf(); }; --- 26,33 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); public: CelCondIf(); virtual ~CelCondIf(); }; Index: CEL-Var.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Var.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Var.cpp 7 Mar 2007 18:00:21 -0000 1.2 --- CEL-Var.cpp 11 Mar 2007 18:47:49 -0000 1.3 *************** *** 31,35 **** } ! std::string CelVarSet::Evaluate(void) { int n = childs.size(); --- 31,35 ---- } ! std::string CelVarSet::evaluate(void) { int n = childs.size(); *************** *** 67,71 **** } ! std::string CelVarGet::Evaluate(void) { int n = childs.size(); --- 67,71 ---- } ! std::string CelVarGet::evaluate(void) { int n = childs.size(); *************** *** 78,81 **** --- 78,82 ---- N=childs[0]; + cv=varOwner()->VarGet(N->Evaluate()); if (cv) *************** *** 99,103 **** } ! std::string CelVarUndef::Evaluate(void) { int n = childs.size(); --- 100,104 ---- } ! std::string CelVarUndef::evaluate(void) { int n = childs.size(); *************** *** 106,110 **** if (n!=1) return("0"); ! N=childs[0]; return(varOwner()->VarUndef(N->Evaluate())); --- 107,111 ---- if (n!=1) return("0"); ! N=childs[0]; return(varOwner()->VarUndef(N->Evaluate())); Index: CEL-Math.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Math.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Math.h 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Math.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 26,34 **** protected: virtual std::string xmlEntityName(void); public: CelMathInc(); - virtual std::string Evaluate(void); - virtual ~CelMathInc(); }; --- 26,34 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelMathInc(); virtual ~CelMathInc(); }; *************** *** 39,47 **** protected: virtual std::string xmlEntityName(void); public: CelMathDec(); - virtual std::string Evaluate(void); - virtual ~CelMathDec(); }; --- 39,47 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelMathDec(); virtual ~CelMathDec(); }; Index: CEL-Array.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Array.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Array.cpp 8 Mar 2007 17:09:17 -0000 1.2 --- CEL-Array.cpp 11 Mar 2007 18:47:48 -0000 1.3 *************** *** 31,35 **** } ! std::string CelArrayDef::Evaluate(void) { int n = childs.size(); --- 31,35 ---- } ! std::string CelArrayDef::evaluate(void) { int n = childs.size(); *************** *** 64,68 **** } ! std::string CelArrayAdd::Evaluate(void) { int n = childs.size(); --- 64,68 ---- } ! std::string CelArrayAdd::evaluate(void) { int n = childs.size(); *************** *** 100,104 **** } ! std::string CelArraySize::Evaluate(void) { int n = childs.size(); --- 100,104 ---- } ! std::string CelArraySize::evaluate(void) { int n = childs.size(); *************** *** 130,134 **** } ! std::string CelArrayGet::Evaluate(void) { int n = childs.size(); --- 130,134 ---- } ! std::string CelArrayGet::evaluate(void) { int n = childs.size(); *************** *** 165,169 **** } ! std::string CelArrayUndef::Evaluate(void) { int n = childs.size(); --- 165,169 ---- } ! std::string CelArrayUndef::evaluate(void) { int n = childs.size(); Index: CEL-Stack.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Stack.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Stack.cpp 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Stack.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 37,41 **** } ! std::string CelStackPush::Evaluate(void) { int n = childs.size(); --- 37,41 ---- } ! std::string CelStackPush::evaluate(void) { int n = childs.size(); *************** *** 69,73 **** } ! std::string CelStackPop::Evaluate(void) { int n = childs.size(); --- 69,73 ---- } ! std::string CelStackPop::evaluate(void) { int n = childs.size(); Index: CEL-Array.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Array.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Array.h 8 Mar 2007 17:09:17 -0000 1.2 --- CEL-Array.h 11 Mar 2007 18:47:49 -0000 1.3 *************** *** 27,35 **** protected: virtual std::string xmlEntityName(void); public: CelArrayDef(); - virtual std::string Evaluate(void); - virtual ~CelArrayDef(); }; --- 27,35 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelArrayDef(); virtual ~CelArrayDef(); }; *************** *** 38,46 **** protected: virtual std::string xmlEntityName(void); public: CelArrayAdd(); - virtual std::string Evaluate(void); - virtual ~CelArrayAdd(); }; --- 38,46 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelArrayAdd(); virtual ~CelArrayAdd(); }; *************** *** 49,57 **** protected: virtual std::string xmlEntityName(void); public: CelArraySize(); - virtual std::string Evaluate(void); - virtual ~CelArraySize(); }; --- 49,56 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); public: CelArraySize(); virtual ~CelArraySize(); }; *************** *** 60,68 **** protected: virtual std::string xmlEntityName(void); public: CelArrayGet(); - virtual std::string Evaluate(void); - virtual ~CelArrayGet(); }; --- 59,67 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelArrayGet(); virtual ~CelArrayGet(); }; *************** *** 71,79 **** protected: virtual std::string xmlEntityName(void); public: CelArrayUndef(); - virtual std::string Evaluate(void); - virtual ~CelArrayUndef(); }; --- 70,78 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelArrayUndef(); virtual ~CelArrayUndef(); }; Index: CEL-Var.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Var.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Var.h 7 Mar 2007 18:00:21 -0000 1.2 --- CEL-Var.h 11 Mar 2007 18:47:49 -0000 1.3 *************** *** 27,35 **** protected: virtual std::string xmlEntityName(void); public: CelVarSet(); - virtual std::string Evaluate(void); - virtual ~CelVarSet(); }; --- 27,35 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelVarSet(); virtual ~CelVarSet(); }; *************** *** 38,46 **** protected: virtual std::string xmlEntityName(void); public: CelVarGet(); - virtual std::string Evaluate(void); - virtual ~CelVarGet(); }; --- 38,46 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelVarGet(); virtual ~CelVarGet(); }; *************** *** 49,57 **** protected: virtual std::string xmlEntityName(void); public: CelVarUndef(); - virtual std::string Evaluate(void); - virtual ~CelVarUndef(); }; --- 49,56 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); public: CelVarUndef(); virtual ~CelVarUndef(); }; Index: CEL-Logic.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Logic.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Logic.h 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Logic.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 26,34 **** protected: virtual std::string xmlEntityName(void); public: CelLogicTrue(); - virtual std::string Evaluate(void); - virtual ~CelLogicTrue(); }; --- 26,34 ---- protected: virtual std::string xmlEntityName(void); + + virtual std::string evaluate(void); public: CelLogicTrue(); virtual ~CelLogicTrue(); }; *************** *** 39,47 **** protected: virtual std::string xmlEntityName(void); public: CelLogicFalse(); - virtual std::string Evaluate(void); - virtual ~CelLogicFalse(); }; --- 39,47 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelLogicFalse(); virtual ~CelLogicFalse(); }; *************** *** 52,60 **** protected: virtual std::string xmlEntityName(void); public: CelLogicOr(); - virtual std::string Evaluate(void); - virtual ~CelLogicOr(); }; --- 52,60 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelLogicOr(); virtual ~CelLogicOr(); }; *************** *** 66,74 **** protected: virtual std::string xmlEntityName(void); public: CelLogicAnd(); - virtual std::string Evaluate(void); - virtual ~CelLogicAnd(); }; --- 66,73 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); public: CelLogicAnd(); virtual ~CelLogicAnd(); }; *************** *** 79,87 **** protected: virtual std::string xmlEntityName(void); public: CelLogicNot(); - virtual std::string Evaluate(void); - virtual ~CelLogicNot(); }; --- 78,85 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); public: CelLogicNot(); virtual ~CelLogicNot(); }; Index: CEL-Logic.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Logic.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Logic.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Logic.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 30,34 **** } ! std::string CelLogicTrue::Evaluate(void) { return("1"); --- 30,34 ---- } ! std::string CelLogicTrue::evaluate(void) { return("1"); *************** *** 50,54 **** ! std::string CelLogicFalse::Evaluate(void) { return("0"); --- 50,54 ---- ! std::string CelLogicFalse::evaluate(void) { return("0"); *************** *** 71,75 **** ! std::string CelLogicOr::Evaluate(void) { int i; --- 71,75 ---- ! std::string CelLogicOr::evaluate(void) { int i; *************** *** 100,104 **** } ! std::string CelLogicAnd::Evaluate(void) { int i; --- 100,104 ---- } ! std::string CelLogicAnd::evaluate(void) { int i; *************** *** 129,133 **** } ! std::string CelLogicNot::Evaluate(void) { int n = childs.size(); --- 129,133 ---- } ! std::string CelLogicNot::evaluate(void) { int n = childs.size(); Index: CEL-Block.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Block.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Block.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Block.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 21,25 **** } ! std::string CelBlock::Evaluate(void) { int n = childs.size(); --- 21,25 ---- } ! std::string CelBlock::evaluate(void) { int n = childs.size(); Index: CEL-Loop.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Loop.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Loop.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Loop.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 21,25 **** } ! std::string CelLoop::Evaluate(void) { int n = childs.size(); --- 21,25 ---- } ! std::string CelLoop::evaluate(void) { int n = childs.size(); *************** *** 64,68 **** ! std::string CelLoopBreak::Evaluate(void) { return("0"); --- 64,68 ---- ! std::string CelLoopBreak::evaluate(void) { return("0"); Index: CEL-Function.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Function.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Function.h 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Function.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 28,36 **** protected: virtual std::string xmlEntityName(void); public: CelFunctionDef(); - virtual std::string Evaluate(void); - virtual ~CelFunctionDef(); }; --- 28,36 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelFunctionDef(); virtual ~CelFunctionDef(); }; *************** *** 39,60 **** protected: virtual std::string xmlEntityName(void); public: CelFunctionCall(); - virtual std::string Evaluate(void); - virtual ~CelFunctionCall(); }; class CelFunctionReturn : public CelFunction { protected: virtual std::string xmlEntityName(void); public: CelFunctionReturn(); - virtual std::string Evaluate(void); - virtual ~CelFunctionReturn(); }; } --- 39,61 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); public: CelFunctionCall(); virtual ~CelFunctionCall(); }; + /* class CelFunctionReturn : public CelFunction { protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelFunctionReturn(); virtual ~CelFunctionReturn(); }; + */ } Index: CEL-Loop.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Loop.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Loop.h 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Loop.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 17,25 **** protected: virtual std::string xmlEntityName(void); public: CelLoop(); - virtual std::string Evaluate(void); - virtual ~CelLoop(); }; --- 17,25 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelLoop(); virtual ~CelLoop(); }; *************** *** 30,38 **** protected: virtual std::string xmlEntityName(void); public: CelLoopBreak(); - virtual std::string Evaluate(void); - virtual ~CelLoopBreak(); }; --- 30,38 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelLoopBreak(); virtual ~CelLoopBreak(); }; Index: CEL-Include.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Include.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Include.cpp 6 Mar 2007 19:30:01 -0000 1.1 --- CEL-Include.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 22,26 **** } ! std::string CelInclude::Evaluate(void) { int n = childs.size(); --- 22,26 ---- } ! std::string CelInclude::evaluate(void) { int n = childs.size(); Index: CEL-Include.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Include.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Include.h 6 Mar 2007 19:30:01 -0000 1.1 --- CEL-Include.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 17,25 **** protected: virtual std::string xmlEntityName(void); public: CelInclude(); - virtual std::string Evaluate(void); - virtual ~CelInclude(); }; --- 17,25 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelInclude(); virtual ~CelInclude(); }; Index: CEL-Reader.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Reader.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Reader.cpp 6 Mar 2007 19:32:33 -0000 1.2 --- CEL-Reader.cpp 11 Mar 2007 18:47:49 -0000 1.3 *************** *** 140,146 **** current=new CBM::CelFunctionCall(); } ! if (N->Name()=="cel-function-return") { current=new CBM::CelFunctionReturn(); ! } if (N->Name()=="cel-stack-push") { --- 140,148 ---- current=new CBM::CelFunctionCall(); } ! /* ! if (N->Name()=="cel-function-return") { current=new CBM::CelFunctionReturn(); ! } ! */ if (N->Name()=="cel-stack-push") { Index: CEL-Function.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Function.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Function.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Function.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 58,62 **** } ! std::string CelFunctionDef::Evaluate(void) { int n = childs.size(); --- 58,62 ---- } ! std::string CelFunctionDef::evaluate(void) { int n = childs.size(); *************** *** 99,103 **** } ! std::string CelFunctionCall::Evaluate(void) { int n = childs.size(); --- 99,103 ---- } ! std::string CelFunctionCall::evaluate(void) { int n = childs.size(); *************** *** 113,116 **** --- 113,117 ---- N=childs[0]; cf=celFunctionGet(N->Evaluate()); + if (cf) { n=cf->function->Childs().size(); *************** *** 131,134 **** --- 132,137 ---- } + /* + CelFunctionReturn::CelFunctionReturn() { *************** *** 141,150 **** ! std::string CelFunctionReturn::Evaluate(void) { int n = childs.size(); CelAtom *N; ! std::string r = "0"; if (n!=1) --- 144,153 ---- ! std::string CelFunctionReturn::evaluate(void) { int n = childs.size(); CelAtom *N; ! std::string r; if (n!=1) *************** *** 152,156 **** N=childs[0]; ! return(N->Evaluate()); } --- 155,162 ---- N=childs[0]; ! r=N->Evaluate(); ! varOwner()->varDone(); ! varOwner()->arrayDone(); ! return(r); } *************** *** 158,159 **** --- 164,166 ---- { } + */ Index: CEL-Stack.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Stack.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Stack.h 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Stack.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 27,35 **** protected: virtual std::string xmlEntityName(void); public: CelStackPush(); - virtual std::string Evaluate(void); - virtual ~CelStackPush(); }; --- 27,35 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelStackPush(); virtual ~CelStackPush(); }; *************** *** 38,46 **** protected: virtual std::string xmlEntityName(void); public: CelStackPop(); - virtual std::string Evaluate(void); - virtual ~CelStackPop(); }; --- 38,46 ---- protected: virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelStackPop(); virtual ~CelStackPop(); }; Index: CEL-Str.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Str.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Str.cpp 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Str.cpp 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 27,31 **** ! std::string CelStr::Evaluate(void) { return(string); --- 27,31 ---- ! std::string CelStr::evaluate(void) { return(string); *************** *** 49,53 **** } ! std::string CelStrConcat::Evaluate(void) { std::string r = ""; --- 49,53 ---- } ! std::string CelStrConcat::evaluate(void) { std::string r = ""; Index: CEL-Str.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Str.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Str.h 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Str.h 11 Mar 2007 18:47:49 -0000 1.2 *************** *** 21,29 **** virtual std::string xmlValue(void); public: CelStr(std::string _string); - virtual std::string Evaluate(void); - virtual ~CelStr(); }; --- 21,29 ---- virtual std::string xmlValue(void); + virtual std::string evaluate(void); + public: CelStr(std::string _string); virtual ~CelStr(); }; *************** *** 33,41 **** virtual std::string xmlEntityName(void); public: CelStrConcat(); - virtual std::string Evaluate(void); - virtual ~CelStrConcat(); }; --- 33,41 ---- virtual std::string xmlEntityName(void); + virtual std::string evaluate(void); + public: CelStrConcat(); virtual ~CelStrConcat(); }; |
From: Frederic T. <xf...@us...> - 2007-03-11 18:46:37
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/reference In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20855 Added Files: cel-array.xml cel-block.xml cel-cmp.xml cel-cond.xml cel-function.xml cel-include.xml cel-logic.xml cel-loop.xml cel-math.xml cel-stack.xml cel-str.xml cel-var.xml cel-version.xml Log Message: First import. --- NEW FILE: cel-str.xml --- <?xml version="1.0" ?> <cel> <cel-str>test</cel-str> </cel> --- NEW FILE: cel-logic.xml --- <?xml version="1.0" ?> <cel> <cel-logic-or> <cel-logic-true/> <cel-logic-false/> </cel-logic-or> <cel-logic-and> <cel-logic-true/> <cel-logic-true/> </cel-logic-and> <cel-logic-not> <cel-logic-true/> </cel-logic-not> </cel> --- NEW FILE: cel-array.xml --- <?xml version="1.0" ?> <cel> <cel-array-def> <cel-str>x</cel-str> </cel-array-def> <cel-array-add> <cel-str>x</cel-str> <cel-str>0</cel-str> </cel-array-add> <cel-array-get> <cel-str>x</cel-str> <cel-str>0</cel-str> </cel-array-get> <cel-array-size> <cel-str>x</cel-str> </cel-array-size> <cel-array-undef> <cel-str>x</cel-str> </cel-array-undef> </cel> --- NEW FILE: cel-math.xml --- <?xml version="1.0" ?> <cel> <cel-math-inc> <cel-str>0</cel-str> </cel-math-inc> <cel-math-dec> <cel-str>10</cel-str> </cel-math-dec> </cel> --- NEW FILE: cel-stack.xml --- <?xml version="1.0" ?> <cel> <cel-stack-push> <cel-str>1</cel-str> </cel-stack-push> <cel-stack-pop/> </cel> --- NEW FILE: cel-function.xml --- <?xml version="1.0" ?> <cel> <cel-function-def> <cel-str>test</cel-str> </cel-function-def> <cel-function-call> <cel-str>test</cel-str> </cel-function-call> </cel> --- NEW FILE: cel-include.xml --- <?xml version="1.0" ?> <cel> <cel-include> <cel-str>what.xml</cel-str> </cel-include> </cel> --- NEW FILE: cel-var.xml --- <?xml version="1.0" ?> <cel> <cel-var-set> <cel-str>x</cel-str> <cel-str>0</cel-str> </cel-var-set> <cel-var-get> <cel-str>x</cel-str> </cel-var-get> <cel-var-undef> <cel-str>x</cel-str> </cel-var-undef> </cel> --- NEW FILE: cel-block.xml --- <?xml version="1.0" ?> <cel> <cel-block> <cel-array-def> <cel-str>x</cel-str> </cel-array-def> </cel-block> </cel> --- NEW FILE: cel-loop.xml --- <?xml version="1.0" ?> <cel> <cel-loop> <cel-logic-not> <cel-logic-true/> </cel-logic-not> <cel-math-inc/> <cel-loop-break/> </cel-loop> </cel> --- NEW FILE: cel-version.xml --- <?xml version="1.0" ?> <cel> <cel-version>0.1.0</cel-version> <cel-version>1.0</cel-version> <cel-version>4.1.0.2</cel-version> </cel> --- NEW FILE: cel-cond.xml --- <?xml version="1.0" ?> <cel> <cel-cond-if> <cel-str>0</cel-str> <cel-str>0</cel-str> </cel-cond-if> <cel-cond-if> <cel-str>1</cel-str> <cel-str>0</cel-str> <cel-str>1</cel-str> </cel-cond-if> </cel> --- NEW FILE: cel-cmp.xml --- <?xml version="1.0" ?> <cel> <cel-cmp-eq> <cel-str>0</cel-str> <cel-str>0</cel-str> </cel-cmp-eq> <cel-cmp-ae> <cel-str>1</cel-str> <cel-str>0</cel-str> </cel-cmp-ae> </cel> |
From: Frederic T. <xf...@us...> - 2007-03-11 18:46:17
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20668 Modified Files: 05-CEL.pl Log Message: <cel-function-return/> obsoleted. <cel-cmp-ae/> fixed. Index: 05-CEL.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/05-CEL.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 05-CEL.pl 8 Mar 2007 17:15:10 -0000 1.4 --- 05-CEL.pl 11 Mar 2007 18:46:06 -0000 1.5 *************** *** 8,12 **** require "libtest.pl"; ! use Test::Simple tests => 138; our $top_srcdir; --- 8,12 ---- require "libtest.pl"; ! use Test::Simple tests => 137; our $top_srcdir; *************** *** 190,194 **** $eq2->add($V1); ! ok($eq2->Evaluate() eq "1", "ae on ($v0, $v1) returns T"); my $eq3 = new CBM::CelCmpAE(); --- 190,194 ---- $eq2->add($V1); ! ok($eq2->Evaluate() eq "0", "ae on ($v0, $v1) returns F"); my $eq3 = new CBM::CelCmpAE(); *************** *** 198,202 **** $eq3->add($V1); ! ok($eq3->Evaluate() eq "0", "ae on ($v1, $v0) returns F"); } } --- 198,202 ---- $eq3->add($V1); ! ok($eq3->Evaluate() eq "1", "ae on ($v1, $v0) returns T"); } } *************** *** 509,539 **** } ! sub test_function_return { ! my $e; ! my $fd = new CBM::CelFunctionDef(); ! my $fn = new CBM::CelStr("func2"); ! $fd->add($fn); ! my $r0 = new CBM::CelFunctionReturn(); ! my $v0 = new CBM::CelStr("v0"); ! $r0->add($v0); ! my $r1 = new CBM::CelFunctionReturn(); ! my $v1 = new CBM::CelStr("v1"); ! $r1->add($v1); ! $fd->add($r0); ! $fd->add($r1); ! $fd->Evaluate(); ! my $fc = new CBM::CelFunctionCall(); ! my $cn = new CBM::CelStr("func2"); ! $fc->add($cn); ! $e = $fc->Evaluate(); ! ok($e eq "v0", "func2() returns v0 (has $e)"); ! } sub test_loop_break { --- 509,539 ---- } ! #sub test_function_return { ! # my $e; ! # my $fd = new CBM::CelFunctionDef(); ! # my $fn = new CBM::CelStr("func2"); ! # $fd->add($fn); ! # my $r0 = new CBM::CelFunctionReturn(); ! # my $v0 = new CBM::CelStr("v0"); ! # $r0->add($v0); ! # my $r1 = new CBM::CelFunctionReturn(); ! # my $v1 = new CBM::CelStr("v1"); ! # $r1->add($v1); ! # $fd->add($r0); ! # $fd->add($r1); ! # $fd->Evaluate(); ! # my $fc = new CBM::CelFunctionCall(); ! # my $cn = new CBM::CelStr("func2"); ! # $fc->add($cn); ! # $e = $fc->Evaluate(); ! # ok($e eq "v0", "func2() returns v0 (has $e)"); ! #} sub test_loop_break { *************** *** 674,678 **** test_block(); test_function(); ! test_function_return(); test_loop_break(); test_loop(); --- 674,678 ---- test_block(); test_function(); ! # test_function_return(); test_loop_break(); test_loop(); |
From: Frederic T. <xf...@us...> - 2007-03-08 17:15:14
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27392 Modified Files: 05-CEL.pl Log Message: Array are (implicitly) localy defined in blocks, function, and containers. Index: 05-CEL.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/05-CEL.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 05-CEL.pl 7 Mar 2007 18:01:28 -0000 1.3 --- 05-CEL.pl 8 Mar 2007 17:15:10 -0000 1.4 *************** *** 279,291 **** ok($cg0->Evaluate() eq "0", "Undefined"); - } sub test_array_add { my $array = shift; my $str = shift; my $A = new CBM::CelArrayAdd(); my $al = new CBM::CelStr($array); my $ai = new CBM::CelStr($str); --- 279,292 ---- ok($cg0->Evaluate() eq "0", "Undefined"); } sub test_array_add { + my $BL = shift; my $array = shift; my $str = shift; my $A = new CBM::CelArrayAdd(); + $BL->add($A); my $al = new CBM::CelStr($array); my $ai = new CBM::CelStr($str); *************** *** 297,301 **** --- 298,305 ---- sub test_array { + + my $BL = new CBM::CelBlock(); my $A = new CBM::CelArrayDef(); + $BL->add($A); my $an = new CBM::CelStr("a"); *************** *** 306,317 **** my $AS = new CBM::CelArraySize(); my $ans = new CBM::CelStr("a"); $AS->add($an); ok($AS->Evaluate() eq "0", "array a is empty"); ! test_array_add("a", "y"); ok($AS->Evaluate() eq "1", "array a has one element"); my $AG = new CBM::CelArrayGet(); my $ags = new CBM::CelStr("a"); my $agi = new CBM::CelStr("0"); --- 310,323 ---- my $AS = new CBM::CelArraySize(); my $ans = new CBM::CelStr("a"); + $BL->add($AS); $AS->add($an); ok($AS->Evaluate() eq "0", "array a is empty"); ! test_array_add($BL, "a", "y"); ok($AS->Evaluate() eq "1", "array a has one element"); my $AG = new CBM::CelArrayGet(); + $BL->add($AG); my $ags = new CBM::CelStr("a"); my $agi = new CBM::CelStr("0"); *************** *** 323,327 **** ! test_array_add("a", "z"); ok($AS->Evaluate() eq "2", "array a has two element"); --- 329,333 ---- ! test_array_add($BL, "a", "z"); ok($AS->Evaluate() eq "2", "array a has two element"); *************** *** 333,336 **** --- 339,344 ---- my $ags2 = new CBM::CelStr("a"); my $agi2 = new CBM::CelStr("1"); + + $BL->add($AG2); $AG2->add($ags2); $AG2->add($agi2); |
From: Frederic T. <xf...@us...> - 2007-03-08 17:09:21
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv25061 Modified Files: CEL-Array.cpp CEL-Array.h CEL-Atom.cpp CEL-Atom.h Log Message: Array are (implicitly) localy defined in blocks, function, and containers. Index: CEL-Array.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Array.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Array.cpp 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Array.cpp 8 Mar 2007 17:09:17 -0000 1.2 *************** *** 8,72 **** #include <CEL/CEL-Array.h> - #include <stdlib.h> using namespace CBM; - typedef struct { - std::string name; - std::vector<std::string> value; - } celArray_t; - - std::vector<celArray_t*> celArrays; - - void CBM::CELArrayDone(void) - { - int i; - int n = celArrays.size(); - std::vector<celArray_t*> ncelArrays; - celArray_t *A; - - for(i=0; i<n; i++) { - A=celArrays[i]; - delete(A); - } - celArrays=ncelArrays; - - } - - celArray_t *celArrayGet(std::string _name) - { - int i; - int n = celArrays.size(); - celArray_t *A; - - for(i=0; i<n; i++) { - A=celArrays[i]; - if (A->name==_name) - return(A); - } - return(0); - } - - std::string celArrayRemove(std::string _name) - { - celArray_t *ca = celArrayGet(_name); - celArray_t *A; - std::vector<celArray_t*> ncelArrays; - int i; - int n = celArrays.size(); - - if (!ca) - return("0"); - - for(i=0; i<n; i++) { - A=celArrays[i]; - if (A!=ca) - ncelArrays.push_back(A); - } - celArrays=ncelArrays; - delete(ca); - return("1"); - } - CelArray::CelArray() : CelAtom() --- 8,14 ---- *************** *** 94,98 **** CelAtom *N; std::string name; - celArray_t *ca; if (n!=1) --- 36,39 ---- *************** *** 103,113 **** name=N->Evaluate(); ! ca=celArrayGet(name); ! if (!ca) { ! ca=new celArray_t; ! celArrays.push_back(ca); ! } ! ca->name=name; ! return("1"); } --- 44,48 ---- name=N->Evaluate(); ! varOwner()->ArrayDef(name); return("1"); } *************** *** 136,140 **** std::string name; std::string value; - celArray_t *ca; if (n!=2) --- 71,74 ---- *************** *** 147,157 **** value=V->Evaluate(); ! ca=celArrayGet(name); ! if (!ca) { ! ca=new celArray_t; ! celArrays.push_back(ca); ! } ! ca->name=name; ! ca->value.push_back(value); return("1"); } --- 81,86 ---- value=V->Evaluate(); ! varOwner()->ArrayAdd(name, value); ! return("1"); } *************** *** 161,166 **** } - - CelArraySize::CelArraySize() : CelArray() --- 90,93 ---- *************** *** 176,183 **** { int n = childs.size(); - std::string r; CelAtom *N; - char tmp[32]; - celArray_t *ca; std::string name; --- 103,107 ---- *************** *** 189,199 **** name=N->Evaluate(); ! ca=celArrayGet(name); ! if (!ca) { ! return("0"); ! } ! sprintf(tmp, "%d", ca->value.size()); ! r=tmp; ! return(r); } --- 113,117 ---- name=N->Evaluate(); ! return(varOwner()->ArraySize(name)); } *************** *** 219,225 **** CelAtom *I; std::string is; - int i; - - celArray_t *ca; if (n!=2) --- 137,140 ---- *************** *** 229,242 **** I=childs[1]; is=I->Evaluate(); - i=atoi(is.c_str()); ! ca=celArrayGet(N->Evaluate()); ! if (ca) { ! if ((i>=0) && ((unsigned) i<ca->value.size())) ! return(ca->value[i]); ! else ! return("0"); ! } else ! return("0"); } --- 144,150 ---- I=childs[1]; is=I->Evaluate(); ! return(varOwner()->ArrayGet(N->Evaluate(), ! is)); } *************** *** 266,270 **** N=childs[0]; ! return(celArrayRemove(N->Evaluate())); } --- 174,178 ---- N=childs[0]; ! return(varOwner()->ArrayUndef(N->Evaluate())); } Index: CEL-Atom.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Atom.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CEL-Atom.h 7 Mar 2007 18:00:21 -0000 1.3 --- CEL-Atom.h 8 Mar 2007 17:09:18 -0000 1.4 *************** *** 18,21 **** --- 18,27 ---- std::string value; } celVar_t; + + + typedef struct { + std::string name; + std::vector<std::string> value; + } celArray_t; /** \brief ? */ *************** *** 23,28 **** private: std::vector<celVar_t*> celVars; ! void varDone(void); protected: --- 29,36 ---- private: std::vector<celVar_t*> celVars; + std::vector<celArray_t*> celArrays; ! virtual void varDone(void); ! virtual void arrayDone(void); protected: *************** *** 44,49 **** --- 52,66 ---- virtual void VarSet(std::string _name, std::string _value); + virtual celArray_t *ArrayDef(std::string _name); + virtual void ArrayAdd(std::string _name, std::string _value); + virtual celVar_t *VarGet(std::string _name); + virtual celArray_t *ArrayGet(std::string _name); + virtual std::string ArrayGet(std::string _name, + std::string _index); + virtual std::string ArraySize(std::string _name); + virtual std::string VarUndef(std::string _name); + virtual std::string ArrayUndef(std::string _name); virtual void add(CelAtom *_atom); Index: CEL-Array.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Array.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Array.h 5 Mar 2007 20:32:39 -0000 1.1 --- CEL-Array.h 8 Mar 2007 17:09:17 -0000 1.2 *************** *** 13,18 **** namespace CBM { - void CELArrayDone(void); - /** \brief ? */ --- 13,16 ---- Index: CEL-Atom.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Atom.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CEL-Atom.cpp 7 Mar 2007 18:00:21 -0000 1.3 --- CEL-Atom.cpp 8 Mar 2007 17:09:18 -0000 1.4 *************** *** 8,11 **** --- 8,13 ---- #include <CEL/CEL-Atom.h> + #include <stdlib.h> + using namespace CBM; *************** *** 29,32 **** --- 31,49 ---- } + void CelAtom::arrayDone(void) + { + int i; + int n = celArrays.size(); + std::vector<celArray_t*> ncelArrays; + celArray_t *A; + + for(i=0; i<n; i++) { + A=celArrays[i]; + delete(A); + } + celArrays=ncelArrays; + } + + void CelAtom::indent(std::string& str, int _indent) *************** *** 89,92 **** --- 106,134 ---- } + celArray_t *CelAtom::ArrayDef(std::string _name) + { + celArray_t *ca; + + ca=ArrayGet(_name); + if (!ca) { + ca=new celArray_t; + celArrays.push_back(ca); + } + ca->name=_name; + + return(ca); + } + + void CelAtom::ArrayAdd(std::string _name, std::string _value) + { + celArray_t *ca; + + ca=ArrayGet(_name); + if (!ca) + ca=ArrayDef(_name); + + ca->value.push_back(_value); + } + celVar_t *CelAtom::VarGet(std::string _name) { *************** *** 103,106 **** --- 145,197 ---- } + celArray_t *CelAtom::ArrayGet(std::string _name) + { + int i; + int n = celArrays.size(); + celArray_t *A; + + for(i=0; i<n; i++) { + A=celArrays[i]; + if (A->name==_name) + return(A); + } + return(0); + } + + std::string CelAtom::ArrayGet(std::string _name, + std::string _index) + { + int i; + celArray_t *ca; + + i=atoi(_index.c_str()); + + ca=ArrayGet(_name); + if (ca) { + if ((i>=0) && ((unsigned) i<ca->value.size())) + return(ca->value[i]); + else + return("0"); + } else + return("0"); + } + + std::string CelAtom::ArraySize(std::string _name) + { + celArray_t *ca; + char tmp[32]; + std::string r; + + ca=ArrayGet(_name); + + if (!ca) + return("0"); + + sprintf(tmp, "%d", ca->value.size()); + r=tmp; + + return(r); + } + std::string CelAtom::VarUndef(std::string _name) { *************** *** 124,127 **** --- 215,239 ---- } + std::string CelAtom::ArrayUndef(std::string _name) + { + celArray_t *ca = ArrayGet(_name); + celArray_t *A; + std::vector<celArray_t*> ncelArrays; + int i; + int n = celArrays.size(); + + if (!ca) + return("0"); + + for(i=0; i<n; i++) { + A=celArrays[i]; + if (A!=ca) + ncelArrays.push_back(A); + } + celArrays=ncelArrays; + delete(ca); + return("1"); + } + void CelAtom::add(CBM::CelAtom *_atom) { *************** *** 185,188 **** --- 297,301 ---- { varDone(); + arrayDone(); } |
From: Frederic T. <xf...@us...> - 2007-03-08 17:08:26
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24637 Modified Files: System.cpp Log Message: CELArrayDone() obsoleted. Index: System.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** System.cpp 7 Mar 2007 18:02:13 -0000 1.8 --- System.cpp 8 Mar 2007 17:08:13 -0000 1.9 *************** *** 11,15 **** #include <Base/Config.h> #include <Base/md5.h> - #include <CEL/CEL-Array.h> #include <CEL/CEL-Function.h> #include <Benchmark/Benchmark-DLLoader.h> --- 11,14 ---- *************** *** 587,591 **** } - CELArrayDone(); CELFunctionDone(); --- 586,589 ---- |
From: Frederic T. <xf...@us...> - 2007-03-07 18:02:24
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27792 Modified Files: System.cpp Log Message: CELVarDone() obsoleted. Index: System.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** System.cpp 15 Feb 2007 19:02:55 -0000 1.7 --- System.cpp 7 Mar 2007 18:02:13 -0000 1.8 *************** *** 11,14 **** --- 11,16 ---- #include <Base/Config.h> #include <Base/md5.h> + #include <CEL/CEL-Array.h> + #include <CEL/CEL-Function.h> #include <Benchmark/Benchmark-DLLoader.h> *************** *** 585,588 **** --- 587,593 ---- } + CELArrayDone(); + CELFunctionDone(); + return(1); } |
From: Frederic T. <xf...@us...> - 2007-03-07 18:01:36
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27341 Modified Files: 05-CEL.pl Log Message: Variables are (implicitly) localy defined in blocks, function, and containers. Index: 05-CEL.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/05-CEL.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 05-CEL.pl 6 Mar 2007 20:23:53 -0000 1.2 --- 05-CEL.pl 7 Mar 2007 18:01:28 -0000 1.3 *************** *** 233,236 **** --- 233,238 ---- sub test_var { + my $BL = new CBM::CelBlock(); + my $i0 = new CBM::CelStr("x"); my $i1 = new CBM::CelStr("y"); *************** *** 239,242 **** --- 241,245 ---- my $cs0 = new CBM::CelVarSet(); + $BL->add($cs0); $cs0->add($i0); $cs0->add($v0); *************** *** 244,251 **** --- 247,256 ---- my $cg0 = new CBM::CelVarGet(); + $BL->add($cg0); $cg0->add($i0); ok($cg0->Evaluate() eq "100", "Set/Get (x=100)"); my $cs1 = new CBM::CelVarSet(); + $BL->add($cs1); $cs1->add($i1); $cs1->add($v0); *************** *** 253,260 **** --- 258,267 ---- my $cg1 = new CBM::CelVarGet(); + $BL->add($cg1); $cg1->add($i1); ok($cg1->Evaluate() eq "100", "Set/Get (y=100)"); my $cs2 = new CBM::CelVarSet(); + $BL->add($cs2); $cs2->add($i1); $cs2->add($v1); *************** *** 262,269 **** --- 269,278 ---- my $cg2 = new CBM::CelVarGet(); + $BL->add($cg2); $cg2->add($i1); ok($cg2->Evaluate() eq "201", "Set/Get (y=201) - has " . $cg2->Evaluate()); my $u = new CBM::CelVarUndef(); + $BL->add($u); $u->add($i0); $u->Evaluate(); |
From: Frederic T. <xf...@us...> - 2007-03-07 18:00:31
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27293 Modified Files: CEL-Atom.cpp CEL-Atom.h CEL-Var.cpp CEL-Var.h Log Message: Variables are (implicitly) localy defined in blocks, function, and containers. Index: CEL-Atom.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Atom.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Atom.h 6 Mar 2007 19:32:00 -0000 1.2 --- CEL-Atom.h 7 Mar 2007 18:00:21 -0000 1.3 *************** *** 13,20 **** --- 13,31 ---- namespace CBM { + + typedef struct { + std::string name; + std::string value; + } celVar_t; /** \brief ? */ class CelAtom { + private: + std::vector<celVar_t*> celVars; + + void varDone(void); + protected: + CelAtom *parent; std::vector<CelAtom *> childs; CelAtom(); *************** *** 25,32 **** --- 36,50 ---- virtual std::string xmlValue(void); virtual std::string xmlProperties(void); + virtual CelAtom *varOwner(void); public: virtual std::string xmlEntityName(void) = 0; virtual std::vector<CelAtom *>& Childs(void); + virtual void setParent(CelAtom *_parent); + + virtual void VarSet(std::string _name, std::string _value); + virtual celVar_t *VarGet(std::string _name); + virtual std::string VarUndef(std::string _name); + virtual void add(CelAtom *_atom); virtual std::string Evaluate(void) = 0; Index: CEL-Atom.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Atom.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CEL-Atom.cpp 6 Mar 2007 19:32:00 -0000 1.2 --- CEL-Atom.cpp 7 Mar 2007 18:00:21 -0000 1.3 *************** *** 12,15 **** --- 12,30 ---- CelAtom::CelAtom() { + parent=0; + } + + void CelAtom::varDone(void) + { + int i; + int n = celVars.size(); + std::vector<celVar_t*> ncelVars; + celVar_t *V; + + for(i=0; i<n; i++) { + V=celVars[i]; + delete(V); + } + celVars=ncelVars; } *************** *** 28,31 **** --- 43,63 ---- } + CelAtom *CelAtom::varOwner(void) + { + CelAtom *ptr = this; + std::string e; + while (ptr->parent) { + e=ptr->xmlEntityName(); + if ((e=="cel-function-def") || + (e=="cel-block") || + (e=="cel")) { + return(ptr); + } + ptr=ptr->parent; + } + + return(ptr); + } + std::string CelAtom::xmlValue(void) { *************** *** 38,44 **** --- 70,131 ---- } + void CelAtom::setParent(CelAtom *_parent) + { + parent=_parent; + } + + void CelAtom::VarSet(std::string _name, + std::string _value) + { + celVar_t *cv; + + cv=VarGet(_name); + if (!cv) { + cv=new celVar_t; + celVars.push_back(cv); + } + cv->name=_name; + cv->value=_value; + } + + celVar_t *CelAtom::VarGet(std::string _name) + { + int i; + int n = celVars.size(); + celVar_t *V; + + for(i=0; i<n; i++) { + V=celVars[i]; + if (V->name==_name) + return(V); + } + return(0); + } + + std::string CelAtom::VarUndef(std::string _name) + { + celVar_t *cv = VarGet(_name); + celVar_t *V; + std::vector<celVar_t*> ncelVars; + int i; + int n = celVars.size(); + + if (!cv) + return("0"); + + for(i=0; i<n; i++) { + V=celVars[i]; + if (V!=cv) + ncelVars.push_back(V); + } + celVars=ncelVars; + delete(cv); + return("1"); + } + void CelAtom::add(CBM::CelAtom *_atom) { childs.push_back(_atom); + _atom->setParent(this); } *************** *** 97,100 **** --- 184,188 ---- CelAtom::~CelAtom() { + varDone(); } Index: CEL-Var.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Var.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Var.cpp 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Var.cpp 7 Mar 2007 18:00:21 -0000 1.2 *************** *** 11,71 **** using namespace CBM; - typedef struct { - std::string name; - std::string value; - } celVar_t; - - std::vector<celVar_t*> celVars; - - void CBM::CELVarDone(void) - { - int i; - int n = celVars.size(); - std::vector<celVar_t*> ncelVars; - celVar_t *V; - - for(i=0; i<n; i++) { - V=celVars[i]; - delete(V); - } - celVars=ncelVars; - - } - - celVar_t *celVarGet(std::string _name) - { - int i; - int n = celVars.size(); - celVar_t *V; - - for(i=0; i<n; i++) { - V=celVars[i]; - if (V->name==_name) - return(V); - } - return(0); - } - - std::string celVarRemove(std::string _name) - { - celVar_t *cv = celVarGet(_name); - celVar_t *V; - std::vector<celVar_t*> ncelVars; - int i; - int n = celVars.size(); - - if (!cv) - return("0"); - - for(i=0; i<n; i++) { - V=celVars[i]; - if (V!=cv) - ncelVars.push_back(V); - } - celVars=ncelVars; - delete(cv); - return("1"); - } - CelVar::CelVar() : CelAtom() --- 11,14 ---- *************** *** 95,99 **** std::string name; std::string value; - celVar_t *cv; if (n!=2) --- 38,41 ---- *************** *** 106,117 **** value=V->Evaluate(); ! cv=celVarGet(name); ! if (!cv) { ! cv=new celVar_t; ! celVars.push_back(cv); ! } ! cv->name=name; ! cv->value=value; ! return("1"); } --- 48,53 ---- value=V->Evaluate(); ! varOwner()->VarSet(name, ! value); return("1"); } *************** *** 142,146 **** N=childs[0]; ! cv=celVarGet(N->Evaluate()); if (cv) return(cv->value); --- 78,82 ---- N=childs[0]; ! cv=varOwner()->VarGet(N->Evaluate()); if (cv) return(cv->value); *************** *** 172,176 **** N=childs[0]; ! return(celVarRemove(N->Evaluate())); } --- 108,112 ---- N=childs[0]; ! return(varOwner()->VarUndef(N->Evaluate())); } Index: CEL-Var.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Var.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Var.h 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Var.h 7 Mar 2007 18:00:21 -0000 1.2 *************** *** 13,18 **** namespace CBM { - void CELVarDone(void); - /** \brief ? */ --- 13,16 ---- |
From: Frederic T. <xf...@us...> - 2007-03-06 20:24:01
|
Update of /cvsroot/compbench/CompBenchmarks++/CBM-PI/t In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18442 Modified Files: 05-CEL.pl Log Message: Many more tests. Index: 05-CEL.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/CBM-PI/t/05-CEL.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05-CEL.pl 5 Mar 2007 20:34:08 -0000 1.1 --- 05-CEL.pl 6 Mar 2007 20:23:53 -0000 1.2 *************** *** 8,12 **** require "libtest.pl"; ! use Test::Simple tests => 84; our $top_srcdir; --- 8,12 ---- require "libtest.pl"; ! use Test::Simple tests => 138; our $top_srcdir; *************** *** 598,601 **** --- 598,647 ---- } + sub test_container { + my $cont = new CBM::CelContainer(); + my $i0 = new CBM::CelStr("x0"); + my $i1 = new CBM::CelStr("x1"); + + $cont->add($i0); + $cont->add($i1); + + ok($cont->Evaluate() eq "x1", "container holding x0 x1 returns x1"); + } + + sub test_include { + my $I = new CBM::CelInclude(); + my $f = new CBM::CelStr("$top_srcdir/reference/cel-str.xml"); + + $I->add($f); + ok($I->Evaluate() eq "test", "include(cel-str.xml) returns test"); + } + + sub test_xml { + my @tests = ('cel-str', 'cel-logic', + 'cel-version', 'cel-math', 'cel-cmp', 'cel-cond', + 'cel-var', 'cel-array', 'cel-block', 'cel-loop', + 'cel-function', 'cel-stack', 'cel-include'); + my $r; + my $f; + my $banner = "<?xml version=\"1.0\" ?>"; + + foreach $r (@tests) { + $f="$top_srcdir/reference/$r.xml"; + + ok(-f $f, "$f exists"); + my $R = new CBM::CelReader($f); + + my $CEL = $R->parse(); + ok(defined($CEL), "CEL object for $f is defined"); + + my $CELxml = $CEL->str(); + ok(defined($CELxml), "XML representation for $f is defined"); + + my $celxfile = "$banner\n\n$CELxml"; + my $expected = `cat $f`; + + ok($celxfile eq "$expected\n", "checking if BEG\n$celxfile\nEND matches expected : BEG\n$expected\nEND"); + } + } $sys = CBM::Init(); *************** *** 614,617 **** --- 660,666 ---- test_loop_break(); test_loop(); + test_container(); + test_include(); + test_xml(); $sys->done(); |
From: Frederic T. <xf...@us...> - 2007-03-06 19:33:16
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31592 Modified Files: Makefile.am Log Message: New source files added. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile.am 5 Mar 2007 20:32:40 -0000 1.1 --- Makefile.am 6 Mar 2007 19:33:08 -0000 1.2 *************** *** 16,19 **** --- 16,20 ---- CEL-Block.cpp CEL-Loop.cpp \ CEL-Function.cpp CEL-Stack.cpp \ + CEL-Include.cpp \ CEL-Reader.cpp |
From: Frederic T. <xf...@us...> - 2007-03-06 19:32:39
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv31227 Modified Files: CEL-Reader.cpp CEL-Reader.h Log Message: Updated to parse all CEL elements. Index: CEL-Reader.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Reader.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Reader.h 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Reader.h 6 Mar 2007 19:32:33 -0000 1.2 *************** *** 14,29 **** /** \brief Interface to CEL XML files ? */ ! class CELReader { protected: XMLNode *root; public: /** Constructor */ ! CELReader(std::string _filename); ! class CELAtom *parse(void); /** Destructor */ ! virtual ~CELReader(); }; } --- 14,30 ---- /** \brief Interface to CEL XML files ? */ ! class CelReader { protected: XMLNode *root; + virtual void parse(XMLNode *from, class CelAtom *into); public: /** Constructor */ ! CelReader(std::string _filename); ! virtual class CelAtom *parse(void); /** Destructor */ ! virtual ~CelReader(); }; } Index: CEL-Reader.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL/CEL-Reader.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CEL-Reader.cpp 5 Mar 2007 20:32:40 -0000 1.1 --- CEL-Reader.cpp 6 Mar 2007 19:32:33 -0000 1.2 *************** *** 9,17 **** #include <CEL/CEL-Atom.h> #include <Base/XMLReader.h> using namespace CBM; ! CELReader::CELReader(std::string _filename) { CBM::XMLReader r; --- 9,31 ---- #include <CEL/CEL-Atom.h> + #include <CEL/CEL-Str.h> + #include <CEL/CEL-Logic.h> + #include <CEL/CEL-Version.h> + #include <CEL/CEL-Math.h> + #include <CEL/CEL-Cmp.h> + #include <CEL/CEL-Cond.h> + #include <CEL/CEL-Var.h> + #include <CEL/CEL-Array.h> + #include <CEL/CEL-Block.h> + #include <CEL/CEL-Loop.h> + #include <CEL/CEL-Function.h> + #include <CEL/CEL-Stack.h> + #include <CEL/CEL-Include.h> + #include <Base/XMLReader.h> using namespace CBM; ! CelReader::CelReader(std::string _filename) { CBM::XMLReader r; *************** *** 20,42 **** } ! CELAtom *CELReader::parse(void) { CBM::XMLNode *N; int i; int n; ! if (!root) ! return(0); ! n=root->nodeNumber(); for(i=0;i<n;i++) { ! N=root->getNode(i); if (N->Name()=="cel-str") { } } } ! CELReader::~CELReader() { } --- 34,178 ---- } ! void CelReader::parse(CBM::XMLNode *from, CBM::CelAtom *into) { CBM::XMLNode *N; + CBM::CelAtom *current; + int i; int n; ! if (!from) ! return; ! n=from->nodeNumber(); for(i=0;i<n;i++) { ! current=0; ! ! N=from->getNode(i); ! if (N->Name()=="cel-str") { + current=new CBM::CelStr(N->Value()); + } + + if (N->Name()=="cel-logic-true") { + current=new CBM::CelLogicTrue(); + } + if (N->Name()=="cel-logic-false") { + current=new CBM::CelLogicFalse(); + } + if (N->Name()=="cel-logic-or") { + current=new CBM::CelLogicOr(); + } + if (N->Name()=="cel-logic-and") { + current=new CBM::CelLogicAnd(); + } + if (N->Name()=="cel-logic-not") { + current=new CBM::CelLogicNot(); + } + + if (N->Name()=="cel-version") { + current=new CBM::CelVersion(N->Value()); + } + + if (N->Name()=="cel-math-inc") { + current=new CBM::CelMathInc(); + } + if (N->Name()=="cel-math-dec") { + current=new CBM::CelMathDec(); + } + + if (N->Name()=="cel-cmp-eq") { + current=new CBM::CelCmpEq(); + } + if (N->Name()=="cel-cmp-ae") { + current=new CBM::CelCmpAE(); + } + + if (N->Name()=="cel-cond-if") { + current=new CBM::CelCondIf(); + } + + + if (N->Name()=="cel-var-set") { + current=new CBM::CelVarSet(); + } + if (N->Name()=="cel-var-get") { + current=new CBM::CelVarGet(); + } + if (N->Name()=="cel-var-undef") { + current=new CBM::CelVarUndef(); + } + + if (N->Name()=="cel-array-def") { + current=new CBM::CelArrayDef(); + } + if (N->Name()=="cel-array-add") { + current=new CBM::CelArrayAdd(); + } + if (N->Name()=="cel-array-get") { + current=new CBM::CelArrayGet(); + } + if (N->Name()=="cel-array-size") { + current=new CBM::CelArraySize(); + } + if (N->Name()=="cel-array-undef") { + current=new CBM::CelArrayUndef(); + } + + + if (N->Name()=="cel-block") { + current=new CBM::CelBlock(); + } + + if (N->Name()=="cel-loop") { + current=new CBM::CelLoop(); + } + + if (N->Name()=="cel-loop-break") { + current=new CBM::CelLoopBreak(); + } + + if (N->Name()=="cel-function-def") { + current=new CBM::CelFunctionDef(); + } + if (N->Name()=="cel-function-call") { + current=new CBM::CelFunctionCall(); + } + if (N->Name()=="cel-function-return") { + current=new CBM::CelFunctionReturn(); + } + + if (N->Name()=="cel-stack-push") { + current=new CBM::CelStackPush(); + } + if (N->Name()=="cel-stack-pop") { + current=new CBM::CelStackPop(); + } + + if (N->Name()=="cel-include") { + current=new CBM::CelInclude(); + } + + if (current) { + into->add(current); + parse(N, current); } } } ! CelAtom *CelReader::parse(void) ! { ! CBM::CelContainer *C; ! ! if (!root) ! return(0); ! ! C=new CBM::CelContainer(); ! parse(root, C); ! return(C); ! } ! ! CelReader::~CelReader() { } |