"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/rperloperations.h" between
RPerl-5.000000.tar.gz and RPerl-5.002000.tar.gz

About: RPerl is an optimizing compiler for the Perl 5 programming language (converting Perl 5 source code into C++).

rperloperations.h  (RPerl-5.000000):rperloperations.h  (RPerl-5.002000)
#ifndef __CPP__INCLUDED__rperloperations_h #ifndef __CPP__INCLUDED__rperloperations_h
#define __CPP__INCLUDED__rperloperations_h 0.005_000 #define __CPP__INCLUDED__rperloperations_h 0.005_000
#include <rperltypes_mode.h> #include <rperltypes_mode.h>
#include <RPerl/HelperFunctions.cpp> // -> HelperFunctions.h #include <RPerl/HelperFunctions.cpp> // -> HelperFunctions.h
#include <RPerl/Operation/Expression/Operator/Named/Keys.cpp> // -> Keys.h
# ifdef __PERL__TYPES # ifdef __PERL__TYPES
// NEED ADD CODE // NEED ADD CODE
# elif defined __CPP__TYPES # elif defined __CPP__TYPES
// [[[ EXPRESSIONS ]]] // [[[ EXPRESSIONS ]]]
// DEV NOTE, CORRELATION #rp020: upon adding new named op file lib/RPerl/Operati on/Expression/Operator/Named*/* also add in Named*.pm and rperloperations.* // DEV NOTE, CORRELATION #rp020: upon adding new named op file lib/RPerl/Operati on/Expression/Operator/Named*/* also add in Named*.pm and rperloperations.*
skipping to change at line 30 skipping to change at line 31
#define log std::log #define log std::log
#define sqrt std::sqrt #define sqrt std::sqrt
#define atan2 std::atan2 #define atan2 std::atan2
// DEV NOTE, CORRELATION #rp070: "logical and" && operator behaves differently i n Perl vs C++, accepts strings so must use double-negation trick to convert to b oolean, returns operand on right if operator evaluates to true; use ANDl instead of && in C++ // DEV NOTE, CORRELATION #rp070: "logical and" && operator behaves differently i n Perl vs C++, accepts strings so must use double-negation trick to convert to b oolean, returns operand on right if operator evaluates to true; use ANDl instead of && in C++
#define ANDl(x,y) (!!x) ? ((!!y) ? y : 0): 0 #define ANDl(x,y) (!!x) ? ((!!y) ? y : 0): 0
// DEV NOTE, CORRELATION #rp071: "logical or" || operator behaves differently in Perl vs C++, accepts strings so must use double-negation trick to convert to bo olean, returns operand on left if operator evaluates to true; use ORl instead of || in C++ // DEV NOTE, CORRELATION #rp071: "logical or" || operator behaves differently in Perl vs C++, accepts strings so must use double-negation trick to convert to bo olean, returns operand on left if operator evaluates to true; use ORl instead of || in C++
#define ORl(x,y) (!!x) ? x : ((!!y) ? y : 0) #define ORl(x,y) (!!x) ? x : ((!!y) ? y : 0)
// array operations
#define scalar(array) array.size()
// hash operations
#define exists(hash,key) ((bool) hash.count(key))
//#define exists_ref(hashref,key) hashref.NEED_DEREF_BEFORE.count(key)
// [[[ STATEMENTS ]]] // [[[ STATEMENTS ]]]
#define print cout << // DEV NOTE, CORRELATION #rp100: C++ cout w/ double-less- than << input list separators is equivalent to Perl print w/ comma separators #define print cout << // DEV NOTE, CORRELATION #rp100: C++ cout w/ double-less- than << input list separators is equivalent to Perl print w/ comma separators
#define prerr cerr << // DEV NOTE, CORRELATION #rp101: C++ cerr w/ double-less- than << input list separators is equivalent to Perl print {*STDERR} w/ comma sep arators #define prerr cerr << // DEV NOTE, CORRELATION #rp101: C++ cerr w/ double-less- than << input list separators is equivalent to Perl print {*STDERR} w/ comma sep arators
// BEGIN die OPERATOR // BEGIN die OPERATOR
// DEV NOTE: prefer #rp102a solution because the generated C++ looks closer to t he original Perl input; commas instead of double-less-thans, no inline exit() // DEV NOTE: prefer #rp102a solution because the generated C++ looks closer to t he original Perl input; commas instead of double-less-thans, no inline exit()
// DEV NOTE, CORRELATION #rp102: renamed from Perl die to C++ Die to avoid error redefining Perl's embed.h die // DEV NOTE, CORRELATION #rp102: renamed from Perl die to C++ Die to avoid error redefining Perl's embed.h die
// DEV NOTE, CORRELATION #rp102a: C++ cerr w/ recursive variadic template and ex it() is equivalent to Perl die, DISABLED // DEV NOTE, CORRELATION #rp102a: C++ cerr w/ recursive variadic template and ex it() is equivalent to Perl die, DISABLED
void Die(){}; void Die(){};
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)