Changeset 3cfe27f
- Timestamp:
- Mar 24, 2016, 4:45:23 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 1f6e009, 3aba311, 53ba273, b3f9a0cb
- Parents:
- 6a57da5
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.cc
r6a57da5 r3cfe27f 6358 6358 { 6359 6359 typedefTable.addToEnclosingScope( TypedefTable::ID ); 6360 (yyval.decl) = (yyvsp[(1) - (2)].decl) ;6360 (yyval.decl) = (yyvsp[(1) - (2)].decl)->addInitializer( (yyvsp[(2) - (2)].in) ); 6361 6361 } 6362 6362 break; … … 6368 6368 { 6369 6369 typedefTable.addToEnclosingScope( TypedefTable::ID ); 6370 (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ) ;6370 (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addInitializer( (yyvsp[(3) - (3)].in) );; 6371 6371 } 6372 6372 break; … … 6378 6378 { 6379 6379 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (6)].tok), TypedefTable::ID ); 6380 (yyval.decl) = (yyvsp[(1) - (6)].decl)->appendList( (yyvsp[(1) - (6)].decl)->cloneType( (yyvsp[(5) - (6)].tok) ) );6380 (yyval.decl) = (yyvsp[(1) - (6)].decl)->appendList( (yyvsp[(1) - (6)].decl)->cloneType( (yyvsp[(5) - (6)].tok) )->addInitializer( (yyvsp[(6) - (6)].in) ) ); 6381 6381 } 6382 6382 break; -
src/Parser/parser.yy
r6a57da5 r3cfe27f 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Mar 21 18:18:34201613 // Update Count : 149 712 // Last Modified On : Thu Mar 24 16:16:16 2016 13 // Update Count : 1498 14 14 // 15 15 … … 1029 1029 { 1030 1030 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1031 $$ = $1 ;1031 $$ = $1->addInitializer( $2 ); 1032 1032 } 1033 1033 | declaration_qualifier_list new_variable_specifier initializer_opt … … 1036 1036 { 1037 1037 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1038 $$ = $2->addQualifiers( $1 ) ;1038 $$ = $2->addQualifiers( $1 )->addInitializer( $3 );; 1039 1039 } 1040 1040 | new_variable_declaration pop ',' push identifier_or_type_name initializer_opt 1041 1041 { 1042 1042 typedefTable.addToEnclosingScope( *$5, TypedefTable::ID ); 1043 $$ = $1->appendList( $1->cloneType( $5 ) );1043 $$ = $1->appendList( $1->cloneType( $5 )->addInitializer( $6 ) ); 1044 1044 } 1045 1045 ; -
src/ResolvExpr/Resolver.cc
r6a57da5 r3cfe27f 10 10 // Created On : Sun May 17 12:17:01 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Feb 9 21:57:52201613 // Update Count : 1 7912 // Last Modified On : Thu Mar 24 16:43:11 2016 13 // Update Count : 181 14 14 // 15 15 … … 165 165 Type *new_type = resolveTypeof( objectDecl->get_type(), *this ); 166 166 objectDecl->set_type( new_type ); 167 // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable 168 // initContext is changed multiple time because the LHS is analysed twice. The second analysis changes 169 // initContext because of a function type can contain object declarations in the return and parameter types. So 170 // each value of initContext is retained, so the type on the first analysis is preserved and used for selecting 171 // the RHS. 172 Type *temp = initContext; 167 173 initContext = new_type; 168 174 SymTab::Indexer::visit( objectDecl ); 175 initContext = temp; 169 176 } 170 177 -
src/libcfa/stdlib.c
r6a57da5 r3cfe27f 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 22 22:34:26201613 // Update Count : 14 512 // Last Modified On : Wed Mar 23 13:26:42 2016 13 // Update Count : 146 14 14 // 15 15 … … 244 244 245 245 void rand48seed( long int s ) { srand48( s ); } 246 char rand48() { return lrand48(); }246 char rand48() { return mrand48(); } 247 247 int rand48() { return mrand48(); } 248 248 unsigned int rand48() { return lrand48(); }
Note: See TracChangeset
for help on using the changeset viewer.