Changeset 615a096
- Timestamp:
- Mar 17, 2017, 9:58:23 AM (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:
- 409433da, 946bcca
- Parents:
- 395fc37
- Location:
- src
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 09:09:09201713 // Update Count : 48 012 // Last Modified On : Fri Mar 17 09:06:01 2017 13 // Update Count : 481 14 14 // 15 15 … … 539 539 if ( castExpr->get_result()->isVoid() ) { 540 540 output << "(void)" ; 541 } else if ( ! castExpr->get_result()->get_ isLvalue() ) {541 } else if ( ! castExpr->get_result()->get_lvalue() ) { 542 542 // at least one result type of cast, but not an lvalue 543 543 output << "("; -
src/CodeGen/GenType.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 2 13:53:43201713 // Update Count : 2 012 // Last Modified On : Fri Mar 17 09:02:28 2017 13 // Update Count : 22 14 14 // 15 15 … … 99 99 os << "static "; 100 100 } // if 101 if ( qualifiers.is Const ) {101 if ( qualifiers.is_const ) { 102 102 os << "const "; 103 103 } // if 104 if ( qualifiers.is Volatile ) {104 if ( qualifiers.is_volatile ) { 105 105 os << "volatile "; 106 106 } // if 107 if ( qualifiers.is Restrict ) {107 if ( qualifiers.is_restrict ) { 108 108 os << "__restrict "; 109 109 } // if 110 if ( qualifiers.is Atomic ) {110 if ( qualifiers.is_atomic ) { 111 111 os << "_Atomic "; 112 112 } // if … … 238 238 239 239 void GenType::handleQualifiers( Type *type ) { 240 if ( type->get_ isConst() ) {240 if ( type->get_const() ) { 241 241 typeString = "const " + typeString; 242 242 } // if 243 if ( type->get_ isVolatile() ) {243 if ( type->get_volatile() ) { 244 244 typeString = "volatile " + typeString; 245 245 } // if 246 if ( type->get_ isRestrict() ) {246 if ( type->get_restrict() ) { 247 247 typeString = "__restrict " + typeString; 248 248 } // if 249 if ( type->get_ isAtomic() ) {249 if ( type->get_atomic() ) { 250 250 typeString = "_Atomic " + typeString; 251 251 } // if -
src/Concurrency/Keywords.cc
r395fc37 r615a096 12 12 // Last Modified By : 13 13 // Last Modified On : 14 // Update Count : 114 // Update Count : 3 15 15 // 16 16 … … 154 154 //Find mutex arguments 155 155 Type* ty = arg->get_type(); 156 if( ! ty->get_ qualifiers().isMutex) continue;156 if( ! ty->get_mutex() ) continue; 157 157 158 158 //Append it to the list … … 175 175 176 176 //Make sure that typed isn't mutex 177 if( ! base->get_ qualifiers().isMutex) throw SemanticError( "mutex keyword may only appear once per argument ", arg );177 if( ! base->get_mutex() ) throw SemanticError( "mutex keyword may only appear once per argument ", arg ); 178 178 } 179 179 -
src/GenPoly/Box.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:35:33201713 // Update Count : 33 812 // Last Modified On : Fri Mar 17 09:06:37 2017 13 // Update Count : 339 14 14 // 15 15 … … 753 753 // if the argument's type is polymorphic, we don't need to box again! 754 754 return; 755 } else if ( arg->get_result()->get_ isLvalue() ) {755 } else if ( arg->get_result()->get_lvalue() ) { 756 756 // VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue) 757 757 // xxx - need to test that this code is still reachable -
src/GenPoly/Lvalue.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 15 15:33:13 201513 // Update Count : 312 // Last Modified On : Fri Mar 17 09:11:18 2017 13 // Update Count : 5 14 14 // 15 15 … … 79 79 if ( function->get_returnVals().empty() ) return 0; 80 80 Type *ty = function->get_returnVals().front()->get_type(); 81 return ty->get_ isLvalue() ? ty : 0;81 return ty->get_lvalue() ? ty : 0; 82 82 } 83 83 … … 134 134 Statement * Pass1::mutate(ReturnStmt *retStmt) { 135 135 if ( retval && retStmt->get_expr() ) { 136 if ( retStmt->get_expr()->get_result()->get_ isLvalue() ) {136 if ( retStmt->get_expr()->get_result()->get_lvalue() ) { 137 137 // ***** Code Removal ***** because casts may be stripped already 138 138 -
src/InitTweak/FixInit.cc
r395fc37 r615a096 10 10 // Created On : Wed Jan 13 16:29:30 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:08:04201713 // Update Count : 6712 // Last Modified On : Fri Mar 17 09:13:47 2017 13 // Update Count : 71 14 14 // 15 15 … … 438 438 env->apply( result ); 439 439 ObjectDecl * tmp = new ObjectDecl( tempNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, result, 0 ); 440 tmp->get_type()->set_ isConst( false );440 tmp->get_type()->set_const( false ); 441 441 442 442 // create and resolve copy constructor … … 484 484 env->apply( result ); 485 485 ObjectDecl * ret = new ObjectDecl( retNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, result, 0 ); 486 ret->get_type()->set_ isConst( false );486 ret->get_type()->set_const( false ); 487 487 impCpCtorExpr->get_returnDecls().push_back( ret ); 488 488 CP_CTOR_PRINT( std::cerr << "makeCtorDtor for a return" << std::endl; ) 489 if ( ! result->get_ isLvalue() ) {489 if ( ! result->get_lvalue() ) { 490 490 // destructing lvalue returns is bad because it can cause multiple destructor calls to the same object - the returned object is not a temporary 491 491 destructRet( ret, impCpCtorExpr ); … … 507 507 env->apply( result ); 508 508 ObjectDecl * ret = new ObjectDecl( retNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0, result, 0 ); 509 ret->get_type()->set_ isConst( false );509 ret->get_type()->set_const( false ); 510 510 stmtExpr->get_returnDecls().push_front( ret ); 511 511 … … 588 588 589 589 Expression * retExpr = new CommaExpr( assign, new VariableExpr( returnDecl ) ); 590 if ( callExpr->get_result()->get_ isLvalue() ) {590 if ( callExpr->get_result()->get_lvalue() ) { 591 591 // lvalue returning functions are funny. Lvalue.cc inserts a *? in front of any lvalue returning 592 592 // non-intrinsic function. Add an AddressExpr to the call to negate the derefence and change the -
src/InitTweak/GenInit.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:01:25201713 // Update Count : 18 112 // Last Modified On : Fri Mar 17 09:12:36 2017 13 // Update Count : 183 14 14 // 15 15 … … 143 143 // is being returned 144 144 // Note: under the assumption that assignments return *this, checking for ?=? here is an optimization, since it shouldn't be necessary to copy construct `this`. This is a temporary optimization until reference types are added, at which point this should be removed, along with the analogous optimization in copy constructor generation. 145 if ( returnStmt->get_expr() && returnVals.size() == 1 && funcName != "?=?" && ! returnVals.front()->get_type()->get_ isLvalue() ) {145 if ( returnStmt->get_expr() && returnVals.size() == 1 && funcName != "?=?" && ! returnVals.front()->get_type()->get_lvalue() ) { 146 146 // explicitly construct the return value using the return expression and the retVal object 147 147 assertf( returnVals.front()->get_name() != "", "Function %s has unnamed return value\n", funcName.c_str() ); … … 195 195 196 196 ObjectDecl * arrayDimension = new ObjectDecl( dimensionName.newName(), storageClasses, LinkageSpec::C, 0, SymTab::SizeType->clone(), new SingleInit( arrayType->get_dimension() ) ); 197 arrayDimension->get_type()->set_ isConst( true );197 arrayDimension->get_type()->set_const( true ); 198 198 199 199 arrayType->set_dimension( new VariableExpr( arrayDimension ) ); -
src/Parser/DeclarationNode.cc
r395fc37 r615a096 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 17:16:31201713 // Update Count : 101 412 // Last Modified On : Fri Mar 17 08:46:05 2017 13 // Update Count : 1017 14 14 // 15 15 … … 432 432 for ( unsigned int i = 0; i < Type::NumTypeQualifier; i += 1 ) { // find duplicates 433 433 if ( qsrc[i] && qdst[i] ) { 434 appendError( error, string( "duplicate " ) + Type::Qualifiers ::Names[i] );434 appendError( error, string( "duplicate " ) + Type::QualifiersNames[i] ); 435 435 } // if 436 436 } // for … … 442 442 for ( unsigned int i = 0; i < Type::NumFuncSpecifier; i += 1 ) { // find duplicates 443 443 if ( funcSpecs[i] && src->funcSpecs[i] ) { 444 appendError( error, string( "duplicate " ) + Type::FuncSpecifiers ::Names[i] );444 appendError( error, string( "duplicate " ) + Type::FuncSpecifiersNames[i] ); 445 445 } // if 446 446 } // for … … 451 451 for ( unsigned int i = 0; i < Type::NumStorageClass; i += 1 ) { // find duplicates 452 452 if ( storageClasses[i] && src->storageClasses[i] ) { 453 appendError( error, string( "duplicate " ) + Type::StorageClasses ::Names[i] );453 appendError( error, string( "duplicate " ) + Type::StorageClassesNames[i] ); 454 454 } // if 455 455 } // for 456 456 // src is the new item being added and has a single bit 457 457 } else if ( ! src->storageClasses.is_threadlocal ) { // conflict ? 458 appendError( error, string( "conflicting " ) + Type::StorageClasses ::Names[storageClasses.ffs()] +459 " & " + Type::StorageClasses ::Names[src->storageClasses.ffs()] );458 appendError( error, string( "conflicting " ) + Type::StorageClassesNames[storageClasses.ffs()] + 459 " & " + Type::StorageClassesNames[src->storageClasses.ffs()] ); 460 460 src->storageClasses.reset(); // FIX to preserve invariant of one basic storage specifier 461 461 } // if -
src/Parser/TypeData.cc
r395fc37 r615a096 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:32:42201713 // Update Count : 5 5912 // Last Modified On : Fri Mar 17 08:46:10 2017 13 // Update Count : 560 14 14 // 15 15 … … 227 227 void TypeData::print( ostream &os, int indent ) const { 228 228 for ( int i = 0; i < Type::NumTypeQualifier; i += 1 ) { 229 if ( qualifiers[i] ) os << Type::Qualifiers ::Names[ i ] << ' ';229 if ( qualifiers[i] ) os << Type::QualifiersNames[ i ] << ' '; 230 230 } // for 231 231 -
src/Parser/lex.ll
r395fc37 r615a096 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Thu Mar 9 21:38:26201713 * Update Count : 50 512 * Last Modified On : Mon Mar 13 08:36:17 2017 13 * Update Count : 506 14 14 */ 15 15 … … 313 313 314 314 /* punctuation */ 315 "@" { ASCIIOP_RETURN(); } 315 316 "[" { ASCIIOP_RETURN(); } 316 317 "]" { ASCIIOP_RETURN(); } -
src/ResolvExpr/AlternativeFinder.cc
r395fc37 r615a096 10 10 // Created On : Sat May 16 23:52:08 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 4 17:02:51 201613 // Update Count : 2912 // Last Modified On : Fri Mar 17 09:14:17 2017 13 // Update Count : 30 14 14 // 15 15 … … 771 771 bool isLvalue( Expression *expr ) { 772 772 // xxx - recurse into tuples? 773 return expr->has_result() && expr->get_result()->get_ isLvalue();773 return expr->has_result() && expr->get_result()->get_lvalue(); 774 774 } 775 775 -
src/SymTab/Autogen.cc
r395fc37 r615a096 10 10 // Created On : Thu Mar 03 15:45:56 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:37:22201713 // Update Count : 5912 // Last Modified On : Fri Mar 17 09:41:08 2017 13 // Update Count : 60 14 14 // 15 15 … … 323 323 } 324 324 325 if ( type->get_ qualifiers().isConst&& func->get_name() == "?=?" ) {325 if ( type->get_const() && func->get_name() == "?=?" ) { 326 326 // don't assign const members, but do construct/destruct 327 327 continue; -
src/SymTab/Autogen.h
r395fc37 r615a096 10 10 // Created On : Sun May 17 21:53:34 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 07:51:39201713 // Update Count : 812 // Last Modified On : Fri Mar 17 09:10:41 2017 13 // Update Count : 9 14 14 // 15 15 … … 60 60 // castType->get_qualifiers() -= Type::Qualifiers(true, true, true, false, true, false); 61 61 castType->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic ); 62 castType->set_ isLvalue( true ); // xxx - might not need this62 castType->set_lvalue( true ); // xxx - might not need this 63 63 dstParam = new CastExpr( dstParam, new PointerType( Type::Qualifiers(), castType ) ); 64 64 } -
src/SymTab/Mangler.cc
r395fc37 r615a096 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:40:29 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Aug 19 15:52:24 201513 // Update Count : 1911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 17 09:40:01 2017 13 // Update Count : 20 14 14 // 15 15 … … 294 294 mangleName << "_"; 295 295 } // if 296 if ( type->get_ isConst() ) {296 if ( type->get_const() ) { 297 297 mangleName << "C"; 298 298 } // if 299 if ( type->get_ isVolatile() ) {299 if ( type->get_volatile() ) { 300 300 mangleName << "V"; 301 301 } // if … … 304 304 // mangleName << "R"; 305 305 // } // if 306 if ( type->get_ isLvalue() ) {306 if ( type->get_lvalue() ) { 307 307 mangleName << "L"; 308 308 } // if 309 if ( type->get_ isAtomic() ) {309 if ( type->get_atomic() ) { 310 310 mangleName << "A"; 311 311 } // if -
src/SynTree/ArrayType.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 1 17:16:29201713 // Update Count : 1 212 // Last Modified On : Fri Mar 17 09:40:30 2017 13 // Update Count : 13 14 14 // 15 15 … … 21 21 ArrayType::ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes ) 22 22 : Type( tq, attributes ), base( base ), dimension( dimension ), isVarLen( isVarLen ), isStatic( isStatic ) { 23 base->set_ isLvalue( false );23 base->set_lvalue( false ); 24 24 } 25 25 -
src/SynTree/Expression.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 5 14:23:56 201613 // Update Count : 4912 // Last Modified On : Fri Mar 17 09:42:04 2017 13 // Update Count : 51 14 14 // 15 15 … … 77 77 assert( var->get_type() ); 78 78 Type * type = var->get_type()->clone(); 79 type->set_ isLvalue( true );79 type->set_lvalue( true ); 80 80 set_result( type ); 81 81 } … … 352 352 sub.apply( res ); 353 353 set_result( res ); 354 get_result()->set_ isLvalue( true );354 get_result()->set_lvalue( true ); 355 355 } 356 356 -
src/SynTree/TupleExpr.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 18 10:59:19 201513 // Update Count : 112 // Last Modified On : Fri Mar 17 09:42:29 2017 13 // Update Count : 3 14 14 // 15 15 … … 60 60 assertf( type->size() > index, "TupleIndexExpr index out of bounds: tuple size %d, requested index %d in expr %s", type->size(), index, toString( tuple ).c_str() ); 61 61 set_result( (*std::next( type->get_types().begin(), index ))->clone() ); 62 get_result()->set_ isLvalue( type->get_isLvalue() );62 get_result()->set_lvalue( type->get_lvalue() ); 63 63 } 64 64 -
src/SynTree/Type.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 16:25:49201713 // Update Count : 2 712 // Last Modified On : Fri Mar 17 08:42:47 2017 13 // Update Count : 28 14 14 // 15 15 … … 61 61 62 62 // These must remain in the same order as the corresponding bit fields. 63 const char * Type::FuncSpecifiers ::Names[] = { "inline", "fortran", "_Noreturn" };64 const char * Type::StorageClasses ::Names[] = { "extern", "static", "auto", "register", "_Thread_local" };65 const char * Type::Qualifiers ::Names[] = { "const", "restrict", "volatile", "lvalue", "mutex", "_Atomic" };63 const char * Type::FuncSpecifiersNames[] = { "inline", "fortran", "_Noreturn" }; 64 const char * Type::StorageClassesNames[] = { "extern", "static", "auto", "register", "_Thread_local" }; 65 const char * Type::QualifiersNames[] = { "const", "restrict", "volatile", "lvalue", "mutex", "_Atomic" }; 66 66 67 67 Type *Type::stripDeclarator() { -
src/SynTree/Type.h
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 17:44:11201713 // Update Count : 1 3512 // Last Modified On : Fri Mar 17 09:04:03 2017 13 // Update Count : 147 14 14 // 15 15 … … 26 26 public: 27 27 // Simulate inheritance because union does not allow it. 28 // Bug in g++-4.9 prevents static field in union 29 //static const char * Names[]; 28 30 #define BFCommon( BFType, N ) \ 29 31 bool operator[]( unsigned int i ) const { return val & (1 << i); } \ … … 31 33 void reset() { val = 0; } \ 32 34 int ffs() { return ::ffs( val ) - 1; } \ 33 static const char * Names[]; \34 35 BFType operator&=( BFType other ) { \ 35 36 val &= other.val; return *this; \ … … 55 56 for ( unsigned int i = 0; i < N; i += 1 ) { \ 56 57 if ( (*this)[i] ) { \ 57 os << Names[i] << ' '; \58 os << BFType##Names[i] << ' '; \ 58 59 } \ 59 60 } \ … … 64 65 65 66 enum { Inline = 1 << 0, Noreturn = 1 << 1, Fortran = 1 << 2, NumFuncSpecifier = 3 }; 67 static const char * FuncSpecifiersNames[]; 66 68 union FuncSpecifiers { 67 69 unsigned int val; … … 73 75 FuncSpecifiers() : val( 0 ) {} 74 76 FuncSpecifiers( unsigned int val ) : val( val ) {} 75 bool operator==( FuncSpecifiers other ) const { return val == other.val; } 76 bool operator!=( FuncSpecifiers other ) const { return val != other.val; } 77 // equality (==, !=) works implicitly on first field "val", relational operations are undefined. 77 78 BFCommon( FuncSpecifiers, NumFuncSpecifier ) 78 79 }; // FuncSpecifiers 79 80 80 81 enum { Extern = 1 << 0, Static = 1 << 1, Auto = 1 << 2, Register = 1 << 3, Threadlocal = 1 << 4, NumStorageClass = 5 }; 82 static const char * StorageClassesNames[]; 81 83 union StorageClasses { 82 84 unsigned int val; … … 91 93 StorageClasses() : val( 0 ) {} 92 94 StorageClasses( unsigned int val ) : val( val ) {} 93 bool operator==( StorageClasses other ) const { return val == other.val; } 94 bool operator!=( StorageClasses other ) const { return val != other.val; } 95 // equality (==, !=) works implicitly on first field "val", relational operations are undefined. 95 96 BFCommon( StorageClasses, NumStorageClass ) 96 97 }; // StorageClasses 97 98 98 99 enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NumTypeQualifier = 6 }; 100 static const char * QualifiersNames[]; 99 101 union Qualifiers { 100 102 enum { Mask = ~(Restrict | Lvalue) }; 101 103 unsigned int val; 102 104 struct { 103 bool is Const : 1;104 bool is Restrict : 1;105 bool is Volatile : 1;106 bool is Lvalue : 1;107 bool is Mutex : 1;108 bool is Atomic : 1;105 bool is_const : 1; 106 bool is_restrict : 1; 107 bool is_volatile : 1; 108 bool is_lvalue : 1; 109 bool is_mutex : 1; 110 bool is_atomic : 1; 109 111 }; 110 112 111 113 Qualifiers() : val( 0 ) {} 112 114 Qualifiers( unsigned int val ) : val( val ) {} 113 bool operator==( Qualifiers other ) const { 114 return (val & Mask) == (other.val & Mask); 115 } 116 bool operator!=( Qualifiers other ) const { 117 return (val & Mask) != (other.val & Mask); 118 } 115 // Complex comparisons provide implicit qualifier downcasting, e.g., T downcast to const T. 116 bool operator==( Qualifiers other ) const { return (val & Mask) == (other.val & Mask); } 117 bool operator!=( Qualifiers other ) const { return (val & Mask) != (other.val & Mask); } 119 118 bool operator<=( Qualifiers other ) const { 120 return is Const <= other.isConst && isVolatile <= other.isVolatile &&121 is Mutex >= other.isMutex && isAtomic == other.isAtomic;119 return is_const <= other.is_const && is_volatile <= other.is_volatile && 120 is_mutex >= other.is_mutex && is_atomic == other.is_atomic; 122 121 } 123 122 bool operator<( Qualifiers other ) const { return *this != other && *this <= other; } … … 132 131 133 132 Qualifiers & get_qualifiers() { return tq; } 134 bool get_isConst() { return tq.isConst; } 135 bool get_isVolatile() { return tq.isVolatile; } 136 bool get_isRestrict() { return tq.isRestrict; } 137 bool get_isLvalue() { return tq.isLvalue; } 138 bool get_isAtomic() { return tq.isAtomic; } 139 void set_isConst( bool newValue ) { tq.isConst = newValue; } 140 void set_isVolatile( bool newValue ) { tq.isVolatile = newValue; } 141 void set_isRestrict( bool newValue ) { tq.isRestrict = newValue; } 142 void set_isLvalue( bool newValue ) { tq.isLvalue = newValue; } 143 void set_isAtomic( bool newValue ) { tq.isAtomic = newValue; } 133 bool get_const() { return tq.is_const; } 134 bool get_volatile() { return tq.is_volatile; } 135 bool get_restrict() { return tq.is_restrict; } 136 bool get_lvalue() { return tq.is_lvalue; } 137 bool get_mutex() { return tq.is_mutex; } 138 bool get_atomic() { return tq.is_atomic; } 139 void set_const( bool newValue ) { tq.is_const = newValue; } 140 void set_volatile( bool newValue ) { tq.is_volatile = newValue; } 141 void set_restrict( bool newValue ) { tq.is_restrict = newValue; } 142 void set_lvalue( bool newValue ) { tq.is_lvalue = newValue; } 143 void set_mutex( bool newValue ) { tq.is_mutex = newValue; } 144 void set_atomic( bool newValue ) { tq.is_atomic = newValue; } 144 145 145 146 typedef std::list<TypeDecl *> ForallList; -
src/Tuples/TupleAssignment.cc
r395fc37 r615a096 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 16 08:04:51201713 // Update Count : 712 // Last Modified On : Fri Mar 17 09:43:03 2017 13 // Update Count : 8 14 14 // 15 15 … … 200 200 assert( type ); 201 201 type->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic ); 202 type->set_ isLvalue( true ); // xxx - might not need this202 type->set_lvalue( true ); // xxx - might not need this 203 203 expr = new CastExpr( expr, castType ); 204 204 }
Note: See TracChangeset
for help on using the changeset viewer.