Changes in / [b4e1876:f6f0d06f]
- Location:
- src
- Files:
-
- 2 added
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rb4e1876 rf6f0d06f 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 15:57:50201813 // Update Count : 107 612 // Last Modified On : Tue May 22 08:39:29 2018 13 // Update Count : 1074 14 14 // 15 15 … … 174 174 } 175 175 176 DeclarationNode * DeclarationNode::newFunction( conststring * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body ) {176 DeclarationNode * DeclarationNode::newFunction( string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body ) { 177 177 DeclarationNode * newnode = new DeclarationNode; 178 178 newnode->name = name; … … 245 245 } // DeclarationNode::newForall 246 246 247 DeclarationNode * DeclarationNode::newFromTypedef( conststring * name ) {247 DeclarationNode * DeclarationNode::newFromTypedef( string * name ) { 248 248 DeclarationNode * newnode = new DeclarationNode; 249 249 newnode->type = new TypeData( TypeData::SymbolicInst ); … … 268 268 } // DeclarationNode::newAggregate 269 269 270 DeclarationNode * DeclarationNode::newEnum( conststring * name, DeclarationNode * constants, bool body ) {270 DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants, bool body ) { 271 271 assert( name ); 272 272 DeclarationNode * newnode = new DeclarationNode; … … 278 278 } // DeclarationNode::newEnum 279 279 280 DeclarationNode * DeclarationNode::newEnumConstant( conststring * name, ExpressionNode * constant ) {280 DeclarationNode * DeclarationNode::newEnumConstant( string * name, ExpressionNode * constant ) { 281 281 DeclarationNode * newnode = new DeclarationNode; 282 282 newnode->name = name; … … 285 285 } // DeclarationNode::newEnumConstant 286 286 287 DeclarationNode * DeclarationNode::newName( conststring * name ) {287 DeclarationNode * DeclarationNode::newName( string * name ) { 288 288 DeclarationNode * newnode = new DeclarationNode; 289 289 newnode->name = name; … … 291 291 } // DeclarationNode::newName 292 292 293 DeclarationNode * DeclarationNode::newFromTypeGen( conststring * name, ExpressionNode * params ) {293 DeclarationNode * DeclarationNode::newFromTypeGen( string * name, ExpressionNode * params ) { 294 294 DeclarationNode * newnode = new DeclarationNode; 295 295 newnode->type = new TypeData( TypeData::SymbolicInst ); … … 300 300 } // DeclarationNode::newFromTypeGen 301 301 302 DeclarationNode * DeclarationNode::newTypeParam( TypeClass tc, conststring * name ) {302 DeclarationNode * DeclarationNode::newTypeParam( TypeClass tc, string * name ) { 303 303 DeclarationNode * newnode = new DeclarationNode; 304 304 newnode->type = nullptr; … … 331 331 } // DeclarationNode::newTraitUse 332 332 333 DeclarationNode * DeclarationNode::newTypeDecl( conststring * name, DeclarationNode * typeParams ) {333 DeclarationNode * DeclarationNode::newTypeDecl( string * name, DeclarationNode * typeParams ) { 334 334 DeclarationNode * newnode = new DeclarationNode; 335 335 newnode->name = name; … … 406 406 } // DeclarationNode::newBuiltinType 407 407 408 DeclarationNode * DeclarationNode::newAttr( conststring * name, ExpressionNode * expr ) {408 DeclarationNode * DeclarationNode::newAttr( string * name, ExpressionNode * expr ) { 409 409 DeclarationNode * newnode = new DeclarationNode; 410 410 newnode->type = nullptr; … … 415 415 } 416 416 417 DeclarationNode * DeclarationNode::newAttr( conststring * name, DeclarationNode * type ) {417 DeclarationNode * DeclarationNode::newAttr( string * name, DeclarationNode * type ) { 418 418 DeclarationNode * newnode = new DeclarationNode; 419 419 newnode->type = nullptr; … … 424 424 } 425 425 426 DeclarationNode * DeclarationNode::newAttribute( conststring * name, ExpressionNode * expr ) {426 DeclarationNode * DeclarationNode::newAttribute( string * name, ExpressionNode * expr ) { 427 427 DeclarationNode * newnode = new DeclarationNode; 428 428 newnode->type = nullptr; -
src/Parser/ParseNode.h
rb4e1876 rf6f0d06f 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 16:17:18201813 // Update Count : 8 4312 // Last Modified On : Mon Jun 4 22:21:04 2018 13 // Update Count : 832 14 14 // 15 15 … … 77 77 78 78 ParseNode * next = nullptr; 79 conststd::string * name = nullptr;79 std::string * name = nullptr; 80 80 CodeLocation location = yylloc; 81 81 }; // ParseNode … … 171 171 }; 172 172 173 Expression * build_constantInteger( std::string & str ); // these 4 routines modify the string174 Expression * build_constantFloat( std::string & 175 Expression * build_constantChar( std::string & 176 Expression * build_constantStr( std::string & 173 Expression * build_constantInteger( std::string &str ); 174 Expression * build_constantFloat( std::string &str ); 175 Expression * build_constantChar( std::string &str ); 176 Expression * build_constantStr( std::string &str ); 177 177 Expression * build_field_name_FLOATING_FRACTIONconstant( const std::string & str ); 178 178 Expression * build_field_name_FLOATING_DECIMALconstant( const std::string & str ); … … 230 230 static DeclarationNode * newBuiltinType( BuiltinType ); 231 231 static DeclarationNode * newForall( DeclarationNode * ); 232 static DeclarationNode * newFromTypedef( conststd::string * );233 static DeclarationNode * newFunction( conststd::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body );232 static DeclarationNode * newFromTypedef( std::string * ); 233 static DeclarationNode * newFunction( std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body ); 234 234 static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body ); 235 static DeclarationNode * newEnum( conststd::string * name, DeclarationNode * constants, bool body );236 static DeclarationNode * newEnumConstant( conststd::string * name, ExpressionNode * constant );237 static DeclarationNode * newName( conststd::string * );238 static DeclarationNode * newFromTypeGen( conststd::string *, ExpressionNode * params );239 static DeclarationNode * newTypeParam( TypeClass, conststd::string * );235 static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants, bool body ); 236 static DeclarationNode * newEnumConstant( std::string * name, ExpressionNode * constant ); 237 static DeclarationNode * newName( std::string * ); 238 static DeclarationNode * newFromTypeGen( std::string *, ExpressionNode * params ); 239 static DeclarationNode * newTypeParam( TypeClass, std::string * ); 240 240 static DeclarationNode * newTrait( const std::string * name, DeclarationNode * params, DeclarationNode * asserts ); 241 241 static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params ); 242 static DeclarationNode * newTypeDecl( conststd::string * name, DeclarationNode * typeParams );242 static DeclarationNode * newTypeDecl( std::string * name, DeclarationNode * typeParams ); 243 243 static DeclarationNode * newPointer( DeclarationNode * qualifiers, OperKinds kind ); 244 244 static DeclarationNode * newArray( ExpressionNode * size, DeclarationNode * qualifiers, bool isStatic ); … … 247 247 static DeclarationNode * newTuple( DeclarationNode * members ); 248 248 static DeclarationNode * newTypeof( ExpressionNode * expr ); 249 static DeclarationNode * newAttr( conststd::string *, ExpressionNode * expr ); // @ attributes250 static DeclarationNode * newAttr( conststd::string *, DeclarationNode * type ); // @ attributes251 static DeclarationNode * newAttribute( conststd::string *, ExpressionNode * expr = nullptr ); // gcc attributes249 static DeclarationNode * newAttr( std::string *, ExpressionNode * expr ); // @ attributes 250 static DeclarationNode * newAttr( std::string *, DeclarationNode * type ); // @ attributes 251 static DeclarationNode * newAttribute( std::string *, ExpressionNode * expr = nullptr ); // gcc attributes 252 252 static DeclarationNode * newAsmStmt( StatementNode * stmt ); // gcc external asm statement 253 253 static DeclarationNode * newStaticAssert( ExpressionNode * condition, Expression * message ); -
src/Parser/TypeData.cc
rb4e1876 rf6f0d06f 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 17:40:33201813 // Update Count : 60 412 // Last Modified On : Thu Apr 26 13:46:07 2018 13 // Update Count : 603 14 14 // 15 15 … … 610 610 611 611 if ( td->basictype == DeclarationNode::Float80 || td->basictype == DeclarationNode::Float128 ) { 612 //if ( td->complextype != DeclarationNode::NoComplexType ) {613 //genTSError( DeclarationNode::complexTypeNames[ td->complextype ], td->basictype );614 //}612 if ( td->complextype != DeclarationNode::NoComplexType ) { 613 genTSError( DeclarationNode::complexTypeNames[ td->complextype ], td->basictype ); 614 } 615 615 if ( td->basictype == DeclarationNode::Float80 ) ret = BasicType::Float80; 616 616 else ret = BasicType::Float128; -
src/Parser/lex.ll
rb4e1876 rf6f0d06f 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Wed Jun 6 17:31:09201813 * Update Count : 67 712 * Last Modified On : Thu May 3 13:42:40 2018 13 * Update Count : 676 14 14 */ 15 15 … … 232 232 finally { KEYWORD_RETURN(FINALLY); } // CFA 233 233 float { KEYWORD_RETURN(FLOAT); } 234 _Float32 { KEYWORD_RETURN(FLOAT); } // GCC235 _Float32x { KEYWORD_RETURN(FLOAT); } // GCC236 _Float64 { KEYWORD_RETURN(DOUBLE); } // GCC237 _Float64x { KEYWORD_RETURN(DOUBLE); } // GCC238 234 __float80 { KEYWORD_RETURN(FLOAT80); } // GCC 239 235 float80 { KEYWORD_RETURN(FLOAT80); } // GCC 240 _Float128 { KEYWORD_RETURN(FLOAT128); } // GCC241 _Float128x { KEYWORD_RETURN(FLOAT128); } // GCC242 236 __float128 { KEYWORD_RETURN(FLOAT128); } // GCC 243 237 float128 { KEYWORD_RETURN(FLOAT128); } // GCC -
src/Parser/parser.yy
rb4e1876 rf6f0d06f 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 14:53:38201813 // Update Count : 3 52212 // Last Modified On : Mon Jun 4 22:22:04 2018 13 // Update Count : 3492 14 14 // 15 15 … … 503 503 { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $5 ) ), $2 ) ); } 504 504 | type_name '.' no_attr_identifier // CFA, nested type 505 // { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; } 506 { $$ = nullptr; } 505 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; } 507 506 | type_name '.' '[' field_list ']' // CFA, nested type / tuple field selector 508 // { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; } 509 { $$ = nullptr; } 507 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; } 510 508 | GENERIC '(' assignment_expression ',' generic_assoc_list ')' // C11 511 509 { … … 1302 1300 ; 1303 1301 1304 KR_parameter_list_opt: 1302 KR_parameter_list_opt: // used to declare parameter types in K&R style functions 1305 1303 // empty 1306 1304 { $$ = nullptr; } … … 1792 1790 { $$ = DeclarationNode::newFromTypedef( $1 ); } 1793 1791 | '.' TYPEDEFname 1794 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1792 { $$ = DeclarationNode::newFromTypedef( $2 ); } // FIX ME 1795 1793 | type_name '.' TYPEDEFname 1796 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1794 { $$ = DeclarationNode::newFromTypedef( $3 ); } // FIX ME 1797 1795 | typegen_name 1798 1796 | '.' typegen_name 1799 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1797 { $$ = $2; } // FIX ME 1800 1798 | type_name '.' typegen_name 1801 { SemanticError( yylloc, "Qualified name is currently unimplemented." ); $$ = nullptr; }1799 { $$ = $3; } // FIX ME 1802 1800 ; 1803 1801 … … 1824 1822 aggregate_key attribute_list_opt '{' field_declaration_list_opt '}' 1825 1823 { $$ = DeclarationNode::newAggregate( $1, new string( DeclarationNode::anonymous.newName() ), nullptr, $4, true )->addQualifiers( $2 ); } 1826 | aggregate_key attribute_list_opt no_attr_identifier 1824 | aggregate_key attribute_list_opt no_attr_identifier_or_type_name 1827 1825 { 1828 1826 typedefTable.makeTypedef( *$3 ); // create typedef … … 1832 1830 '{' field_declaration_list_opt '}' 1833 1831 { $$ = DeclarationNode::newAggregate( $1, $3, nullptr, $6, true )->addQualifiers( $2 ); } 1834 | aggregate_key attribute_list_opt type_name1835 {1836 typedefTable.makeTypedef( *$3->type->symbolic.name ); // create typedef1837 if ( forall ) typedefTable.changeKind( *$3->type->symbolic.name, TYPEGENname ); // possibly update1838 forall = false; // reset1839 }1840 '{' field_declaration_list_opt '}'1841 { $$ = DeclarationNode::newAggregate( $1, $3->type->symbolic.name, nullptr, $6, true )->addQualifiers( $2 ); }1842 1832 | aggregate_key attribute_list_opt '(' type_list ')' '{' field_declaration_list_opt '}' // CFA 1843 1833 { $$ = DeclarationNode::newAggregate( $1, new string( DeclarationNode::anonymous.newName() ), $4, $7, false )->addQualifiers( $2 ); } … … 1853 1843 $$ = DeclarationNode::newAggregate( $1, $3, nullptr, nullptr, false )->addQualifiers( $2 ); 1854 1844 } 1855 | aggregate_key attribute_list_opt type_name 1845 | aggregate_key attribute_list_opt TYPEDEFname 1846 { 1847 typedefTable.makeTypedef( *$3 ); 1848 $$ = DeclarationNode::newAggregate( $1, $3, nullptr, nullptr, false )->addQualifiers( $2 ); 1849 } 1850 | aggregate_key attribute_list_opt typegen_name // CFA 1856 1851 { 1857 1852 // Create new generic declaration with same name as previous forward declaration, where the IDENTIFIER is … … 1948 1943 ENUM attribute_list_opt '{' enumerator_list comma_opt '}' 1949 1944 { $$ = DeclarationNode::newEnum( new string( DeclarationNode::anonymous.newName() ), $4, true )->addQualifiers( $2 ); } 1950 | ENUM attribute_list_opt no_attr_identifier 1945 | ENUM attribute_list_opt no_attr_identifier_or_type_name 1951 1946 { typedefTable.makeTypedef( *$3 ); } 1952 1947 '{' enumerator_list comma_opt '}' 1953 1948 { $$ = DeclarationNode::newEnum( $3, $6, true )->addQualifiers( $2 ); } 1954 | ENUM attribute_list_opt type_name1955 '{' enumerator_list comma_opt '}'1956 { $$ = DeclarationNode::newEnum( $3->type->symbolic.name, $5, true )->addQualifiers( $2 ); }1957 1949 | enum_type_nobody 1958 1950 ; 1959 1951 1960 1952 enum_type_nobody: // enum - {...} 1961 ENUM attribute_list_opt no_attr_identifier 1953 ENUM attribute_list_opt no_attr_identifier_or_type_name 1962 1954 { 1963 1955 typedefTable.makeTypedef( *$3 ); 1964 1956 $$ = DeclarationNode::newEnum( $3, 0, false )->addQualifiers( $2 ); 1965 }1966 | ENUM attribute_list_opt type_name1967 {1968 typedefTable.makeTypedef( *$3->type->symbolic.name );1969 $$ = DeclarationNode::newEnum( $3->type->symbolic.name, 0, false )->addQualifiers( $2 );1970 1957 } 1971 1958 ; -
src/libcfa/concurrency/preemption.c
rb4e1876 rf6f0d06f 10 10 // Created On : Mon Jun 5 14:20:42 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jun 5 17:35:49 201813 // Update Count : 3 712 // Last Modified On : Mon Apr 9 13:52:39 2018 13 // Update Count : 36 14 14 // 15 15 … … 116 116 // If there are still alarms pending, reset the timer 117 117 if( alarms->head ) { 118 __cfaabi_dbg_print_buffer_decl( " KERNEL: @% ju(%ju) resetting alarm to %ju.\n", currtime.tv, __kernel_get_time().tv, (alarms->head->alarm - currtime).tv);118 __cfaabi_dbg_print_buffer_decl( " KERNEL: @%lu(%lu) resetting alarm to %lu.\n", currtime.tv, __kernel_get_time().tv, (alarms->head->alarm - currtime).tv); 119 119 Duration delta = alarms->head->alarm - currtime; 120 120 Duration caped = max(delta, 50`us); -
src/libcfa/fstream
rb4e1876 rf6f0d06f 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jun 5 10:20:25 201813 // Update Count : 13 112 // Last Modified On : Thu Dec 7 15:17:26 2017 13 // Update Count : 130 14 14 // 15 15 … … 54 54 void open( ofstream &, const char * name ); 55 55 void close( ofstream & ); 56 ofstream & write( ofstream &, const char * data, size_t size );56 ofstream & write( ofstream &, const char * data, unsigned long int size ); 57 57 int fmt( ofstream &, const char fmt[], ... ); 58 58 … … 74 74 void open( ifstream & is, const char * name ); 75 75 void close( ifstream & is ); 76 ifstream & read( ifstream & is, char * data, size_t size );76 ifstream & read( ifstream & is, char * data, unsigned long int size ); 77 77 ifstream & ungetc( ifstream & is, char c ); 78 78 int fmt( ifstream &, const char fmt[], ... ); -
src/libcfa/fstream.c
rb4e1876 rf6f0d06f 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jun 5 17:02:56 201813 // Update Count : 2 8112 // Last Modified On : Sat Dec 9 09:31:23 2017 13 // Update Count : 275 14 14 // 15 15 … … 116 116 } // close 117 117 118 ofstream & write( ofstream & os, const char * data, size_t size ) {118 ofstream & write( ofstream & os, const char * data, unsigned long int size ) { 119 119 if ( fail( os ) ) { 120 120 fprintf( stderr, "attempt write I/O on failed stream\n" ); … … 198 198 } // close 199 199 200 ifstream & read( ifstream & is, char * data, size_t size ) {200 ifstream & read( ifstream & is, char * data, unsigned long int size ) { 201 201 if ( fail( is ) ) { 202 202 fprintf( stderr, "attempt read I/O on failed stream\n" ); -
src/main.cc
rb4e1876 rf6f0d06f 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 15:51:47201813 // Update Count : 49 812 // Last Modified On : Wed May 30 17:53:14 2018 13 // Update Count : 496 14 14 // 15 15 … … 157 157 << "." << endl; 158 158 backtrace( 2 ); // skip first 2 stack frames 159 //_exit( EXIT_FAILURE ); 160 abort(); 159 exit( EXIT_FAILURE ); 161 160 } // sigSegvBusHandler 162 161 -
src/prelude/extras.regx
rb4e1876 rf6f0d06f 1 1 typedef.* size_t; 2 2 typedef.* ptrdiff_t; 3 typedef.* __int8_t;4 typedef.* __int16_t;5 typedef.* __int32_t;6 typedef.* __int64_t;7 typedef.* __uint8_t;8 typedef.* __uint16_t;9 typedef.* __uint32_t;10 typedef.* __uint64_t;11 3 typedef.* int8_t; 12 4 typedef.* int16_t; -
src/tests/Makefile.am
rb4e1876 rf6f0d06f 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Wed Jun 6 16:42:20 201814 ## Update Count : 4 913 ## Last Modified On : Mon Nov 27 21:34:33 2017 14 ## Update Count : 48 15 15 ############################################################################### 16 16 … … 92 92 ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 93 93 94 literals : literals.c @CFA_BINDIR@/@CFA_NAME@ 95 ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 96 94 97 sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@ 95 98 ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} -
src/tests/Makefile.in
rb4e1876 rf6f0d06f 769 769 ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 770 770 771 literals : literals.c @CFA_BINDIR@/@CFA_NAME@ 772 ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 773 771 774 sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@ 772 775 ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} -
src/tests/ifwhileCtl.c
rb4e1876 rf6f0d06f 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // if whileCtl.c --7 // ifcond.c -- 8 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat Aug 26 10:13:11 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 17:15:09201813 // Update Count : 2112 // Last Modified On : Mon Jun 4 22:46:48 2018 13 // Update Count : 19 14 14 // 15 15 … … 72 72 // Local Variables: // 73 73 // tab-width: 4 // 74 // compile-command: "cfa if whileCtl.c" //74 // compile-command: "cfa ifcond.c" // 75 75 // End: //
Note: See TracChangeset
for help on using the changeset viewer.