Changes in / [ff7ff14a:5c80197]
- Location:
- src
- Files:
-
- 5 edited
-
Parser/InitializerNode.cc (modified) (7 diffs)
-
Parser/parser.yy (modified) (2 diffs)
-
libcfa/concurrency/monitor.c (modified) (2 diffs)
-
libcfa/math (modified) (2 diffs)
-
libcfa/stdhdr/assert.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/InitializerNode.cc
rff7ff14a r5c80197 10 10 // Created On : Sat May 16 13:20:24 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Oct 1 23:09:51 201613 // Update Count : 2 112 // Last Modified On : Fri Jul 28 23:27:20 2017 13 // Update Count : 26 14 14 // 15 15 … … 22 22 #include "SynTree/Initializer.h" 23 23 24 InitializerNode::InitializerNode( ExpressionNode * _expr, bool aggrp, ExpressionNode *des )25 : expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0), maybeConstructed( true ) {24 InitializerNode::InitializerNode( ExpressionNode * _expr, bool aggrp, ExpressionNode * des ) 25 : expr( _expr ), aggregate( aggrp ), designator( des ), kids( nullptr ), maybeConstructed( true ) { 26 26 if ( aggrp ) 27 27 kids = dynamic_cast< InitializerNode * >( get_next() ); 28 28 29 if ( kids != 0)30 set_last( 0);31 } 29 if ( kids ) 30 set_last( nullptr ); 31 } // InitializerNode::InitializerNode 32 32 33 InitializerNode::InitializerNode( InitializerNode * init, bool aggrp, ExpressionNode *des )34 : expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0), maybeConstructed( true ) {35 if ( init != 0)33 InitializerNode::InitializerNode( InitializerNode * init, bool aggrp, ExpressionNode * des ) 34 : expr( nullptr ), aggregate( aggrp ), designator( des ), kids( nullptr ), maybeConstructed( true ) { 35 if ( init ) 36 36 set_last( init ); 37 37 … … 39 39 kids = dynamic_cast< InitializerNode * >( get_next() ); 40 40 41 if ( kids != 0)42 set_next( 0);43 } 41 if ( kids ) 42 set_next( nullptr ); 43 } // InitializerNode::InitializerNode 44 44 45 45 InitializerNode::~InitializerNode() { … … 47 47 delete designator; 48 48 delete kids; 49 } 49 } // InitializerNode::~InitializerNode 50 50 51 51 void InitializerNode::print( std::ostream &os, int indent ) const { 52 52 os << std::string( indent, ' ' ) << "Initializer expression" << std::endl; 53 } 53 } // InitializerNode::print 54 54 55 55 void InitializerNode::printOneLine( std::ostream &os ) const { 56 56 if ( ! aggregate ) { 57 if ( designator != 0) {57 if ( designator ) { 58 58 os << "designated by: ("; 59 59 ExpressionNode *curdes = designator; 60 while ( curdes != 0) {60 while ( curdes != nullptr) { 61 61 curdes->printOneLine(os); 62 62 curdes = (ExpressionNode *)(curdes->get_next()); … … 65 65 os << ")"; 66 66 } // if 67 if ( expr ) expr->printOneLine( os);67 if ( expr ) expr->printOneLine( os ); 68 68 } else { // It's an aggregate 69 69 os << "[--"; 70 if ( next_init() != 0)71 next_init()->printOneLine( os);70 if ( next_init() != nullptr ) 71 next_init()->printOneLine( os ); 72 72 if (aggregate) os << "--]"; 73 73 } // if … … 76 76 if ( (moreInit = dynamic_cast< InitializerNode * >( get_next() ) ) ) { 77 77 moreInit->printOneLine( os ); 78 } 79 } 78 } // if 79 } // InitializerNode::printOneLine 80 80 81 Initializer * InitializerNode::build() const {81 Initializer * InitializerNode::build() const { 82 82 if ( aggregate ) { 83 83 // steal designators from children … … 93 93 return new ListInit( initlist, designlist, maybeConstructed ); 94 94 } else { 95 if ( get_expression() != 0) {95 if ( get_expression() ) { 96 96 return new SingleInit( maybeBuild< Expression >( get_expression() ), maybeConstructed ); 97 } 97 } // if 98 98 } // if 99 return 0;100 } 99 return nullptr; 100 } // InitializerNode::build 101 101 102 102 // Local Variables: // -
src/Parser/parser.yy
rff7ff14a r5c80197 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 27 21:07:16201713 // Update Count : 24 6812 // Last Modified On : Mon Jul 31 14:54:32 2017 13 // Update Count : 2474 14 14 // 15 15 … … 1957 1957 | '=' initializer 1958 1958 { $$ = $2; } 1959 | '=' VOID 1960 { $$ = nullptr; } 1959 1961 | ATassign initializer 1960 1962 { $$ = $2->set_maybeConstructed( false ); } -
src/libcfa/concurrency/monitor.c
rff7ff14a r5c80197 10 10 // Created On : Thd Feb 23 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 21 22:37:11201713 // Update Count : 112 // Last Modified On : Mon Jul 31 14:59:05 2017 13 // Update Count : 3 14 14 // 15 15 … … 484 484 if( !this->monitors ) { 485 485 // LIB_DEBUG_PRINT_SAFE("Branding\n"); 486 assertf( thrd->current_monitors != NULL, "No current monitor to brand condition ", thrd->current_monitors );486 assertf( thrd->current_monitors != NULL, "No current monitor to brand condition %p", thrd->current_monitors ); 487 487 this->monitor_count = thrd->current_monitor_count; 488 488 -
src/libcfa/math
rff7ff14a r5c80197 10 10 // Created On : Mon Apr 18 23:37:04 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 21 17:03:13201713 // Update Count : 10 112 // Last Modified On : Mon Jul 31 09:21:48 2017 13 // Update Count : 102 14 14 // 15 15 … … 18 18 #include <math.h> 19 19 #include <complex.h> 20 21 //---------------------- General ---------------------- 20 22 21 23 static inline float ?%?( float x, float y ) { return fmodf( x, y ); } -
src/libcfa/stdhdr/assert.h
rff7ff14a r5c80197 10 10 // Created On : Mon Jul 4 23:25:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 20 21:06:48201713 // Update Count : 1 112 // Last Modified On : Mon Jul 31 14:52:43 2017 13 // Update Count : 12 14 14 // 15 15 … … 26 26 #define __VSTRINGIFY__(str) __STRINGIFY__(str) 27 27 #define assertf(expr, fmt, ...) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ )) 28 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn ));28 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn, format(printf, 5, 6))); 29 29 #endif 30 30
Note:
See TracChangeset
for help on using the changeset viewer.