Changeset 3f7e12cb for src/Tuples
- Timestamp:
- Nov 8, 2017, 5:43:33 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:
- 954908d
- Parents:
- 78315272 (diff), e35f30a (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/Tuples
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/TupleAssignment.cc
r78315272 r3f7e12cb 95 95 bool isTuple( Expression *expr ) { 96 96 if ( ! expr ) return false; 97 assert( expr-> has_result());97 assert( expr->result ); 98 98 return dynamic_cast< TupleType * >( expr->get_result()->stripReferences() ); 99 99 } … … 285 285 286 286 ObjectDecl * TupleAssignSpotter::Matcher::newObject( UniqueName & namer, Expression * expr ) { 287 assert( expr-> has_result()&& ! expr->get_result()->isVoid() );287 assert( expr->result && ! expr->get_result()->isVoid() ); 288 288 ObjectDecl * ret = new ObjectDecl( namer.newName(), Type::StorageClasses(), LinkageSpec::Cforall, nullptr, expr->get_result()->clone(), new SingleInit( expr->clone() ) ); 289 289 // if expression type is a reference, don't need to construct anything, a simple initializer is sufficient. … … 295 295 ctorInit->accept( rm ); 296 296 } 297 PRINT( std::cerr << "new object: " << ret << std::endl; ) 297 298 return ret; 298 299 } -
src/Tuples/TupleExpansion.cc
r78315272 r3f7e12cb 21 21 #include "Common/ScopedMap.h" // for ScopedMap 22 22 #include "Common/utility.h" // for CodeLocation 23 #include "GenPoly/DeclMutator.h" // for DeclMutator24 23 #include "InitTweak/InitTweak.h" // for getFunction 25 24 #include "Parser/LinkageSpec.h" // for Spec, C, Intrinsic … … 205 204 decl->set_body( true ); 206 205 for ( size_t i = 0; i < tupleSize; ++i ) { 207 TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", tupleSize, "_", i ), Type::StorageClasses(), nullptr, TypeDecl:: Any);206 TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", tupleSize, "_", i ), Type::StorageClasses(), nullptr, TypeDecl::Dtype, true ); 208 207 decl->get_members().push_back( new ObjectDecl( toString("field_", i ), Type::StorageClasses(), LinkageSpec::C, nullptr, new TypeInstType( Type::Qualifiers(), tyParam->get_name(), tyParam ), nullptr ) ); 209 208 decl->get_parameters().push_back( tyParam );
Note:
See TracChangeset
for help on using the changeset viewer.