Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 11341
Merged at revision: 11640
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 158 lines (+18/-44)
7 files modified
bin/debugger/command_arg.h (+1/-0)
src/runtime/numerics/numerics_impl.cpp (+2/-2)
src/util/csv_parser.cpp (+5/-8)
src/util/hash/hashtable.h (+2/-3)
src/zorbatypes/float.cpp (+0/-20)
src/zorbatypes/float.h (+6/-9)
src/zorbautils/hashset_atomic_itemh.h (+2/-2)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+187605@code.launchpad.net

Commit message

Miscellaneous tweaks/fixes.

Description of the change

Miscellaneous tweaks/fixes.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting criteria failed for the following merge proposals:

https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605 :
Votes: {'Approve': 1}

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu/job/CommitZorba/202/console to view the results.

lp:~paul-lucas/zorba/pjl-misc updated
11342. By Paul J. Lucas

Fixed comment.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/187605

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/debugger/command_arg.h'
--- bin/debugger/command_arg.h 2013-02-07 17:24:36 +0000
+++ bin/debugger/command_arg.h 2013-09-25 21:52:49 +0000
@@ -33,6 +33,7 @@
33template<typename Tuple>33template<typename Tuple>
34class CommandArgInstance {34class CommandArgInstance {
35 public:35 public:
36 virtual ~CommandArgInstance() { }
36 virtual int get_index() const = 0;37 virtual int get_index() const = 0;
37 virtual const CommandArg<Tuple>* get_arg() const = 0;38 virtual const CommandArg<Tuple>* get_arg() const = 0;
38 virtual void insertValue(Tuple& t) = 0;39 virtual void insertValue(Tuple& t) = 0;
3940
=== modified file 'src/runtime/numerics/numerics_impl.cpp'
--- src/runtime/numerics/numerics_impl.cpp 2013-06-11 05:40:04 +0000
+++ src/runtime/numerics/numerics_impl.cpp 2013-09-25 21:52:49 +0000
@@ -72,7 +72,7 @@
7272
73 if (TypeOps::is_subtype(type, store::XS_DOUBLE))73 if (TypeOps::is_subtype(type, store::XS_DOUBLE))
74 {74 {
75 if (result->getDoubleValue().isPos() || result->getDoubleValue().isPosZero())75 if (result->getDoubleValue() > 0 || result->getDoubleValue().isPosZero())
76 {76 {
77 if (type != store::XS_DOUBLE)77 if (type != store::XS_DOUBLE)
78 GENV_ITEMFACTORY->createDouble(result, result->getDoubleValue());78 GENV_ITEMFACTORY->createDouble(result, result->getDoubleValue());
@@ -84,7 +84,7 @@
84 }84 }
85 else if (TypeOps::is_subtype(type, store::XS_FLOAT))85 else if (TypeOps::is_subtype(type, store::XS_FLOAT))
86 {86 {
87 if ( result->getFloatValue().isPos() || result->getFloatValue().isPosZero())87 if ( result->getFloatValue() > 0 || result->getFloatValue().isPosZero())
88 {88 {
89 if (type != store::XS_FLOAT)89 if (type != store::XS_FLOAT)
90 GENV_ITEMFACTORY->createFloat (result, result->getFloatValue());90 GENV_ITEMFACTORY->createFloat (result, result->getFloatValue());
9191
=== modified file 'src/util/csv_parser.cpp'
--- src/util/csv_parser.cpp 2013-08-21 23:52:57 +0000
+++ src/util/csv_parser.cpp 2013-09-25 21:52:49 +0000
@@ -29,15 +29,12 @@
29 while ( is_->get( c ) ) {29 while ( is_->get( c ) ) {
30 if ( in_quote ) {30 if ( in_quote ) {
31 if ( quote_esc_ == quote_ ) { // ""31 if ( quote_esc_ == quote_ ) { // ""
32 if ( c == quote_ ) {32 if ( c == quote_ && (c = is_->peek(), is_->good()) ) {
33 c = is_->peek();33 if ( c != quote_ ) {
34 if ( is_->good() ) {34 in_quote = false;
35 if ( c != quote_ ) {35 continue;
36 in_quote = false;
37 continue;
38 }
39 is_->get();
40 }36 }
37 is_->get();
41 }38 }
42 } else { // \"39 } else { // \"
43 if ( c == quote_ ) {40 if ( c == quote_ ) {
4441
=== modified file 'src/util/hash/hashtable.h'
--- src/util/hash/hashtable.h 2013-06-01 00:30:39 +0000
+++ src/util/hash/hashtable.h 2013-09-25 21:52:49 +0000
@@ -378,9 +378,8 @@
378 * @param hint An iterator providing a hint as to where to attempt to insert378 * @param hint An iterator providing a hint as to where to attempt to insert
379 * the new value.379 * the new value.
380 * @param value The value to insert.380 * @param value The value to insert.
381 * @return If a value with the given key is already in the %hashtable_base,381 * @return Returns an iterator positioned at either the new or existing
382 * returns [i,false] where \a i is positioned at the existing element;382 * element.
383 * otherwise returns [i,true] where \a i is positioned at the new element.
384 */383 */
385 iterator insert( const_iterator hint, value_type const &value );384 iterator insert( const_iterator hint, value_type const &value );
386385
387386
=== modified file 'src/zorbatypes/float.cpp'
--- src/zorbatypes/float.cpp 2013-06-26 15:26:23 +0000
+++ src/zorbatypes/float.cpp 2013-09-25 21:52:49 +0000
@@ -295,26 +295,6 @@
295295
296////////// miscellaneous //////////////////////////////////////////////////////296////////// miscellaneous //////////////////////////////////////////////////////
297297
298template<>
299bool FloatImpl<double>::isNegZero() const {
300 if ( !value_ ) {
301 char const *const bytes = reinterpret_cast<char const*>( &value_ );
302 // test for little endian and big endian
303 return bytes[0] || bytes[7]; // TODO: depends on sizeof(double)
304 }
305 return false;
306}
307
308template<>
309bool FloatImpl<float>::isNegZero() const {
310 if ( !value_ ) {
311 char const *const bytes = reinterpret_cast<char const*>( &value_ );
312 // test for little endian and big endian
313 return bytes[0] || bytes[3]; // TODO: depends on sizeof(float)
314 }
315 return false;
316}
317
318template<typename F>298template<typename F>
319FloatImpl<F> const& FloatImpl<F>::nan() {299FloatImpl<F> const& FloatImpl<F>::nan() {
320 static FloatImpl<F> const value( std::sqrt( -1.0 ) );300 static FloatImpl<F> const value( std::sqrt( -1.0 ) );
321301
=== modified file 'src/zorbatypes/float.h'
--- src/zorbatypes/float.h 2013-06-26 15:53:43 +0000
+++ src/zorbatypes/float.h 2013-09-25 21:52:49 +0000
@@ -276,8 +276,6 @@
276 bool isFinite() const;276 bool isFinite() const;
277 bool isPosInf() const;277 bool isPosInf() const;
278 bool isNegInf() const;278 bool isNegInf() const;
279 bool isNeg() const;
280 bool isPos() const;
281 bool isZero() const;279 bool isZero() const;
282 bool isPosZero() const;280 bool isPosZero() const;
283 bool isNegZero() const;281 bool isNegZero() const;
@@ -968,13 +966,12 @@
968}966}
969967
970template<typename F>968template<typename F>
971inline bool FloatImpl<F>::isNeg() const {969inline bool FloatImpl<F>::isNegZero() const {
972 return value_ < 0;970 if ( !value_ ) {
973}971 char const *const bytes = reinterpret_cast<char const*>( &value_ );
974972 return bytes[0] || bytes[ sizeof( F ) - 1 ];
975template<typename F>973 }
976inline bool FloatImpl<F>::isPos() const {974 return false;
977 return value_ > 0;
978}975}
979976
980template<typename F>977template<typename F>
981978
=== modified file 'src/zorbautils/hashset_atomic_itemh.h'
--- src/zorbautils/hashset_atomic_itemh.h 2012-06-19 21:31:29 +0000
+++ src/zorbautils/hashset_atomic_itemh.h 2013-09-25 21:52:49 +0000
@@ -83,14 +83,14 @@
83 theCompareParam->theTimezone,83 theCompareParam->theTimezone,
84 theCompareParam->theCollator);84 theCompareParam->theCollator);
85 }85 }
86 catch(ZorbaException& e)86 catch(ZorbaException const& e)
87 {87 {
88 if (e.diagnostic() == err::XPTY0004)88 if (e.diagnostic() == err::XPTY0004)
89 {89 {
90 return false;90 return false;
91 }91 }
9292
93 throw e;93 throw;
94 }94 }
95 }95 }
9696

Subscribers

People subscribed via source and target branches