- Timestamp:
- Mar 27, 2017, 5:00:57 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 41cd57c0
- Parents:
- ae6f1ec (diff), 656ee4f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
rae6f1ec r626da644 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 Jul 12 17:45:42 201613 // Update Count : 2 0412 // Last Modified On : Thu Mar 23 17:23:14 2017 13 // Update Count : 211 14 14 // 15 15 … … 371 371 void Resolver::visit( SingleInit *singleInit ) { 372 372 if ( singleInit->get_value() ) { 373 #if 0 374 if (NameExpr * ne = dynamic_cast<NameExpr*>(singleInit->get_value())) { 375 string n = ne->get_name(); 376 if (n == "0") { 377 initContext = new BasicType(Type::Qualifiers(), 378 BasicType::SignedInt); 379 } else { 380 DeclarationWithType * decl = lookupId( n ); 381 initContext = decl->get_type(); 382 } 383 } else if (ConstantExpr * e = 384 dynamic_cast<ConstantExpr*>(singleInit->get_value())) { 385 Constant *c = e->get_constant(); 386 initContext = c->get_type(); 387 } else { 388 assert(0); 389 } 390 #endif 373 // // find all the d's 374 // std::list<Expression *> &designators = singleInit->get_designators(); 375 // std::list<Type *> types1{ initContext }, types2; 376 // for ( Expression * expr: designators ) { 377 // cerr << expr << endl; 378 // if ( NameExpr * nexpr = dynamic_cast<NameExpr *>( expr ) ) { 379 // for ( Type * type: types1 ) { 380 // cerr << type << endl; 381 // ReferenceToType * fred = dynamic_cast<ReferenceToType *>(type); 382 // std::list<Declaration *> members; 383 // if ( fred ) { 384 // fred->lookup( nexpr->get_name(), members ); // concatenate identical field name 385 // for ( Declaration * mem: members ) { 386 // if ( DeclarationWithType * dwt = dynamic_cast<DeclarationWithType *>(mem) ) { 387 // types2.push_back( dwt->get_type() ); 388 // } // if 389 // } // for 390 // } // if 391 // } // for 392 // types1 = types2; 393 // types2.clear(); 394 // } // if 395 // } // for 396 // // for ( Type * type: types1 ) { 397 // // cerr << type << endl; 398 // // } // for 399 400 // // O(N^2) checks of d-types with f-types 401 // // find the minimum cost 391 402 CastExpr *castExpr = new CastExpr( singleInit->get_value(), initContext->clone() ); 392 403 Expression *newExpr = findSingleExpression( castExpr, *this ); … … 410 421 } 411 422 } // if 412 // singleInit->get_value()->accept( *this );413 423 } 414 424 -
src/SynTree/Initializer.h
rae6f1ec r626da644 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : T ue Apr 12 13:49:13 201613 // Update Count : 1911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 23 16:12:42 2017 13 // Update Count : 20 14 14 // 15 15 … … 70 70 void set_value( Expression *newValue ) { value = newValue; } 71 71 72 std::list<Expression *> &get_designators() { return designators; } 72 73 void set_designators( std::list<Expression *> &newValue ) { designators = newValue; } 73 std::list<Expression *> &get_designators() { return designators; }74 74 75 75 virtual SingleInit *clone() const { return new SingleInit( *this); } -
src/SynTree/Type.h
rae6f1ec r626da644 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 17 09:04:03201713 // Update Count : 14 712 // Last Modified On : Thu Mar 23 16:16:36 2017 13 // Update Count : 149 14 14 // 15 15 … … 331 331 virtual Type *acceptMutator( Mutator & m ) = 0; 332 332 virtual void print( std::ostream & os, int indent = 0 ) const; 333 334 virtual void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const {} 333 335 protected: 334 336 virtual std::string typeString() const = 0; -
src/libcfa/Makefile.am
rae6f1ec r626da644 11 11 ## Created On : Sun May 31 08:54:01 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Wed Dec 14 15:17:30 201614 ## Update Count : 21 113 ## Last Modified On : Sat Mar 25 18:00:10 2017 14 ## Update Count : 212 15 15 ############################################################################### 16 16 … … 41 41 CC = ${abs_top_srcdir}/src/driver/cfa 42 42 43 headers = limits stdlib math iostream fstream iterator rational assert 43 headers = limits stdlib math iostream fstream iterator rational assert containers/vector 44 44 45 45 # not all platforms support concurrency, add option do disable it 46 46 if BUILD_CONCURRENCY 47 headers += con tainers/vector concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor47 headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor 48 48 endif 49 49
Note: See TracChangeset
for help on using the changeset viewer.