Changeset 4e2b9710 for src/Parser
- Timestamp:
- Aug 25, 2016, 9:14:18 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
- a839867
- Parents:
- c1c1112 (diff), 486341f (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/Parser
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rc1c1112 r4e2b9710 50 50 newnode->isInline = isInline; 51 51 newnode->isNoreturn = isNoreturn; 52 newnode->bitfieldWidth = bitfieldWidth;52 newnode->bitfieldWidth = maybeClone( bitfieldWidth ); 53 53 newnode->hasEllipsis = hasEllipsis; 54 newnode->initializer = initializer;54 newnode->initializer = maybeClone( initializer ); 55 55 newnode->set_next( maybeClone( get_next() ) ); 56 56 newnode->linkage = linkage; … … 823 823 *out++ = decl; 824 824 } // if 825 delete extr; 825 826 } // if 826 827 Declaration *decl = cur->build(); -
src/Parser/LinkageSpec.cc
rc1c1112 r4e2b9710 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // LinkageSpec.cc -- 8 // 7 // LinkageSpec.cc -- 8 // 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:22:09 2015 … … 12 12 // Last Modified On : Sun Aug 21 12:32:53 2016 13 13 // Update Count : 17 14 // 14 // 15 15 16 16 #include <string> … … 32 32 33 33 std::string LinkageSpec::toString( LinkageSpec::Spec linkage ) { 34 assert( linkage >= 0 && linkage < LinkageSpec::NoOfSpecs ); 34 35 static const char *linkageKinds[LinkageSpec::NoOfSpecs] = { 35 36 "intrinsic", "Cforall", "C", "automatically generated", "compiler built-in", … … 39 40 40 41 bool LinkageSpec::isDecoratable( Spec spec ) { 42 assert( spec >= 0 && spec < LinkageSpec::NoOfSpecs ); 41 43 static bool decoratable[LinkageSpec::NoOfSpecs] = { 42 44 // Intrinsic, Cforall, C, AutoGen, Compiler 43 true, true, false, true, false, 45 true, true, false, true, false, 44 46 }; 45 47 return decoratable[spec]; … … 47 49 48 50 bool LinkageSpec::isGeneratable( Spec spec ) { 51 assert( spec >= 0 && spec < LinkageSpec::NoOfSpecs ); 49 52 static bool generatable[LinkageSpec::NoOfSpecs] = { 50 53 // Intrinsic, Cforall, C, AutoGen, Compiler 51 true, true, true, true, false, 54 true, true, true, true, false, 52 55 }; 53 56 return generatable[spec]; … … 55 58 56 59 bool LinkageSpec::isOverridable( Spec spec ) { 60 assert( spec >= 0 && spec < LinkageSpec::NoOfSpecs ); 57 61 static bool overridable[LinkageSpec::NoOfSpecs] = { 58 62 // Intrinsic, Cforall, C, AutoGen, Compiler 59 true, false, false, true, false, 63 true, false, false, true, false, 60 64 }; 61 65 return overridable[spec]; … … 63 67 64 68 bool LinkageSpec::isBuiltin( Spec spec ) { 69 assert( spec >= 0 && spec < LinkageSpec::NoOfSpecs ); 65 70 static bool builtin[LinkageSpec::NoOfSpecs] = { 66 71 // Intrinsic, Cforall, C, AutoGen, Compiler 67 true, false, false, false, true, 72 true, false, false, false, true, 68 73 }; 69 74 return builtin[spec]; -
src/Parser/ParseNode.h
rc1c1112 r4e2b9710 109 109 ExpressionNode( const ExpressionNode &other ); 110 110 virtual ~ExpressionNode() {} 111 virtual ExpressionNode *clone() const { assert( false ); returnnullptr; }111 virtual ExpressionNode *clone() const { return expr ? new ExpressionNode( expr->clone() ) : nullptr; } 112 112 113 113 bool get_extension() const { return extension; } -
src/Parser/StatementNode.cc
rc1c1112 r4e2b9710 44 44 agg = decl; 45 45 } // if 46 stmt.reset( new DeclStmt( noLabels, maybe Build< Declaration >(agg) ) );46 stmt.reset( new DeclStmt( noLabels, maybeMoveBuild< Declaration >(agg) ) ); 47 47 } else { 48 48 assert( false ); -
src/Parser/TypeData.cc
rc1c1112 r4e2b9710 182 182 break; 183 183 case Array: 184 newtype->array->dimension = array->dimension;184 newtype->array->dimension = maybeClone( array->dimension ); 185 185 newtype->array->isVarLen = array->isVarLen; 186 186 newtype->array->isStatic = array->isStatic;
Note: See TracChangeset
for help on using the changeset viewer.