Changes in / [bf4fe05:ec20ab9]
- Files:
-
- 125 added
- 123 deleted
- 90 edited
-
driver/cfa.cc (modified) (1 diff)
-
libcfa/src/enum.cfa (modified) (1 diff)
-
libcfa/src/enum.hfa (modified) (1 diff)
-
src/AST/Decl.cpp (modified) (1 diff)
-
src/AST/Expr.cpp (modified) (1 diff)
-
src/AST/Inspect.cpp (modified) (1 diff)
-
src/AST/Label.hpp (modified) (1 diff)
-
src/AST/LinkageSpec.cpp (modified) (1 diff)
-
src/AST/LinkageSpec.hpp (modified) (1 diff)
-
src/AST/Node.hpp (modified) (1 diff)
-
src/AST/ParseNode.hpp (modified) (1 diff)
-
src/AST/Pass.hpp (modified) (1 diff)
-
src/AST/Pass.proto.hpp (modified) (2 diffs)
-
src/AST/Print.hpp (modified) (1 diff)
-
src/AST/Stmt.hpp (modified) (1 diff)
-
src/AST/SymbolTable.cpp (modified) (1 diff)
-
src/AST/SymbolTable.hpp (modified) (1 diff)
-
src/AST/Type.cpp (modified) (1 diff)
-
src/AST/TypeEnvironment.cpp (modified) (1 diff)
-
src/AST/TypeEnvironment.hpp (modified) (1 diff)
-
src/AST/TypeSubstitution.cpp (modified) (1 diff)
-
src/AST/TypeSubstitution.hpp (modified) (2 diffs)
-
src/AST/Util.cpp (modified) (1 diff)
-
src/BasicTypes-gen.cpp (modified) (3 diffs)
-
src/CodeGen/CodeGenerator.cpp (modified) (1 diff)
-
src/CodeGen/CodeGenerator.hpp (modified) (1 diff)
-
src/CodeGen/FixMain.cc (added)
-
src/CodeGen/FixMain.cpp (deleted)
-
src/CodeGen/FixMain.h (added)
-
src/CodeGen/FixMain.hpp (deleted)
-
src/CodeGen/FixNames.cc (added)
-
src/CodeGen/FixNames.cpp (deleted)
-
src/CodeGen/FixNames.h (added)
-
src/CodeGen/FixNames.hpp (deleted)
-
src/CodeGen/GenType.cc (added)
-
src/CodeGen/GenType.cpp (deleted)
-
src/CodeGen/GenType.h (added)
-
src/CodeGen/GenType.hpp (deleted)
-
src/CodeGen/Generate.cc (added)
-
src/CodeGen/Generate.cpp (deleted)
-
src/CodeGen/Generate.h (added)
-
src/CodeGen/Generate.hpp (deleted)
-
src/CodeGen/LinkOnce.cc (added)
-
src/CodeGen/LinkOnce.cpp (deleted)
-
src/CodeGen/LinkOnce.h (added)
-
src/CodeGen/LinkOnce.hpp (deleted)
-
src/CodeGen/OperatorTable.cc (added)
-
src/CodeGen/OperatorTable.cpp (deleted)
-
src/CodeGen/OperatorTable.h (added)
-
src/CodeGen/OperatorTable.hpp (deleted)
-
src/CodeGen/Options.h (added)
-
src/CodeGen/Options.hpp (deleted)
-
src/CodeGen/module.mk (modified) (1 diff)
-
src/Common/Assert.cc (added)
-
src/Common/Assert.cpp (deleted)
-
src/Common/CodeLocation.h (added)
-
src/Common/CodeLocation.hpp (deleted)
-
src/Common/CodeLocationTools.cpp (modified) (1 diff)
-
src/Common/DebugMalloc.cc (added)
-
src/Common/DebugMalloc.cpp (deleted)
-
src/Common/DeclStats.cpp (modified) (1 diff)
-
src/Common/ErrorObjects.h (added)
-
src/Common/ErrorObjects.hpp (deleted)
-
src/Common/Eval.cc (added)
-
src/Common/Eval.cpp (deleted)
-
src/Common/Eval.h (added)
-
src/Common/Eval.hpp (deleted)
-
src/Common/Examine.cc (added)
-
src/Common/Examine.cpp (deleted)
-
src/Common/Examine.h (added)
-
src/Common/Examine.hpp (deleted)
-
src/Common/FilterCombos.h (added)
-
src/Common/FilterCombos.hpp (deleted)
-
src/Common/Indenter.cc (added)
-
src/Common/Indenter.cpp (deleted)
-
src/Common/Indenter.h (added)
-
src/Common/Indenter.hpp (deleted)
-
src/Common/PersistentMap.h (added)
-
src/Common/PersistentMap.hpp (deleted)
-
src/Common/ResolvProtoDump.cpp (modified) (1 diff)
-
src/Common/ScopedMap.h (added)
-
src/Common/ScopedMap.hpp (deleted)
-
src/Common/SemanticError.cc (added)
-
src/Common/SemanticError.cpp (deleted)
-
src/Common/SemanticError.h (added)
-
src/Common/SemanticError.hpp (deleted)
-
src/Common/Stats.h (added)
-
src/Common/Stats.hpp (deleted)
-
src/Common/Stats/Base.h (added)
-
src/Common/Stats/Base.hpp (deleted)
-
src/Common/Stats/Counter.cc (added)
-
src/Common/Stats/Counter.cpp (deleted)
-
src/Common/Stats/Counter.h (added)
-
src/Common/Stats/Counter.hpp (deleted)
-
src/Common/Stats/Heap.cc (added)
-
src/Common/Stats/Heap.cpp (deleted)
-
src/Common/Stats/Heap.h (added)
-
src/Common/Stats/Heap.hpp (deleted)
-
src/Common/Stats/ResolveTime.cc (added)
-
src/Common/Stats/ResolveTime.cpp (deleted)
-
src/Common/Stats/ResolveTime.h (added)
-
src/Common/Stats/ResolveTime.hpp (deleted)
-
src/Common/Stats/Stats.cc (added)
-
src/Common/Stats/Stats.cpp (deleted)
-
src/Common/Stats/Time.cc (added)
-
src/Common/Stats/Time.cpp (deleted)
-
src/Common/Stats/Time.h (added)
-
src/Common/Stats/Time.hpp (deleted)
-
src/Common/UniqueName.cc (added)
-
src/Common/UniqueName.cpp (deleted)
-
src/Common/UniqueName.h (added)
-
src/Common/UniqueName.hpp (deleted)
-
src/Common/Utility.hpp (deleted)
-
src/Common/VectorMap.h (added)
-
src/Common/VectorMap.hpp (deleted)
-
src/Common/module.mk (modified) (1 diff)
-
src/Common/utility.h (added)
-
src/CompilationState.cpp (modified) (1 diff)
-
src/Concurrency/Corun.cpp (modified) (1 diff)
-
src/Concurrency/Keywords.cpp (modified) (2 diffs)
-
src/Concurrency/Keywords.h (added)
-
src/Concurrency/Keywords.hpp (deleted)
-
src/Concurrency/Waitfor.cpp (modified) (1 diff)
-
src/Concurrency/Waitfor.h (added)
-
src/Concurrency/Waitfor.hpp (deleted)
-
src/Concurrency/Waituntil.cpp (modified) (1 diff)
-
src/Concurrency/Waituntil.hpp (modified) (1 diff)
-
src/Concurrency/module.mk (modified) (1 diff)
-
src/ControlStruct/ExceptDecl.cpp (modified) (2 diffs)
-
src/ControlStruct/ExceptDecl.h (added)
-
src/ControlStruct/ExceptDecl.hpp (deleted)
-
src/ControlStruct/ExceptTranslate.cpp (modified) (1 diff)
-
src/ControlStruct/ExceptTranslate.h (added)
-
src/ControlStruct/ExceptTranslate.hpp (deleted)
-
src/ControlStruct/module.mk (modified) (1 diff)
-
src/GenPoly/Box.cpp (modified) (2 diffs)
-
src/GenPoly/Box.h (added)
-
src/GenPoly/Box.hpp (deleted)
-
src/GenPoly/ErasableScopedMap.h (added)
-
src/GenPoly/ErasableScopedMap.hpp (deleted)
-
src/GenPoly/FindFunction.cc (added)
-
src/GenPoly/FindFunction.cpp (deleted)
-
src/GenPoly/FindFunction.h (added)
-
src/GenPoly/FindFunction.hpp (deleted)
-
src/GenPoly/GenPoly.cc (added)
-
src/GenPoly/GenPoly.cpp (deleted)
-
src/GenPoly/GenPoly.h (added)
-
src/GenPoly/GenPoly.hpp (deleted)
-
src/GenPoly/InstantiateGeneric.cpp (modified) (2 diffs)
-
src/GenPoly/InstantiateGeneric.h (added)
-
src/GenPoly/InstantiateGeneric.hpp (deleted)
-
src/GenPoly/Lvalue.cpp (modified) (2 diffs)
-
src/GenPoly/Lvalue.h (added)
-
src/GenPoly/Lvalue.hpp (deleted)
-
src/GenPoly/Lvalue2.cc (added)
-
src/GenPoly/Lvalue2.cpp (deleted)
-
src/GenPoly/ScopedSet.h (added)
-
src/GenPoly/ScopedSet.hpp (deleted)
-
src/GenPoly/ScrubTypeVars.cpp (modified) (1 diff)
-
src/GenPoly/ScrubTypeVars.hpp (modified) (1 diff)
-
src/GenPoly/Specialize.cpp (modified) (2 diffs)
-
src/GenPoly/Specialize.h (added)
-
src/GenPoly/Specialize.hpp (deleted)
-
src/GenPoly/module.mk (modified) (1 diff)
-
src/InitTweak/FixGlobalInit.cc (added)
-
src/InitTweak/FixGlobalInit.cpp (deleted)
-
src/InitTweak/FixGlobalInit.h (added)
-
src/InitTweak/FixGlobalInit.hpp (deleted)
-
src/InitTweak/FixInit.cpp (modified) (2 diffs)
-
src/InitTweak/FixInit.h (added)
-
src/InitTweak/FixInit.hpp (deleted)
-
src/InitTweak/GenInit.cc (added)
-
src/InitTweak/GenInit.cpp (deleted)
-
src/InitTweak/GenInit.h (added)
-
src/InitTweak/GenInit.hpp (deleted)
-
src/InitTweak/InitTweak.cc (added)
-
src/InitTweak/InitTweak.cpp (deleted)
-
src/InitTweak/InitTweak.h (added)
-
src/InitTweak/InitTweak.hpp (deleted)
-
src/InitTweak/module.mk (modified) (1 diff)
-
src/MakeLibCfa.cpp (modified) (1 diff)
-
src/Makefile.am (modified) (3 diffs)
-
src/Parser/DeclarationNode.cc (added)
-
src/Parser/DeclarationNode.cpp (deleted)
-
src/Parser/DeclarationNode.h (added)
-
src/Parser/DeclarationNode.hpp (deleted)
-
src/Parser/ExpressionNode.cc (added)
-
src/Parser/ExpressionNode.cpp (deleted)
-
src/Parser/ExpressionNode.h (added)
-
src/Parser/ExpressionNode.hpp (deleted)
-
src/Parser/InitializerNode.cc (added)
-
src/Parser/InitializerNode.cpp (deleted)
-
src/Parser/InitializerNode.h (added)
-
src/Parser/InitializerNode.hpp (deleted)
-
src/Parser/ParseNode.cc (added)
-
src/Parser/ParseNode.cpp (deleted)
-
src/Parser/ParseNode.h (added)
-
src/Parser/ParseNode.hpp (deleted)
-
src/Parser/ParserTypes.h (added)
-
src/Parser/ParserTypes.hpp (deleted)
-
src/Parser/ParserUtility.hpp (deleted)
-
src/Parser/RunParser.cpp (modified) (1 diff)
-
src/Parser/StatementNode.cc (added)
-
src/Parser/StatementNode.cpp (deleted)
-
src/Parser/StatementNode.h (added)
-
src/Parser/StatementNode.hpp (deleted)
-
src/Parser/TypeData.cc (added)
-
src/Parser/TypeData.cpp (deleted)
-
src/Parser/TypeData.h (added)
-
src/Parser/TypeData.hpp (deleted)
-
src/Parser/TypedefTable.cc (added)
-
src/Parser/TypedefTable.cpp (deleted)
-
src/Parser/TypedefTable.h (added)
-
src/Parser/TypedefTable.hpp (deleted)
-
src/Parser/lex.ll (modified) (1 diff)
-
src/Parser/module.mk (modified) (1 diff)
-
src/Parser/parser.yy (modified) (1 diff)
-
src/Parser/parserutility.h (added)
-
src/ResolvExpr/AdjustExprType.cc (added)
-
src/ResolvExpr/AdjustExprType.cpp (deleted)
-
src/ResolvExpr/Candidate.hpp (modified) (1 diff)
-
src/ResolvExpr/CandidateFinder.cpp (modified) (4 diffs)
-
src/ResolvExpr/CandidateFinder.hpp (modified) (1 diff)
-
src/ResolvExpr/CandidatePrinter.cpp (modified) (1 diff)
-
src/ResolvExpr/CastCost.cc (added)
-
src/ResolvExpr/CastCost.cpp (deleted)
-
src/ResolvExpr/CastCost.hpp (modified) (2 diffs)
-
src/ResolvExpr/CommonType.cc (added)
-
src/ResolvExpr/CommonType.cpp (deleted)
-
src/ResolvExpr/CommonType.hpp (modified) (1 diff)
-
src/ResolvExpr/ConversionCost.cc (added)
-
src/ResolvExpr/ConversionCost.cpp (deleted)
-
src/ResolvExpr/ConversionCost.h (added)
-
src/ResolvExpr/ConversionCost.hpp (deleted)
-
src/ResolvExpr/Cost.h (added)
-
src/ResolvExpr/Cost.hpp (deleted)
-
src/ResolvExpr/CurrentObject.cc (added)
-
src/ResolvExpr/CurrentObject.cpp (deleted)
-
src/ResolvExpr/CurrentObject.h (added)
-
src/ResolvExpr/CurrentObject.hpp (deleted)
-
src/ResolvExpr/ExplodedArg.cpp (modified) (1 diff)
-
src/ResolvExpr/ExplodedArg.hpp (modified) (1 diff)
-
src/ResolvExpr/FindOpenVars.cc (added)
-
src/ResolvExpr/FindOpenVars.cpp (deleted)
-
src/ResolvExpr/FindOpenVars.h (added)
-
src/ResolvExpr/FindOpenVars.hpp (deleted)
-
src/ResolvExpr/PolyCost.cc (added)
-
src/ResolvExpr/PolyCost.cpp (deleted)
-
src/ResolvExpr/PtrsAssignable.cc (added)
-
src/ResolvExpr/PtrsAssignable.cpp (deleted)
-
src/ResolvExpr/PtrsCastable.cc (added)
-
src/ResolvExpr/PtrsCastable.cpp (deleted)
-
src/ResolvExpr/RenameVars.cc (added)
-
src/ResolvExpr/RenameVars.cpp (deleted)
-
src/ResolvExpr/RenameVars.h (added)
-
src/ResolvExpr/RenameVars.hpp (deleted)
-
src/ResolvExpr/ResolveTypeof.cc (added)
-
src/ResolvExpr/ResolveTypeof.cpp (deleted)
-
src/ResolvExpr/ResolveTypeof.h (added)
-
src/ResolvExpr/ResolveTypeof.hpp (deleted)
-
src/ResolvExpr/Resolver.cc (added)
-
src/ResolvExpr/Resolver.cpp (deleted)
-
src/ResolvExpr/Resolver.h (added)
-
src/ResolvExpr/Resolver.hpp (deleted)
-
src/ResolvExpr/SatisfyAssertions.cpp (modified) (2 diffs)
-
src/ResolvExpr/SpecCost.cc (added)
-
src/ResolvExpr/SpecCost.cpp (deleted)
-
src/ResolvExpr/Typeops.hpp (deleted)
-
src/ResolvExpr/Unify.cc (added)
-
src/ResolvExpr/Unify.cpp (deleted)
-
src/ResolvExpr/Unify.h (added)
-
src/ResolvExpr/Unify.hpp (deleted)
-
src/ResolvExpr/WidenMode.h (added)
-
src/ResolvExpr/WidenMode.hpp (deleted)
-
src/ResolvExpr/module.mk (modified) (2 diffs)
-
src/ResolvExpr/typeops.h (added)
-
src/SymTab/Demangle.cc (added)
-
src/SymTab/Demangle.cpp (deleted)
-
src/SymTab/Demangle.h (added)
-
src/SymTab/Demangle.hpp (deleted)
-
src/SymTab/FixFunction.cc (added)
-
src/SymTab/FixFunction.cpp (deleted)
-
src/SymTab/FixFunction.h (added)
-
src/SymTab/FixFunction.hpp (deleted)
-
src/SymTab/GenImplicitCall.cpp (modified) (1 diff)
-
src/SymTab/GenImplicitCall.hpp (modified) (1 diff)
-
src/SymTab/Mangler.cc (added)
-
src/SymTab/Mangler.cpp (deleted)
-
src/SymTab/Mangler.h (added)
-
src/SymTab/Mangler.hpp (deleted)
-
src/SymTab/ManglerCommon.cc (added)
-
src/SymTab/ManglerCommon.cpp (deleted)
-
src/SymTab/demangler.cc (added)
-
src/SymTab/demangler.cpp (deleted)
-
src/SymTab/module.mk (modified) (1 diff)
-
src/Tuples/Explode.cc (added)
-
src/Tuples/Explode.cpp (deleted)
-
src/Tuples/Explode.h (added)
-
src/Tuples/Explode.hpp (deleted)
-
src/Tuples/TupleAssignment.cc (added)
-
src/Tuples/TupleAssignment.cpp (deleted)
-
src/Tuples/TupleExpansion.cpp (modified) (1 diff)
-
src/Tuples/Tuples.cc (added)
-
src/Tuples/Tuples.cpp (deleted)
-
src/Tuples/Tuples.h (added)
-
src/Tuples/Tuples.hpp (deleted)
-
src/Tuples/module.mk (modified) (1 diff)
-
src/Validate/Autogen.cpp (modified) (2 diffs)
-
src/Validate/CompoundLiteral.cpp (modified) (1 diff)
-
src/Validate/EliminateTypedef.cpp (modified) (1 diff)
-
src/Validate/EnumAndPointerDecay.cpp (modified) (1 diff)
-
src/Validate/FindSpecialDecls.cpp (modified) (1 diff)
-
src/Validate/FindSpecialDecls.h (added)
-
src/Validate/FindSpecialDecls.hpp (deleted)
-
src/Validate/FixQualifiedTypes.cpp (modified) (1 diff)
-
src/Validate/FixReturnTypes.cpp (modified) (1 diff)
-
src/Validate/ForallPointerDecay.cpp (modified) (1 diff)
-
src/Validate/ImplementEnumFunc.cpp (modified) (11 diffs)
-
src/Validate/ReplacePseudoFunc.cpp (added)
-
src/Validate/ReplacePseudoFunc.hpp (added)
-
src/Validate/ReplaceTypedef.cpp (modified) (1 diff)
-
src/Validate/VerifyCtorDtorAssign.cpp (modified) (1 diff)
-
src/Validate/module.mk (modified) (3 diffs)
-
src/Virtual/ExpandCasts.cc (added)
-
src/Virtual/ExpandCasts.cpp (deleted)
-
src/Virtual/ExpandCasts.h (added)
-
src/Virtual/ExpandCasts.hpp (deleted)
-
src/Virtual/Tables.cc (added)
-
src/Virtual/Tables.cpp (deleted)
-
src/Virtual/Tables.h (added)
-
src/Virtual/Tables.hpp (deleted)
-
src/Virtual/module.mk (modified) (1 diff)
-
src/include/cassert (modified) (1 diff)
-
src/include/optional (modified) (1 diff)
-
src/main.cpp (modified) (5 diffs)
-
tests/enum_tests/.expect/voidEnum.txt (modified) (1 diff)
-
tests/enum_tests/structEnum.cfa (modified) (1 diff)
-
tests/enum_tests/voidEnum.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
driver/cfa.cc
rbf4fe05 rec20ab9 26 26 #include <sys/stat.h> 27 27 28 #include "Common/SemanticError.h pp"28 #include "Common/SemanticError.h" 29 29 #include "config.h" // configure info 30 30 -
libcfa/src/enum.cfa
rbf4fe05 rec20ab9 1 #include "enum.hfa"2 3 #pragma GCC visibility push(default)4 5 forall(T, E| TypedEnum(T, E)) {6 // constructors7 8 // comparison9 int ?==?(E l, E r) { return posE(l) == posE(r); }10 int ?!=?(E l, E r) { return posE(l) != posE(r); }11 int ?!=?(E l, zero_t) { return !( posE(l) == 0 ); }12 int ?<?(E l, E r) { return posE(l) < posE(r); }13 int ?<=?(E l, E r) { return posE(l) <= posE(r); }14 int ?>?(E l, E r) { return posE(l) > posE(r); }15 int ?>=?(E l, E r) { return posE(l) >= posE(r); }16 } -
libcfa/src/enum.hfa
rbf4fe05 rec20ab9 1 1 #pragma once 2 2 3 forall(T) { // T is the based type of enum(T) 4 forall(E) trait Bounded { 5 E lowerBound(); 6 E upperBound(); 7 }; 3 forall( E ) trait Bounded { 4 E lowerBound(); 5 E upperBound(); 6 }; 8 7 9 forall(E| Bounded(T, E)) trait Serial {10 unsigned fromInstance(E e);11 E fromInt(unsigned i);12 E succ(E e);13 E pred(E e);14 };8 forall( E | Bounded( E ) ) trait Serial { 9 unsigned fromInstance( E e ); 10 E fromInt( unsigned int posn ); 11 E succ( E e ); 12 E pred( E e ); 13 }; 15 14 16 // Opague Enum + TypedEnum 17 forall(E | Serial(T, E)) trait CfaEnum { 18 char * labelE(E e);19 unsigned int posE(E e);20 };15 forall( E, T ) trait TypedEnum { 16 T valueE( E e ); 17 char * labelE( E e ); 18 unsigned int posE( E e ); 19 }; 21 20 22 forall(E| CfaEnum(T, E)) trait TypedEnum { 23 T valueE(E e); 24 }; 25 26 forall(E | TypedEnum(T, E)) { 27 // comparison 28 int ?==?(E l, E r); // true if l and r are same enumerators 29 int ?!=?(E l, E r); // true if l and r are different enumerators 30 int ?!=?(E l, zero_t); // true if l is not the first enumerator 31 int ?<?(E l, E r); // true if l is an enuemerator before r 32 int ?<=?(E l, E r); // true if l before or the same as r 33 int ?>?(E l, E r); // true if l is an enuemrator after r 34 int ?>=?(E l, E r); // true if l after or the same as r 35 } 21 forall( E, T | TypedEnum( E, T ) ) { 22 // comparison 23 int ?==?( E l, E r ); // true if l and r are same enumerators 24 int ?!=?( E l, E r ); // true if l and r are different enumerators 25 int ?!=?( E l, zero_t ); // true if l is not the first enumerator 26 int ?<?( E l, E r ); // true if l is an enuemerator before r 27 int ?<=?( E l, E r ); // true if l before or the same as r 28 int ?>?( E l, E r ); // true if l is an enuemrator after r 29 int ?>=?( E l, E r ); // true if l after or the same as r 36 30 } -
src/AST/Decl.cpp
rbf4fe05 rec20ab9 20 20 #include <unordered_map> 21 21 22 #include "Common/Eval.h pp"// for eval23 #include "Common/SemanticError.h pp"22 #include "Common/Eval.h" // for eval 23 #include "Common/SemanticError.h" 24 24 25 25 #include "Fwd.hpp" // for UniqueId -
src/AST/Expr.cpp
rbf4fe05 rec20ab9 27 27 #include "Type.hpp" 28 28 #include "TypeSubstitution.hpp" 29 #include "Common/ Utility.hpp"30 #include "Common/SemanticError.h pp"31 #include "GenPoly/Lvalue.h pp"// for referencesPermissable32 #include "ResolvExpr/Unify.h pp"// for extractResultType33 #include "Tuples/Tuples.h pp"// for makeTupleType29 #include "Common/utility.h" 30 #include "Common/SemanticError.h" 31 #include "GenPoly/Lvalue.h" // for referencesPermissable 32 #include "ResolvExpr/Unify.h" // for extractResultType 33 #include "Tuples/Tuples.h" // for makeTupleType 34 34 35 35 namespace ast { -
src/AST/Inspect.cpp
rbf4fe05 rec20ab9 24 24 #include "AST/Stmt.hpp" 25 25 #include "AST/Type.hpp" 26 #include "CodeGen/OperatorTable.h pp"26 #include "CodeGen/OperatorTable.h" 27 27 28 28 namespace ast { -
src/AST/Label.hpp
rbf4fe05 rec20ab9 21 21 22 22 #include "Node.hpp" 23 #include "Common/CodeLocation.h pp"23 #include "Common/CodeLocation.h" 24 24 25 25 namespace ast { -
src/AST/LinkageSpec.cpp
rbf4fe05 rec20ab9 20 20 #include <string> 21 21 22 #include "Common/CodeLocation.h pp"23 #include "Common/SemanticError.h pp"22 #include "Common/CodeLocation.h" 23 #include "Common/SemanticError.h" 24 24 25 25 namespace ast { -
src/AST/LinkageSpec.hpp
rbf4fe05 rec20ab9 19 19 20 20 #include "Bitfield.hpp" 21 #include "Common/CodeLocation.h pp"21 #include "Common/CodeLocation.h" 22 22 23 23 namespace ast { -
src/AST/Node.hpp
rbf4fe05 rec20ab9 20 20 #include <iosfwd> 21 21 22 #include "Common/ErrorObjects.h pp" // for SemanticErrorException22 #include "Common/ErrorObjects.h" // for SemanticErrorException 23 23 24 24 namespace ast { -
src/AST/ParseNode.hpp
rbf4fe05 rec20ab9 18 18 #include "Node.hpp" 19 19 20 #include "Common/CodeLocation.h pp"20 #include "Common/CodeLocation.h" 21 21 22 22 namespace ast { -
src/AST/Pass.hpp
rbf4fe05 rec20ab9 424 424 } 425 425 426 #include "Common/Stats.h pp"426 #include "Common/Stats.h" 427 427 428 428 namespace ast { -
src/AST/Pass.proto.hpp
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Pass. proto.hpp --7 // Pass.impl.hpp -- 8 8 // 9 9 // Author : Thierry Delisle … … 18 18 19 19 #include "Common/Iterate.hpp" 20 #include "Common/Stats/Heap.h pp"21 #include "Common/ Utility.hpp"20 #include "Common/Stats/Heap.h" 21 #include "Common/utility.h" 22 22 namespace ast { 23 23 template<typename core_t> class Pass; -
src/AST/Print.hpp
rbf4fe05 rec20ab9 19 19 20 20 #include "AST/Fwd.hpp" 21 #include "Common/Indenter.h pp"21 #include "Common/Indenter.h" 22 22 23 23 namespace ast { -
src/AST/Stmt.hpp
rbf4fe05 rec20ab9 24 24 #include "ParseNode.hpp" 25 25 #include "Visitor.hpp" 26 #include "Common/CodeLocation.h pp"26 #include "Common/CodeLocation.h" 27 27 28 28 // Must be included in *all* AST classes; should be #undef'd at the end of the file -
src/AST/SymbolTable.cpp
rbf4fe05 rec20ab9 23 23 #include "Inspect.hpp" 24 24 #include "Type.hpp" 25 #include "CodeGen/OperatorTable.h pp"// for isCtorDtorAssign26 #include "Common/SemanticError.h pp"27 #include "Common/Stats/Counter.h pp"28 #include "GenPoly/GenPoly.h pp"29 #include "InitTweak/InitTweak.h pp"30 #include "ResolvExpr/Cost.h pp"25 #include "CodeGen/OperatorTable.h" // for isCtorDtorAssign 26 #include "Common/SemanticError.h" 27 #include "Common/Stats/Counter.h" 28 #include "GenPoly/GenPoly.h" 29 #include "InitTweak/InitTweak.h" 30 #include "ResolvExpr/Cost.h" 31 31 #include "ResolvExpr/CandidateFinder.hpp" // for referenceToRvalueConversion 32 #include "ResolvExpr/Unify.h pp"33 #include "SymTab/Mangler.h pp"32 #include "ResolvExpr/Unify.h" 33 #include "SymTab/Mangler.h" 34 34 35 35 namespace ast { -
src/AST/SymbolTable.hpp
rbf4fe05 rec20ab9 21 21 #include "Fwd.hpp" 22 22 #include "Node.hpp" // for ptr, readonly 23 #include "Common/CodeLocation.h pp"24 #include "Common/PersistentMap.h pp"23 #include "Common/CodeLocation.h" 24 #include "Common/PersistentMap.h" 25 25 26 26 namespace ResolvExpr { -
src/AST/Type.cpp
rbf4fe05 rec20ab9 23 23 #include "Init.hpp" 24 24 #include "Inspect.hpp" 25 #include "Common/ Utility.hpp"// for copy, move26 #include "Tuples/Tuples.h pp"// for isTtype25 #include "Common/utility.h" // for copy, move 26 #include "Tuples/Tuples.h" // for isTtype 27 27 28 28 namespace ast { -
src/AST/TypeEnvironment.cpp
rbf4fe05 rec20ab9 29 29 #include "Print.hpp" 30 30 #include "Type.hpp" 31 #include "Common/Indenter.h pp"32 #include "ResolvExpr/ Typeops.hpp" // for occurs33 #include "ResolvExpr/WidenMode.h pp"34 #include "ResolvExpr/Unify.h pp" // for unifyInexact35 #include "Tuples/Tuples.h pp" // for isTtype31 #include "Common/Indenter.h" 32 #include "ResolvExpr/typeops.h" // for occurs 33 #include "ResolvExpr/WidenMode.h" 34 #include "ResolvExpr/Unify.h" // for unifyInexact 35 #include "Tuples/Tuples.h" // for isTtype 36 36 #include "CompilationState.hpp" 37 37 -
src/AST/TypeEnvironment.hpp
rbf4fe05 rec20ab9 28 28 #include "Type.hpp" 29 29 #include "TypeSubstitution.hpp" 30 #include "Common/Indenter.h pp"31 #include "ResolvExpr/WidenMode.h pp"30 #include "Common/Indenter.h" 31 #include "ResolvExpr/WidenMode.h" 32 32 33 33 namespace ast { -
src/AST/TypeSubstitution.cpp
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypeSubstitution.c pp--7 // TypeSubstitution.cc -- 8 8 // 9 9 // Author : Richard C. Bilson -
src/AST/TypeSubstitution.hpp
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // TypeSubstitution.h pp--7 // TypeSubstitution.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 16 16 #pragma once 17 17 18 #include <cassert> // for assert19 #include <list> // for list<>::iterator, _List_iterator18 #include <cassert> // for assert 19 #include <list> // for list<>::iterator, _List_iterator 20 20 #include <unordered_map> 21 21 #include <unordered_set> 22 #include <string> // for string, operator!=23 #include <utility> // for pair22 #include <string> // for string, operator!= 23 #include <utility> // for pair 24 24 25 #include "Fwd.hpp" // for UniqueId25 #include "Fwd.hpp" // for UniqueId 26 26 #include "ParseNode.hpp" 27 27 #include "Type.hpp" 28 #include "Common/SemanticError.h pp" // for SemanticError28 #include "Common/SemanticError.h" // for SemanticError 29 29 #include "Visitor.hpp" 30 30 #include "Decl.hpp" -
src/AST/Util.cpp
rbf4fe05 rec20ab9 20 20 #include "Pass.hpp" 21 21 #include "TranslationUnit.hpp" 22 #include "Common/ Utility.hpp"23 #include "GenPoly/ScopedSet.h pp"22 #include "Common/utility.h" 23 #include "GenPoly/ScopedSet.h" 24 24 25 25 #include <vector> -
src/BasicTypes-gen.cpp
rbf4fe05 rec20ab9 326 326 327 327 328 #define ConversionCost TOP_SRCDIR "src/ResolvExpr/ConversionCost.c pp"328 #define ConversionCost TOP_SRCDIR "src/ResolvExpr/ConversionCost.cc" 329 329 resetInput( file, ConversionCost, buffer, code, str ); 330 330 … … 405 405 406 406 407 #define CommonType TOP_SRCDIR "src/ResolvExpr/CommonType.c pp"407 #define CommonType TOP_SRCDIR "src/ResolvExpr/CommonType.cc" 408 408 resetInput( file, CommonType, buffer, code, str ); 409 409 … … 446 446 447 447 448 #define ManglerCommon TOP_SRCDIR "src/SymTab/ManglerCommon.c pp"448 #define ManglerCommon TOP_SRCDIR "src/SymTab/ManglerCommon.cc" 449 449 resetInput( file, ManglerCommon, buffer, code, str ); 450 450 -
src/CodeGen/CodeGenerator.cpp
rbf4fe05 rec20ab9 17 17 18 18 #include "AST/Print.hpp" 19 #include "OperatorTable.h pp"// for OperatorInfo, operatorLookup20 #include "CodeGen/GenType.h pp"// for genType19 #include "OperatorTable.h" // for OperatorInfo, operatorLookup 20 #include "CodeGen/GenType.h" // for genType 21 21 #include "Common/ToString.hpp" // for toString 22 #include "Common/UniqueName.h pp"// for UniqueName22 #include "Common/UniqueName.h" // for UniqueName 23 23 24 24 namespace CodeGen { -
src/CodeGen/CodeGenerator.hpp
rbf4fe05 rec20ab9 20 20 #include "AST/Fwd.hpp" 21 21 #include "AST/Pass.hpp" // for WithGuards, WithShortCircuiting, ... 22 #include "CodeGen/Options.h pp"// for Options23 #include "Common/Indenter.h pp"// for Indenter22 #include "CodeGen/Options.h" // for Options 23 #include "Common/Indenter.h" // for Indenter 24 24 25 25 -
src/CodeGen/module.mk
rbf4fe05 rec20ab9 18 18 CodeGen/CodeGenerator.cpp \ 19 19 CodeGen/CodeGenerator.hpp \ 20 CodeGen/GenType.c pp\21 CodeGen/GenType.h pp\22 CodeGen/OperatorTable.c pp\23 CodeGen/OperatorTable.h pp20 CodeGen/GenType.cc \ 21 CodeGen/GenType.h \ 22 CodeGen/OperatorTable.cc \ 23 CodeGen/OperatorTable.h 24 24 25 25 SRC += $(SRC_CODEGEN) \ 26 CodeGen/ FixMain.cpp\27 CodeGen/ FixMain.hpp\28 CodeGen/Fix Names.cpp\29 CodeGen/Fix Names.hpp\30 CodeGen/ Generate.cpp\31 CodeGen/ Generate.hpp\32 CodeGen/LinkOnce.c pp\33 CodeGen/LinkOnce.h pp\34 CodeGen/Options.h pp26 CodeGen/Generate.cc \ 27 CodeGen/Generate.h \ 28 CodeGen/FixMain.cc \ 29 CodeGen/FixMain.h \ 30 CodeGen/FixNames.cc \ 31 CodeGen/FixNames.h \ 32 CodeGen/LinkOnce.cc \ 33 CodeGen/LinkOnce.h \ 34 CodeGen/Options.h 35 35 36 36 SRCDEMANGLE += $(SRC_CODEGEN) -
src/Common/CodeLocationTools.cpp
rbf4fe05 rec20ab9 20 20 #include "AST/Pass.hpp" 21 21 #include "AST/TranslationUnit.hpp" 22 #include "Common/CodeLocation.h pp"22 #include "Common/CodeLocation.h" 23 23 24 24 namespace { -
src/Common/DeclStats.cpp
rbf4fe05 rec20ab9 19 19 #include "AST/Pass.hpp" 20 20 #include "AST/Print.hpp" 21 #include "Common/VectorMap.h pp"21 #include "Common/VectorMap.h" 22 22 23 23 #include <iostream> -
src/Common/ResolvProtoDump.cpp
rbf4fe05 rec20ab9 26 26 #include "AST/TranslationUnit.hpp" 27 27 #include "AST/Type.hpp" 28 #include "CodeGen/OperatorTable.h pp"28 #include "CodeGen/OperatorTable.h" 29 29 30 30 namespace { -
src/Common/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC_COMMON = \ 18 Common/Assert.c pp\19 Common/CodeLocation.h pp\18 Common/Assert.cc \ 19 Common/CodeLocation.h \ 20 20 Common/CodeLocationTools.hpp \ 21 21 Common/CodeLocationTools.cpp \ 22 22 Common/DeclStats.hpp \ 23 23 Common/DeclStats.cpp \ 24 Common/ErrorObjects.h pp\25 Common/Eval.c pp\26 Common/Eval.h pp\27 Common/Examine.c pp\28 Common/Examine.h pp\29 Common/FilterCombos.h pp\30 Common/Indenter.h pp\31 Common/Indenter.c pp\24 Common/ErrorObjects.h \ 25 Common/Eval.cc \ 26 Common/Eval.h \ 27 Common/Examine.cc \ 28 Common/Examine.h \ 29 Common/FilterCombos.h \ 30 Common/Indenter.h \ 31 Common/Indenter.cc \ 32 32 Common/Iterate.hpp \ 33 Common/PersistentMap.h pp\33 Common/PersistentMap.h \ 34 34 Common/ResolvProtoDump.hpp \ 35 35 Common/ResolvProtoDump.cpp \ 36 Common/ScopedMap.h pp\37 Common/SemanticError.c pp\38 Common/SemanticError.h pp\39 Common/Stats.h pp\40 Common/Stats/Base.h pp\41 Common/Stats/Counter.c pp\42 Common/Stats/Counter.h pp\43 Common/Stats/Heap.c pp\44 Common/Stats/Heap.h pp\45 Common/Stats/ResolveTime.c pp\46 Common/Stats/ResolveTime.h pp\47 Common/Stats/Stats.c pp\48 Common/Stats/Time.c pp\49 Common/Stats/Time.h pp\36 Common/ScopedMap.h \ 37 Common/SemanticError.cc \ 38 Common/SemanticError.h \ 39 Common/Stats.h \ 40 Common/Stats/Base.h \ 41 Common/Stats/Counter.cc \ 42 Common/Stats/Counter.h \ 43 Common/Stats/Heap.cc \ 44 Common/Stats/Heap.h \ 45 Common/Stats/ResolveTime.cc \ 46 Common/Stats/ResolveTime.h \ 47 Common/Stats/Stats.cc \ 48 Common/Stats/Time.cc \ 49 Common/Stats/Time.h \ 50 50 Common/ToString.hpp \ 51 Common/UniqueName.c pp\52 Common/UniqueName.h pp\53 Common/ Utility.hpp\54 Common/VectorMap.h pp51 Common/UniqueName.cc \ 52 Common/UniqueName.h \ 53 Common/utility.h \ 54 Common/VectorMap.h 55 55 56 56 SRC += $(SRC_COMMON) \ 57 Common/DebugMalloc.c pp57 Common/DebugMalloc.cc 58 58 59 59 SRCDEMANGLE += $(SRC_COMMON) -
src/CompilationState.cpp
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // CompilationState.c pp--7 // CompilationState.cc -- 8 8 // 9 9 // Author : Rob Schluntz -
src/Concurrency/Corun.cpp
rbf4fe05 rec20ab9 19 19 #include "AST/Stmt.hpp" 20 20 #include "AST/TranslationUnit.hpp" 21 #include "Common/UniqueName.h pp"21 #include "Common/UniqueName.h" 22 22 using namespace ast; 23 23 using namespace std; -
src/Concurrency/Keywords.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "Concurrency/Keywords.h pp"16 #include "Concurrency/Keywords.h" 17 17 18 18 #include <iostream> … … 26 26 #include "AST/DeclReplacer.hpp" 27 27 #include "AST/TranslationUnit.hpp" 28 #include "CodeGen/OperatorTable.h pp"29 #include "Common/Examine.h pp"30 #include "Common/ Utility.hpp"31 #include "Common/UniqueName.h pp"28 #include "CodeGen/OperatorTable.h" 29 #include "Common/Examine.h" 30 #include "Common/utility.h" 31 #include "Common/UniqueName.h" 32 32 #include "ControlStruct/LabelGenerator.hpp" 33 #include "InitTweak/InitTweak.h pp"34 #include "Virtual/Tables.h pp"33 #include "InitTweak/InitTweak.h" 34 #include "Virtual/Tables.h" 35 35 36 36 namespace Concurrency { -
src/Concurrency/Waitfor.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "Waitfor.h pp"16 #include "Waitfor.h" 17 17 18 18 #include <string> 19 19 20 20 #include "AST/Pass.hpp" 21 #include "Common/UniqueName.h pp"22 #include "InitTweak/InitTweak.h pp"23 #include "ResolvExpr/Resolver.h pp"21 #include "Common/UniqueName.h" 22 #include "InitTweak/InitTweak.h" 23 #include "ResolvExpr/Resolver.h" 24 24 25 25 #include "AST/Print.hpp" -
src/Concurrency/Waituntil.cpp
rbf4fe05 rec20ab9 24 24 #include "AST/Stmt.hpp" 25 25 #include "AST/Type.hpp" 26 #include "Common/UniqueName.h pp"26 #include "Common/UniqueName.h" 27 27 28 28 using namespace ast; -
src/Concurrency/Waituntil.hpp
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Wait until.hpp--7 // Waitfor.h -- 8 8 // 9 9 // Author : Thierry Delisle -
src/Concurrency/module.mk
rbf4fe05 rec20ab9 21 21 Concurrency/Corun.hpp \ 22 22 Concurrency/Keywords.cpp \ 23 Concurrency/Keywords.h pp\23 Concurrency/Keywords.h \ 24 24 Concurrency/Waitfor.cpp \ 25 Concurrency/Waitfor.h pp\25 Concurrency/Waitfor.h \ 26 26 Concurrency/Waituntil.cpp \ 27 27 Concurrency/Waituntil.hpp -
src/ControlStruct/ExceptDecl.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "ExceptDecl.h pp"16 #include "ExceptDecl.h" 17 17 18 18 #include <sstream> … … 23 23 #include "AST/Print.hpp" 24 24 #include "AST/Type.hpp" 25 #include "Virtual/Tables.h pp"25 #include "Virtual/Tables.h" 26 26 27 27 namespace ControlStruct { -
src/ControlStruct/ExceptTranslate.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "ExceptTranslate.h pp"16 #include "ExceptTranslate.h" 17 17 18 18 #include "AST/Expr.hpp" -
src/ControlStruct/module.mk
rbf4fe05 rec20ab9 17 17 SRC += \ 18 18 ControlStruct/ExceptDecl.cpp \ 19 ControlStruct/ExceptDecl.h pp\19 ControlStruct/ExceptDecl.h \ 20 20 ControlStruct/ExceptTranslate.cpp \ 21 ControlStruct/ExceptTranslate.h pp\21 ControlStruct/ExceptTranslate.h \ 22 22 ControlStruct/FixLabels.cpp \ 23 23 ControlStruct/FixLabels.hpp \ -
src/GenPoly/Box.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "Box.h pp"16 #include "Box.h" 17 17 18 18 #include "AST/Decl.hpp" // for Decl, FunctionDecl, ... … … 24 24 #include "AST/Vector.hpp" // for vector 25 25 #include "AST/GenericSubstitution.hpp" // for genericSubstitution 26 #include "CodeGen/OperatorTable.h pp"// for isAssignment26 #include "CodeGen/OperatorTable.h" // for isAssignment 27 27 #include "Common/Iterate.hpp" // for group_iterate 28 #include "Common/ScopedMap.h pp"// for ScopedMap28 #include "Common/ScopedMap.h" // for ScopedMap 29 29 #include "Common/ToString.hpp" // for toCString 30 #include "Common/UniqueName.h pp"// for UniqueName31 #include "GenPoly/FindFunction.h pp"// for findFunction32 #include "GenPoly/GenPoly.h pp"// for getFunctionType, ...33 #include "GenPoly/Lvalue.h pp"// for generalizedLvalue34 #include "GenPoly/ScopedSet.h pp"// for ScopedSet30 #include "Common/UniqueName.h" // for UniqueName 31 #include "GenPoly/FindFunction.h" // for findFunction 32 #include "GenPoly/GenPoly.h" // for getFunctionType, ... 33 #include "GenPoly/Lvalue.h" // for generalizedLvalue 34 #include "GenPoly/ScopedSet.h" // for ScopedSet 35 35 #include "GenPoly/ScrubTypeVars.hpp" // for scrubTypeVars, scrubAllTypeVars 36 #include "ResolvExpr/Unify.h pp"// for typesCompatible37 #include "SymTab/Mangler.h pp"// for mangle, mangleType36 #include "ResolvExpr/Unify.h" // for typesCompatible 37 #include "SymTab/Mangler.h" // for mangle, mangleType 38 38 39 39 namespace GenPoly { -
src/GenPoly/InstantiateGeneric.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "InstantiateGeneric.h pp"16 #include "InstantiateGeneric.h" 17 17 18 18 #include <cassert> // for assertf, assert … … 27 27 #include "AST/TranslationUnit.hpp" // for TranslationUnit 28 28 #include "AST/Vector.hpp" // for vector 29 #include "CodeGen/OperatorTable.h pp"// for isAssignment30 #include "Common/ScopedMap.h pp"// for ScopedMap31 #include "Common/UniqueName.h pp"// for UniqueName32 #include "GenPoly/GenPoly.h pp"// for isPolyType, typesPolyCompatible29 #include "CodeGen/OperatorTable.h" // for isAssignment 30 #include "Common/ScopedMap.h" // for ScopedMap 31 #include "Common/UniqueName.h" // for UniqueName 32 #include "GenPoly/GenPoly.h" // for isPolyType, typesPolyCompatible 33 33 #include "GenPoly/ScrubTypeVars.hpp" // for scrubAllTypeVars 34 34 #include "ResolvExpr/AdjustExprType.hpp" // for adjustExprType 35 #include "ResolvExpr/Unify.h pp"// for typesCompatible35 #include "ResolvExpr/Unify.h" // for typesCompatible 36 36 37 37 namespace GenPoly { -
src/GenPoly/Lvalue.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "Lvalue.h pp"16 #include "Lvalue.h" 17 17 18 18 #include <set> … … 24 24 #include "AST/LinkageSpec.hpp" // for Linkage 25 25 #include "AST/Pass.hpp" 26 #include "Common/SemanticError.h pp"// for SemanticWarning26 #include "Common/SemanticError.h" // for SemanticWarning 27 27 #include "Common/ToString.hpp" // for toCString 28 #include "Common/UniqueName.h pp"// for UniqueName29 #include "GenPoly/GenPoly.h pp"// for genFunctionType30 #include "ResolvExpr/ Typeops.hpp"// for typesCompatible31 #include "ResolvExpr/Unify.h pp"// for unify28 #include "Common/UniqueName.h" // for UniqueName 29 #include "GenPoly/GenPoly.h" // for genFunctionType 30 #include "ResolvExpr/typeops.h" // for typesCompatible 31 #include "ResolvExpr/Unify.h" // for unify 32 32 33 33 #if 0 -
src/GenPoly/ScrubTypeVars.cpp
rbf4fe05 rec20ab9 16 16 #include "ScrubTypeVars.hpp" 17 17 18 #include <utility> // for pair18 #include <utility> // for pair 19 19 20 20 #include "AST/Pass.hpp" 21 #include "GenPoly.h pp" // for mangleType, TyVarMap, align...22 #include "GenPoly/ErasableScopedMap.h pp" // for ErasableScopedMap<>::const_...23 #include "SymTab/Mangler.h pp" // for mangleType21 #include "GenPoly.h" // for mangleType, TyVarMap, alignof... 22 #include "GenPoly/ErasableScopedMap.h" // for ErasableScopedMap<>::const_it... 23 #include "SymTab/Mangler.h" // for mangleType 24 24 25 25 namespace GenPoly { -
src/GenPoly/ScrubTypeVars.hpp
rbf4fe05 rec20ab9 19 19 20 20 #include "AST/Fwd.hpp" // for Node 21 #include "GenPoly.h pp"// for TypeVarMap21 #include "GenPoly.h" // for TypeVarMap 22 22 23 23 namespace GenPoly { -
src/GenPoly/Specialize.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "Specialize.h pp"16 #include "Specialize.h" 17 17 18 18 #include "AST/Copy.hpp" // for deepCopy … … 20 20 #include "AST/Pass.hpp" // for Pass 21 21 #include "AST/TypeEnvironment.hpp" // for OpenVarSet, AssertionSet 22 #include "Common/UniqueName.h pp"// for UniqueName23 #include "GenPoly/GenPoly.h pp"// for getFunctionType24 #include "ResolvExpr/FindOpenVars.h pp"// for findOpenVars22 #include "Common/UniqueName.h" // for UniqueName 23 #include "GenPoly/GenPoly.h" // for getFunctionType 24 #include "ResolvExpr/FindOpenVars.h" // for findOpenVars 25 25 26 26 namespace GenPoly { -
src/GenPoly/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC_GENPOLY = \ 18 GenPoly/GenPoly.c pp\19 GenPoly/GenPoly.h pp\20 GenPoly/Lvalue2.c pp\21 GenPoly/Lvalue.h pp18 GenPoly/GenPoly.cc \ 19 GenPoly/GenPoly.h \ 20 GenPoly/Lvalue2.cc \ 21 GenPoly/Lvalue.h 22 22 23 23 SRC += $(SRC_GENPOLY) \ 24 24 GenPoly/Box.cpp \ 25 GenPoly/Box.h pp\26 GenPoly/ErasableScopedMap.h pp\27 GenPoly/FindFunction.c pp\28 GenPoly/FindFunction.h pp\25 GenPoly/Box.h \ 26 GenPoly/ErasableScopedMap.h \ 27 GenPoly/FindFunction.cc \ 28 GenPoly/FindFunction.h \ 29 29 GenPoly/InstantiateGeneric.cpp \ 30 GenPoly/InstantiateGeneric.h pp\30 GenPoly/InstantiateGeneric.h \ 31 31 GenPoly/Lvalue.cpp \ 32 GenPoly/ScopedSet.h pp\32 GenPoly/ScopedSet.h \ 33 33 GenPoly/ScrubTypeVars.cpp \ 34 34 GenPoly/ScrubTypeVars.hpp \ 35 35 GenPoly/Specialize.cpp \ 36 GenPoly/Specialize.h pp36 GenPoly/Specialize.h 37 37 38 38 SRCDEMANGLE += $(SRC_GENPOLY) -
src/InitTweak/FixInit.cpp
rbf4fe05 rec20ab9 1 #include "FixInit.h pp"1 #include "FixInit.h" 2 2 3 3 #include <stddef.h> // for NULL … … 22 22 #include "AST/SymbolTable.hpp" 23 23 #include "AST/Type.hpp" 24 #include "CodeGen/OperatorTable.h pp"// for isConstructor, isCtorDtor, isD...25 #include "Common/SemanticError.h pp"// for SemanticError24 #include "CodeGen/OperatorTable.h" // for isConstructor, isCtorDtor, isD... 25 #include "Common/SemanticError.h" // for SemanticError 26 26 #include "Common/ToString.hpp" // for toCString 27 #include "Common/UniqueName.h pp"// for UniqueName28 #include "FixGlobalInit.h pp"// for fixGlobalInit29 #include "GenInit.h pp"// for genCtorDtor30 #include "GenPoly/GenPoly.h pp"// for getFunctionType31 #include "ResolvExpr/Resolver.h pp"// for findVoidExpression32 #include "ResolvExpr/Unify.h pp"// for typesCompatible27 #include "Common/UniqueName.h" // for UniqueName 28 #include "FixGlobalInit.h" // for fixGlobalInit 29 #include "GenInit.h" // for genCtorDtor 30 #include "GenPoly/GenPoly.h" // for getFunctionType 31 #include "ResolvExpr/Resolver.h" // for findVoidExpression 32 #include "ResolvExpr/Unify.h" // for typesCompatible 33 33 #include "SymTab/GenImplicitCall.hpp" // for genImplicitCall 34 34 -
src/InitTweak/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC_INITTWEAK = \ 18 InitTweak/GenInit.c pp\19 InitTweak/GenInit.h pp\20 InitTweak/InitTweak.c pp\21 InitTweak/InitTweak.h pp18 InitTweak/GenInit.cc \ 19 InitTweak/GenInit.h \ 20 InitTweak/InitTweak.cc \ 21 InitTweak/InitTweak.h 22 22 23 23 SRC += $(SRC_INITTWEAK) \ 24 InitTweak/FixGlobalInit.c pp\25 InitTweak/FixGlobalInit.h pp\24 InitTweak/FixGlobalInit.cc \ 25 InitTweak/FixGlobalInit.h \ 26 26 InitTweak/FixInit.cpp \ 27 InitTweak/FixInit.h pp27 InitTweak/FixInit.h 28 28 29 29 SRCDEMANGLE += $(SRC_INITTWEAK) -
src/MakeLibCfa.cpp
rbf4fe05 rec20ab9 19 19 #include "AST/Fwd.hpp" 20 20 #include "AST/Pass.hpp" 21 #include "CodeGen/OperatorTable.h pp"22 #include "Common/UniqueName.h pp"21 #include "CodeGen/OperatorTable.h" 22 #include "Common/UniqueName.h" 23 23 24 24 namespace LibCfa { -
src/Makefile.am
rbf4fe05 rec20ab9 53 53 include Virtual/module.mk 54 54 55 $(addprefix $(srcdir)/, ResolvExpr/ConversionCost.c pp ResolvExpr/CommonType.cpp SymTab/ManglerCommon.cpp) : $(srcdir)/AST/BasicKind.hpp55 $(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cc ResolvExpr/CommonType.cc SymTab/ManglerCommon.cc) : $(srcdir)/AST/BasicKind.hpp 56 56 57 57 $(srcdir)/AST/BasicKind.hpp : BasicTypes-gen.cpp … … 65 65 ___driver_cfa_cpp_SOURCES = $(SRC) 66 66 ___driver_cfa_cpp_LDADD = -ldl $(LIBPROFILER) $(LIBTCMALLOC) 67 EXTRA_DIST = include/cassert include/optional BasicTypes-gen.c pp67 EXTRA_DIST = include/cassert include/optional BasicTypes-gen.cc 68 68 69 69 AM_CXXFLAGS = @HOST_FLAGS@ -Wno-deprecated -Wall -Wextra -Werror=return-type -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O3 -g -std=c++17 $(TCMALLOCFLAG) … … 73 73 cfa_cpplib_PROGRAMS += $(DEMANGLER) 74 74 EXTRA_PROGRAMS = ../driver/demangler 75 ___driver_demangler_SOURCES = SymTab/demangler.c pp# test driver for the demangler, also useful as a sanity check that libdemangle.a is complete75 ___driver_demangler_SOURCES = SymTab/demangler.cc # test driver for the demangler, also useful as a sanity check that libdemangle.a is complete 76 76 ___driver_demangler_LDADD = libdemangle.a -ldl # yywrap 77 77 noinst_LIBRARIES = $(LIBDEMANGLE) -
src/Parser/RunParser.cpp
rbf4fe05 rec20ab9 18 18 #include "AST/TranslationUnit.hpp" // for TranslationUnit 19 19 #include "Common/CodeLocationTools.hpp" // for forceFillCodeLocations 20 #include "Parser/DeclarationNode.h pp"// for DeclarationNode, buildList21 #include "Parser/TypedefTable.h pp"// for TypedefTable20 #include "Parser/DeclarationNode.h" // for DeclarationNode, buildList 21 #include "Parser/TypedefTable.h" // for TypedefTable 22 22 23 23 // Variables global to the parsing code. -
src/Parser/lex.ll
rbf4fe05 rec20ab9 44 44 45 45 #include "config.h" // configure info 46 #include "DeclarationNode.h pp"// for DeclarationNode47 #include "ExpressionNode.h pp"// for LabelNode48 #include "InitializerNode.h pp"// for InitializerNode49 #include "ParseNode.h pp"50 #include "ParserTypes.h pp"// for Token51 #include "StatementNode.h pp"// for CondCtl, ForCtrl52 #include "TypedefTable.h pp"46 #include "DeclarationNode.h" // for DeclarationNode 47 #include "ExpressionNode.h" // for LabelNode 48 #include "InitializerNode.h" // for InitializerNode 49 #include "ParseNode.h" 50 #include "ParserTypes.h" // for Token 51 #include "StatementNode.h" // for CondCtl, ForCtrl 52 #include "TypedefTable.h" 53 53 // This (generated) header must come late as it is missing includes. 54 54 #include "parser.hh" // generated info -
src/Parser/module.mk
rbf4fe05 rec20ab9 20 20 21 21 SRC += \ 22 Parser/DeclarationNode.c pp\23 Parser/DeclarationNode.h pp\24 Parser/ExpressionNode.c pp\25 Parser/ExpressionNode.h pp\26 Parser/InitializerNode.c pp\27 Parser/InitializerNode.h pp\22 Parser/DeclarationNode.cc \ 23 Parser/DeclarationNode.h \ 24 Parser/ExpressionNode.cc \ 25 Parser/ExpressionNode.h \ 26 Parser/InitializerNode.cc \ 27 Parser/InitializerNode.h \ 28 28 Parser/lex.ll \ 29 Parser/ParseNode.c pp\30 Parser/ParseNode.h pp\29 Parser/ParseNode.cc \ 30 Parser/ParseNode.h \ 31 31 Parser/parser.yy \ 32 Parser/ParserTypes.h pp\33 Parser/ ParserUtility.hpp\32 Parser/ParserTypes.h \ 33 Parser/parserutility.h \ 34 34 Parser/RunParser.cpp \ 35 35 Parser/RunParser.hpp \ 36 Parser/StatementNode.c pp\37 Parser/StatementNode.h pp\38 Parser/TypeData.c pp\39 Parser/TypeData.h pp\40 Parser/TypedefTable.c pp\41 Parser/TypedefTable.h pp36 Parser/StatementNode.cc \ 37 Parser/StatementNode.h \ 38 Parser/TypeData.cc \ 39 Parser/TypeData.h \ 40 Parser/TypedefTable.cc \ 41 Parser/TypedefTable.h 42 42 43 MOSTLYCLEANFILES += \ 44 Parser/lex.cc \ 45 Parser/parser.cc \ 46 Parser/parser.hh \ 47 Parser/parser.output 43 MOSTLYCLEANFILES += Parser/lex.cc Parser/parser.cc Parser/parser.hh Parser/parser.output -
src/Parser/parser.yy
rbf4fe05 rec20ab9 48 48 using namespace std; 49 49 50 #include "DeclarationNode.h pp"// for DeclarationNode, ...51 #include "ExpressionNode.h pp"// for ExpressionNode, ...52 #include "InitializerNode.h pp"// for InitializerNode, ...53 #include "ParserTypes.h pp"54 #include "StatementNode.h pp"// for build_...55 #include "TypedefTable.h pp"56 #include "TypeData.h pp"50 #include "DeclarationNode.h" // for DeclarationNode, ... 51 #include "ExpressionNode.h" // for ExpressionNode, ... 52 #include "InitializerNode.h" // for InitializerNode, ... 53 #include "ParserTypes.h" 54 #include "StatementNode.h" // for build_... 55 #include "TypedefTable.h" 56 #include "TypeData.h" 57 57 #include "AST/Type.hpp" // for BasicType, BasicKind 58 #include "Common/SemanticError.h pp"// error_str59 #include "Common/ Utility.hpp"// for maybeMoveBuild, maybeBuild, CodeLo...58 #include "Common/SemanticError.h" // error_str 59 #include "Common/utility.h" // for maybeMoveBuild, maybeBuild, CodeLo... 60 60 61 61 // lex uses __null in a boolean context, it's fine. -
src/ResolvExpr/Candidate.hpp
rbf4fe05 rec20ab9 20 20 #include <vector> 21 21 22 #include "Cost.h pp"22 #include "Cost.h" 23 23 #include "AST/Node.hpp" 24 24 #include "AST/TypeEnvironment.hpp" 25 #include "Common/Indenter.h pp"25 #include "Common/Indenter.h" 26 26 27 27 namespace ast { -
src/ResolvExpr/CandidateFinder.cpp
rbf4fe05 rec20ab9 17 17 18 18 #include <deque> 19 #include <iterator> // for back_inserter19 #include <iterator> // for back_inserter 20 20 #include <sstream> 21 21 #include <string> … … 25 25 #include "AdjustExprType.hpp" 26 26 #include "Candidate.hpp" 27 #include "CastCost.hpp" // for castCost27 #include "CastCost.hpp" // for castCost 28 28 #include "CompilationState.hpp" 29 #include "ConversionCost.h pp" // for conversionCast30 #include "Cost.h pp"29 #include "ConversionCost.h" // for conversionCast 30 #include "Cost.h" 31 31 #include "ExplodedArg.hpp" 32 32 #include "PolyCost.hpp" 33 #include "RenameVars.h pp" // for renameTyVars34 #include "Resolver.h pp"35 #include "ResolveTypeof.h pp"33 #include "RenameVars.h" // for renameTyVars 34 #include "Resolver.h" 35 #include "ResolveTypeof.h" 36 36 #include "SatisfyAssertions.hpp" 37 37 #include "SpecCost.hpp" 38 #include " Typeops.hpp" // for combos39 #include "Unify.h pp"40 #include "WidenMode.h pp"38 #include "typeops.h" // for combos 39 #include "Unify.h" 40 #include "WidenMode.h" 41 41 #include "AST/Expr.hpp" 42 42 #include "AST/Node.hpp" … … 45 45 #include "AST/SymbolTable.hpp" 46 46 #include "AST/Type.hpp" 47 #include "Common/ Utility.hpp" // for move, copy48 #include "SymTab/Mangler.h pp"49 #include "Tuples/Tuples.h pp" // for handleTupleAssignment50 #include "InitTweak/InitTweak.h pp" // for getPointerBase51 52 #include "Common/Stats/Counter.h pp"47 #include "Common/utility.h" // for move, copy 48 #include "SymTab/Mangler.h" 49 #include "Tuples/Tuples.h" // for handleTupleAssignment 50 #include "InitTweak/InitTweak.h" // for getPointerBase 51 52 #include "Common/Stats/Counter.h" 53 53 54 54 #include "AST/Inspect.hpp" // for getFunctionName … … 2138 2138 } 2139 2139 2140 // get the valueE(...) ApplicationExpr that returns the enum value 2141 const ast::Expr * getValueEnumCall( 2142 const ast::Expr * expr, 2143 const ResolvExpr::ResolveContext & context, const ast::TypeEnvironment & env ) { 2144 auto callExpr = new ast::UntypedExpr( 2145 expr->location, new ast::NameExpr( expr->location, "valueE"), {expr} ); 2146 CandidateFinder finder( context, env ); 2147 finder.find( callExpr ); 2148 CandidateList winners = findMinCost( finder.candidates ); 2149 if (winners.size() != 1) { 2150 SemanticError( callExpr, "Ambiguous expression in valueE..." ); 2151 } 2152 CandidateRef & choice = winners.front(); 2153 return choice->expr; 2154 } 2155 2140 2156 const ast::Expr * createCondExpr( const ast::Expr * expr ) { 2141 2157 assert( expr ); -
src/ResolvExpr/CandidateFinder.hpp
rbf4fe05 rec20ab9 70 70 const ast::Expr * expr, Cost & cost ); 71 71 72 /// Get the valueE application that returns the enum's value. 73 const ast::Expr * getValueEnumCall( const ast::Expr * expr, 74 const ResolveContext & context, const ast::TypeEnvironment & env ); 75 72 76 /// Wrap an expression to convert the result to a conditional result. 73 77 const ast::Expr * createCondExpr( const ast::Expr * expr ); -
src/ResolvExpr/CandidatePrinter.cpp
rbf4fe05 rec20ab9 24 24 #include "AST/TranslationUnit.hpp" 25 25 #include "ResolvExpr/CandidateFinder.hpp" 26 #include "ResolvExpr/Resolver.h pp"26 #include "ResolvExpr/Resolver.h" 27 27 28 28 namespace ResolvExpr { -
src/ResolvExpr/CastCost.hpp
rbf4fe05 rec20ab9 16 16 #pragma once 17 17 18 #include "ResolvExpr/Cost.h" // for Cost 19 18 20 namespace ast { 19 21 class SymbolTable; … … 23 25 24 26 namespace ResolvExpr { 25 26 class Cost;27 27 28 28 Cost castCost( -
src/ResolvExpr/CommonType.hpp
rbf4fe05 rec20ab9 18 18 #include "AST/Fwd.hpp" 19 19 #include "AST/TypeEnvironment.hpp" // for AssertionSet, OpenVarSet 20 #include "WidenMode.h pp"// for WidenMode20 #include "WidenMode.h" // for WidenMode 21 21 22 22 namespace ResolvExpr { -
src/ResolvExpr/ExplodedArg.cpp
rbf4fe05 rec20ab9 16 16 #include "ExplodedArg.hpp" 17 17 18 #include "Tuples/Explode.h pp" // for Tuples::explode18 #include "Tuples/Explode.h" // for Tuples::explode 19 19 20 20 namespace ResolvExpr { -
src/ResolvExpr/ExplodedArg.hpp
rbf4fe05 rec20ab9 19 19 20 20 #include "Candidate.hpp" // for Candidate, CandidateList 21 #include "Cost.h pp"// for Cost21 #include "Cost.h" // for Cost 22 22 #include "AST/Expr.hpp" 23 23 #include "AST/Node.hpp" // for ptr -
src/ResolvExpr/SatisfyAssertions.cpp
rbf4fe05 rec20ab9 28 28 #include "CandidateFinder.hpp" 29 29 #include "CommonType.hpp" 30 #include "Cost.h pp"31 #include "RenameVars.h pp"30 #include "Cost.h" 31 #include "RenameVars.h" 32 32 #include "SpecCost.hpp" 33 #include " Typeops.hpp"34 #include "Unify.h pp"33 #include "typeops.h" 34 #include "Unify.h" 35 35 #include "AST/Decl.hpp" 36 36 #include "AST/Expr.hpp" … … 40 40 #include "AST/SymbolTable.hpp" 41 41 #include "AST/TypeEnvironment.hpp" 42 #include "FindOpenVars.h pp"43 #include "Common/FilterCombos.h pp"44 #include "Common/Indenter.h pp"45 #include "GenPoly/GenPoly.h pp"46 #include "SymTab/Mangler.h pp"42 #include "FindOpenVars.h" 43 #include "Common/FilterCombos.h" 44 #include "Common/Indenter.h" 45 #include "GenPoly/GenPoly.h" 46 #include "SymTab/Mangler.h" 47 47 48 48 namespace ResolvExpr { -
src/ResolvExpr/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC_RESOLVEXPR = \ 18 ResolvExpr/AdjustExprType.c pp\18 ResolvExpr/AdjustExprType.cc \ 19 19 ResolvExpr/AdjustExprType.hpp \ 20 20 ResolvExpr/Candidate.cpp \ … … 22 22 ResolvExpr/CandidateFinder.hpp \ 23 23 ResolvExpr/Candidate.hpp \ 24 ResolvExpr/CastCost.c pp\24 ResolvExpr/CastCost.cc \ 25 25 ResolvExpr/CastCost.hpp \ 26 ResolvExpr/CommonType.c pp\26 ResolvExpr/CommonType.cc \ 27 27 ResolvExpr/CommonType.hpp \ 28 ResolvExpr/ConversionCost.c pp\29 ResolvExpr/ConversionCost.h pp\30 ResolvExpr/Cost.h pp\31 ResolvExpr/CurrentObject.c pp\32 ResolvExpr/CurrentObject.h pp\28 ResolvExpr/ConversionCost.cc \ 29 ResolvExpr/ConversionCost.h \ 30 ResolvExpr/Cost.h \ 31 ResolvExpr/CurrentObject.cc \ 32 ResolvExpr/CurrentObject.h \ 33 33 ResolvExpr/ExplodedArg.cpp \ 34 34 ResolvExpr/ExplodedArg.hpp \ 35 ResolvExpr/FindOpenVars.c pp\36 ResolvExpr/FindOpenVars.h pp\37 ResolvExpr/PolyCost.c pp\35 ResolvExpr/FindOpenVars.cc \ 36 ResolvExpr/FindOpenVars.h \ 37 ResolvExpr/PolyCost.cc \ 38 38 ResolvExpr/PolyCost.hpp \ 39 ResolvExpr/PtrsAssignable.c pp\39 ResolvExpr/PtrsAssignable.cc \ 40 40 ResolvExpr/PtrsAssignable.hpp \ 41 ResolvExpr/PtrsCastable.c pp\41 ResolvExpr/PtrsCastable.cc \ 42 42 ResolvExpr/PtrsCastable.hpp \ 43 ResolvExpr/RenameVars.c pp\44 ResolvExpr/RenameVars.h pp\45 ResolvExpr/Resolver.c pp\46 ResolvExpr/Resolver.h pp\47 ResolvExpr/ResolveTypeof.c pp\48 ResolvExpr/ResolveTypeof.h pp\43 ResolvExpr/RenameVars.cc \ 44 ResolvExpr/RenameVars.h \ 45 ResolvExpr/Resolver.cc \ 46 ResolvExpr/Resolver.h \ 47 ResolvExpr/ResolveTypeof.cc \ 48 ResolvExpr/ResolveTypeof.h \ 49 49 ResolvExpr/ResolveMode.hpp \ 50 50 ResolvExpr/SatisfyAssertions.cpp \ 51 51 ResolvExpr/SatisfyAssertions.hpp \ 52 ResolvExpr/SpecCost.c pp\52 ResolvExpr/SpecCost.cc \ 53 53 ResolvExpr/SpecCost.hpp \ 54 ResolvExpr/ Typeops.hpp\55 ResolvExpr/Unify.c pp\56 ResolvExpr/Unify.h pp\57 ResolvExpr/WidenMode.h pp54 ResolvExpr/typeops.h \ 55 ResolvExpr/Unify.cc \ 56 ResolvExpr/Unify.h \ 57 ResolvExpr/WidenMode.h 58 58 59 59 SRC += $(SRC_RESOLVEXPR) \ -
src/SymTab/GenImplicitCall.cpp
rbf4fe05 rec20ab9 23 23 #include "AST/Stmt.hpp" // for ExprStmt 24 24 #include "AST/Type.hpp" // for ArrayType, BasicType, ... 25 #include "CodeGen/OperatorTable.h pp"// for isCtorDtor26 #include "Common/UniqueName.h pp"// for UniqueName27 #include "Common/ Utility.hpp"// for splice25 #include "CodeGen/OperatorTable.h" // for isCtorDtor 26 #include "Common/UniqueName.h" // for UniqueName 27 #include "Common/utility.h" // for splice 28 28 29 29 namespace SymTab { -
src/SymTab/GenImplicitCall.hpp
rbf4fe05 rec20ab9 16 16 #pragma once 17 17 18 #include "InitTweak/InitTweak.h pp" // for InitExpander18 #include "InitTweak/InitTweak.h" // for InitExpander 19 19 20 20 namespace SymTab { -
src/SymTab/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC_SYMTAB = \ 18 SymTab/FixFunction.c pp\19 SymTab/FixFunction.h pp\18 SymTab/FixFunction.cc \ 19 SymTab/FixFunction.h \ 20 20 SymTab/GenImplicitCall.cpp \ 21 21 SymTab/GenImplicitCall.hpp \ 22 SymTab/Mangler.c pp\23 SymTab/ManglerCommon.c pp\24 SymTab/Mangler.h pp22 SymTab/Mangler.cc \ 23 SymTab/ManglerCommon.cc \ 24 SymTab/Mangler.h 25 25 26 26 SRC += $(SRC_SYMTAB) 27 27 28 28 SRCDEMANGLE += $(SRC_SYMTAB) \ 29 SymTab/Demangle.c pp\30 SymTab/Demangle.h pp29 SymTab/Demangle.cc \ 30 SymTab/Demangle.h -
src/Tuples/TupleExpansion.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "Tuples.h pp"16 #include "Tuples.h" 17 17 18 18 #include "AST/Pass.hpp" 19 #include "Common/ScopedMap.h pp"19 #include "Common/ScopedMap.h" 20 20 21 21 namespace Tuples { -
src/Tuples/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC_TUPLES = \ 18 Tuples/Explode.c pp\19 Tuples/Explode.h pp\20 Tuples/TupleAssignment.c pp\18 Tuples/Explode.cc \ 19 Tuples/Explode.h \ 20 Tuples/TupleAssignment.cc \ 21 21 Tuples/TupleExpansion.cpp \ 22 Tuples/Tuples.c pp\23 Tuples/Tuples.h pp22 Tuples/Tuples.cc \ 23 Tuples/Tuples.h 24 24 25 25 SRC += $(SRC_TUPLES) -
src/Validate/Autogen.cpp
rbf4fe05 rec20ab9 16 16 #include "Autogen.hpp" 17 17 18 #include <algorithm> // for count_if19 #include <cassert> // for strict_dynamic_cast, assert, a...20 #include <iterator> // for back_insert_iterator, back_ins...21 #include <list> // for list, _List_iterator, list<>::...22 #include <set> // for set, _Rb_tree_const_iterator23 #include <utility> // for pair24 #include <vector> // for vector18 #include <algorithm> // for count_if 19 #include <cassert> // for strict_dynamic_cast, assert, assertf 20 #include <iterator> // for back_insert_iterator, back_inserter 21 #include <list> // for list, _List_iterator, list<>::iter... 22 #include <set> // for set, _Rb_tree_const_iterator 23 #include <utility> // for pair 24 #include <vector> // for vector 25 25 26 26 #include "AST/Attribute.hpp" … … 34 34 #include "AST/Stmt.hpp" 35 35 #include "AST/SymbolTable.hpp" 36 #include "CodeGen/OperatorTable.h pp"// for isCtorDtor, isCtorDtorAssign37 #include "Common/ScopedMap.h pp" // for ScopedMap<>::const_iterator, S...38 #include "Common/ Utility.hpp"// for cloneAll, operator+39 #include "GenPoly/ScopedSet.h pp"// for ScopedSet, ScopedSet<>::iterator40 #include "InitTweak/GenInit.h pp"// for fixReturnStatements41 #include "InitTweak/InitTweak.h pp"// for isAssignment, isCopyConstructor36 #include "CodeGen/OperatorTable.h" // for isCtorDtor, isCtorDtorAssign 37 #include "Common/ScopedMap.h" // for ScopedMap<>::const_iterator, Scope... 38 #include "Common/utility.h" // for cloneAll, operator+ 39 #include "GenPoly/ScopedSet.h" // for ScopedSet, ScopedSet<>::iterator 40 #include "InitTweak/GenInit.h" // for fixReturnStatements 41 #include "InitTweak/InitTweak.h" // for isAssignment, isCopyConstructor 42 42 #include "SymTab/GenImplicitCall.hpp" // for genImplicitCall 43 #include "SymTab/Mangler.h pp"// for Mangler43 #include "SymTab/Mangler.h" // for Mangler 44 44 #include "CompilationState.hpp" 45 45 -
src/Validate/CompoundLiteral.cpp
rbf4fe05 rec20ab9 20 20 #include "AST/Pass.hpp" 21 21 #include "AST/TranslationUnit.hpp" 22 #include "Common/UniqueName.h pp"22 #include "Common/UniqueName.h" 23 23 24 24 namespace Validate { -
src/Validate/EliminateTypedef.cpp
rbf4fe05 rec20ab9 21 21 #include "AST/Pass.hpp" 22 22 #include "AST/Stmt.hpp" 23 #include "Common/ Utility.hpp"23 #include "Common/utility.h" 24 24 25 25 namespace Validate { -
src/Validate/EnumAndPointerDecay.cpp
rbf4fe05 rec20ab9 20 20 #include "AST/Pass.hpp" 21 21 #include "AST/Type.hpp" 22 #include "SymTab/FixFunction.h pp"22 #include "SymTab/FixFunction.h" 23 23 #include "Validate/NoIdSymbolTable.hpp" 24 24 -
src/Validate/FindSpecialDecls.cpp
rbf4fe05 rec20ab9 14 14 // 15 15 16 #include "Validate/FindSpecialDecls.h pp"16 #include "Validate/FindSpecialDecls.h" 17 17 18 18 #include "AST/Decl.hpp" -
src/Validate/FixQualifiedTypes.cpp
rbf4fe05 rec20ab9 21 21 #include "AST/TranslationUnit.hpp" 22 22 #include "Common/ToString.hpp" // for toString 23 #include "SymTab/Mangler.h pp"// for Mangler23 #include "SymTab/Mangler.h" // for Mangler 24 24 #include "Validate/NoIdSymbolTable.hpp" 25 25 -
src/Validate/FixReturnTypes.cpp
rbf4fe05 rec20ab9 20 20 #include "AST/Type.hpp" 21 21 #include "CodeGen/CodeGenerator.hpp" 22 #include "ResolvExpr/Unify.h pp"22 #include "ResolvExpr/Unify.h" 23 23 24 24 namespace Validate { -
src/Validate/ForallPointerDecay.cpp
rbf4fe05 rec20ab9 20 20 #include "AST/DeclReplacer.hpp" 21 21 #include "AST/Pass.hpp" 22 #include "CodeGen/OperatorTable.h pp"23 #include "Common/CodeLocation.h pp"22 #include "CodeGen/OperatorTable.h" 23 #include "Common/CodeLocation.h" 24 24 #include "Common/ToString.hpp" 25 #include "Common/ Utility.hpp"26 #include "SymTab/FixFunction.h pp"25 #include "Common/utility.h" 26 #include "SymTab/FixFunction.h" 27 27 28 28 namespace Validate { -
src/Validate/ImplementEnumFunc.cpp
rbf4fe05 rec20ab9 2 2 #include "AST/Pass.hpp" 3 3 #include "AST/TranslationUnit.hpp" 4 #include "CodeGen/OperatorTable.h pp" // for isCtorDtor, isCtorDtorAssign5 #include "InitTweak/InitTweak.h pp" // for isAssignment, isCopyConstructor4 #include "CodeGen/OperatorTable.h" // for isCtorDtor, isCtorDtorAssign 5 #include "InitTweak/InitTweak.h" // for isAssignment, isCopyConstructor 6 6 namespace Validate { 7 7 … … 28 28 proto_linkage{ast::Linkage::Cforall} {} 29 29 30 void genAttrFunctions(); 31 void genSuccPredPosn(); 32 // void genSuccPredDecl(); 33 34 void appendReturnThis(ast::FunctionDecl* decl) { 35 assert(1 <= decl->params.size()); 36 assert(1 == decl->returns.size()); 37 assert(decl->stmts); 38 39 const CodeLocation& location = (decl->stmts->kids.empty()) 40 ? decl->stmts->location 41 : decl->stmts->kids.back()->location; 42 const ast::DeclWithType* thisParam = decl->params.front(); 43 decl->stmts.get_and_mutate()->push_back(new ast::ReturnStmt( 44 location, new ast::VariableExpr(location, thisParam))); 45 } 46 void genAttrStandardFuncs() { 47 ast::FunctionDecl* (EnumAttrFuncGenerator::*standardProtos[4])() 48 const = {&EnumAttrFuncGenerator::genCtorProto, 49 &EnumAttrFuncGenerator::genCopyProto, 50 &EnumAttrFuncGenerator::genDtorProto, 51 &EnumAttrFuncGenerator::genAssignProto}; 52 for (auto& generator : standardProtos) { 53 ast::FunctionDecl* decl = (this->*generator)(); 54 produceForwardDecl(decl); 55 genFuncBody(decl); 56 if (CodeGen::isAssignment(decl->name)) { 57 appendReturnThis(decl); 58 } 59 produceDecl(decl); 60 } 61 } 62 30 63 private: 31 64 const CodeLocation& getLocation() const { return decl->location; } … … 40 73 const ast::Decl* getDecl() const { return decl; } 41 74 42 // Implement Bounded trait 43 void genBoundedFunctions(); 44 ast::FunctionDecl* genBoundedProto(const char *) const; 45 void genBoundedBody(ast::FunctionDecl* func) const; 46 47 // Implement Serial trait 75 // Implement Bounded trait for enum 76 void genBoundedFunctions(); 77 // Implement Serial trait for enum 48 78 void genSerialTraitFuncs(); 49 ast::FunctionDecl* genFromIntProto() const; 50 ast::FunctionDecl* genFromInstanceProto() const; 51 ast::FunctionDecl* genInstToInstFuncProto(const char* func) const; 52 void genFromIntBody(ast::FunctionDecl *) const; 53 void genFromInstanceBody(ast::FunctionDecl *) const; 54 void genSuccPredBody(ast::FunctionDecl *, const char *) const; 55 56 // Implement TypedEnum trait 57 void genTypedEnumFuncs(); 58 void genTypedEnumFunction(const ast::EnumAttribute attr); 79 80 // Bounded trait 81 ast::FunctionDecl* genLowerBoundProto() const; 82 ast::FunctionDecl* genUpperBoundProto() const; 83 void genLowerBoundBody(ast::FunctionDecl* func) const; 84 void genUpperBoundBody(ast::FunctionDecl* func) const; 85 59 86 ast::FunctionDecl* genPosnProto() const; 60 87 ast::FunctionDecl* genLabelProto() const; 61 88 ast::FunctionDecl* genValueProto() const; 62 void genValueOrLabelBody( 63 ast::FunctionDecl* func, ast::ObjectDecl* arrDecl) const; 64 void genPosnBody(ast::FunctionDecl* func) const; 65 89 90 // Serial trait 91 ast::FunctionDecl* genFromIntProto() const; 92 ast::FunctionDecl* genFromInstanceProto() const; 93 ast::FunctionDecl* genSuccProto() const; 94 ast::FunctionDecl* genPredProto() const; 95 96 void genFromIntBody(ast::FunctionDecl *) const; 97 void genFromInstanceBody(ast::FunctionDecl *) const; 66 98 //////////////// 99 100 ast::FunctionDecl* genSuccPosProto() const; 101 ast::FunctionDecl* genPredPosProto() const; 67 102 68 103 // --------------------------------------------------- … … 86 121 } 87 122 123 /// E = EnumAttrType<T>` 124 /// `void ?{}(E & _dst)`. 125 ast::FunctionDecl* genCtorProto() const { 126 return genProto("?{}", {dstParam()}, {}); 127 } 128 129 /// void ?{}(E & _dst, E _src)`. 130 ast::FunctionDecl* genCopyProto() const { 131 return genProto("?{}", {dstParam(), srcParam()}, {}); 132 } 133 134 ///`void ^?{}(E & _dst)`. 135 ast::FunctionDecl* genDtorProto() const { 136 // The destructor must be mutex on a concurrent type. 137 return genProto("^?{}", {dstParam()}, {}); 138 } 139 140 /// `E ?{}(E & _dst, E _src)`. 141 ast::FunctionDecl* genAssignProto() const { 142 // Only the name is different, so just reuse the generation function. 143 auto retval = srcParam(); 144 retval->name = "_ret"; 145 return genProto("?=?", {dstParam(), srcParam()}, {retval}); 146 } 147 148 void genFuncBody(ast::FunctionDecl* func) { 149 const CodeLocation& location = func->location; 150 auto& params = func->params; 151 if (InitTweak::isCopyConstructor(func) || 152 InitTweak::isAssignment(func)) { 153 assert(2 == params.size()); 154 auto dstParam = params.front().strict_as<ast::ObjectDecl>(); 155 auto srcParam = params.back().strict_as<ast::ObjectDecl>(); 156 func->stmts = genCopyBody(location, dstParam, srcParam); 157 } else { 158 assert(1 == params.size()); 159 // Default constructor and destructor is empty. 160 func->stmts = new ast::CompoundStmt(location); 161 // Add unused attribute to parameter to silence warnings. 162 addUnusedAttribute(params.front()); 163 164 // Just an extra step to make the forward and declaration match. 165 if (forwards.empty()) return; 166 ast::FunctionDecl* fwd = strict_dynamic_cast<ast::FunctionDecl*>( 167 forwards.back().get_and_mutate()); 168 addUnusedAttribute(fwd->params.front()); 169 } 170 } 171 172 const ast::CompoundStmt* genCopyBody( const CodeLocation& location, 173 const ast::ObjectDecl* dstParam, const ast::ObjectDecl* srcParam) { 174 return new ast::CompoundStmt( 175 location, 176 {new ast::ExprStmt( 177 location, 178 new ast::UntypedExpr( 179 location, new ast::NameExpr(location, "__builtin_memcpy"), 180 { 181 new ast::AddressExpr( location, 182 new ast::VariableExpr( location, dstParam ) ), 183 new ast::AddressExpr( location, 184 new ast::VariableExpr( location, srcParam ) ), 185 new ast::SizeofExpr( location, srcParam->type ), 186 }))}); 187 } 188 189 void genDtorBody(ast::FunctionDecl* func) { 190 const CodeLocation& location = func->location; 191 auto& params = func->params; 192 assert(1 == params.size()); 193 func->stmts = new ast::CompoundStmt(location); 194 addUnusedAttribute(params.front()); 195 196 // Just an extra step to make the forward and declaration match. 197 if (forwards.empty()) return; 198 ast::FunctionDecl* fwd = strict_dynamic_cast<ast::FunctionDecl*>( 199 forwards.back().get_and_mutate()); 200 addUnusedAttribute(fwd->params.front()); 201 } 202 203 // ast::FunctionDecl* 88 204 // ---------------------------------------------------- 205 206 ast::FunctionDecl* genSuccPredFunc(bool succ); 89 207 90 208 const ast::Init* getAutoInit(const ast::Init* prev) const; … … 96 214 const ast::EnumAttribute attr, const CodeLocation& location, 97 215 std::vector<ast::ptr<ast::Init>>& inits) const; 216 void genValueOrLabelBody( 217 ast::FunctionDecl* func, ast::ObjectDecl* arrDecl) const; 218 void genPosnBody(ast::FunctionDecl* func) const; 219 void genAttributesDecls(const ast::EnumAttribute attr); 98 220 }; 99 221 … … 252 374 } 253 375 254 void EnumAttrFuncGenerator::genSuccPredBody(ast::FunctionDecl * func, const char* opt) const {255 auto params = func->params;256 assert( params.size() == 1 );257 auto param = params.front();258 auto enumToInt = new ast::CastExpr(259 func->location,260 new ast::VariableExpr(func->location, param),261 new ast::BasicType(ast::BasicKind::UnsignedInt),262 ast::GeneratedFlag::ExplicitCast263 );264 ast::UntypedExpr* addOneExpr = ast::UntypedExpr::createCall( func->location,265 opt,266 {enumToInt,267 ast::ConstantExpr::from_int(func->location, 1)}268 );269 auto intToEnum = new ast::CastExpr(270 func->location,271 addOneExpr,272 new ast::EnumInstType( decl ),273 ast::GeneratedFlag::ExplicitCast274 );275 func->stmts = new ast::CompoundStmt(276 func->location, {277 new ast::ReturnStmt(278 func->location,279 intToEnum280 )281 }282 );283 }284 285 286 376 void EnumAttrFuncGenerator::genSerialTraitFuncs() { 287 ast::FunctionDecl * protos[4] = { 288 genFromIntProto(), 289 genFromInstanceProto(), 290 genInstToInstFuncProto("succ"), 291 genInstToInstFuncProto("pred") 292 }; 293 for (auto& proto: protos) produceForwardDecl(proto); 294 genFromIntBody(protos[0]); 295 genFromInstanceBody(protos[1]); 296 genSuccPredBody(protos[2], "?+?"); 297 genSuccPredBody(protos[3], "?-?"); 298 for (auto& proto: protos) produceDecl(proto); 299 } 300 301 ast::FunctionDecl* EnumAttrFuncGenerator::genInstToInstFuncProto(const char * func) const { 302 return genProto( 303 func, 377 auto fromIntProto = genFromIntProto(); 378 produceForwardDecl(fromIntProto); 379 genFromIntBody(fromIntProto); 380 produceDecl(fromIntProto); 381 382 auto fromInstanceProto = genFromInstanceProto(); 383 produceForwardDecl(fromInstanceProto); 384 genFromInstanceBody(fromInstanceProto); 385 produceDecl(fromInstanceProto); 386 387 auto succProto = genSuccProto(); 388 auto predProto = genPredProto(); 389 produceForwardDecl(succProto); 390 produceForwardDecl(predProto); 391 } 392 393 ast::FunctionDecl* EnumAttrFuncGenerator::genSuccProto() const { 394 return genProto( 395 "succ", 304 396 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 305 397 {new ast::ObjectDecl(getLocation(), "_ret", … … 307 399 } 308 400 309 ast::FunctionDecl* EnumAttrFuncGenerator::genBoundedProto(const char * func) const { 310 return genProto(func, {}, { 401 ast::FunctionDecl* EnumAttrFuncGenerator::genPredProto() const { 402 return genProto( 403 "pred", 404 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 405 {new ast::ObjectDecl(getLocation(), "_ret", 406 new ast::EnumInstType(decl))}); 407 } 408 409 ast::FunctionDecl* EnumAttrFuncGenerator::genLowerBoundProto() const { 410 return genProto("lowerBound", {}, { 311 411 new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl)) 312 412 }); 313 413 } 314 414 315 void EnumAttrFuncGenerator::genBoundedBody(ast::FunctionDecl* func) const { 415 ast::FunctionDecl* EnumAttrFuncGenerator::genUpperBoundProto() const { 416 return genProto("upperBound", {}, { 417 new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl)) 418 }); 419 } 420 421 void EnumAttrFuncGenerator::genLowerBoundBody(ast::FunctionDecl* func) const { 316 422 const CodeLocation & loc = func->location; 317 auto mem = func->name=="lowerBound"? decl->members.front() : decl->members.back(); 423 auto mem = decl->members.front(); 424 // auto expr = new ast::QualifiedNameExpr( loc, decl, mem->name ); 425 // expr->result = new ast::EnumInstType( decl ); 318 426 auto expr = new ast::NameExpr( loc, mem->name ); 319 427 func->stmts = new ast::CompoundStmt( loc, {new ast::ReturnStmt(loc, expr)}); 320 428 } 321 429 430 void EnumAttrFuncGenerator::genUpperBoundBody(ast::FunctionDecl* func) const { 431 const CodeLocation & loc = func->location; 432 auto mem = decl->members.back(); 433 auto expr = new ast::NameExpr( loc, mem->name ); 434 // expr->result = new ast::EnumInstType( decl ); 435 func->stmts = new ast::CompoundStmt( loc, {new ast::ReturnStmt(loc, expr)}); 436 } 437 322 438 void EnumAttrFuncGenerator::genBoundedFunctions() { 323 ast::FunctionDecl * boundedProtos[2] = {genBoundedProto("upperBound"), genBoundedProto("lowerBound")}; 324 for (auto & protos: boundedProtos) { 325 produceForwardDecl(protos); 326 genBoundedBody(protos); 327 produceDecl(protos); 328 } 439 ast::FunctionDecl * upperDecl = genUpperBoundProto(); 440 produceForwardDecl(upperDecl); 441 genUpperBoundBody(upperDecl); 442 produceDecl(upperDecl); 443 444 ast::FunctionDecl * lowerDecl = genLowerBoundProto(); 445 produceForwardDecl(lowerDecl); 446 genLowerBoundBody(lowerDecl); 447 produceDecl(lowerDecl); 329 448 } 330 449 331 450 inline ast::EnumAttrType * getPosnType( const ast::EnumDecl * decl ) { 332 451 return new ast::EnumAttrType(new ast::EnumInstType(decl), ast::EnumAttribute::Posn); 452 } 453 454 ast::FunctionDecl* EnumAttrFuncGenerator::genSuccPosProto() const { 455 return genProto( 456 "_successor_", 457 {new ast::ObjectDecl(getLocation(), "_i", getPosnType(decl))}, 458 {new ast::ObjectDecl(getLocation(), "_ret", getPosnType(decl))} 459 ); 460 } 461 462 ast::FunctionDecl* EnumAttrFuncGenerator::genPredPosProto() const { 463 return genProto( 464 "_predessor_", 465 {new ast::ObjectDecl(getLocation(), "_i", getPosnType(decl))}, 466 {new ast::ObjectDecl(getLocation(), "_ret", getPosnType(decl))} 467 ); 333 468 } 334 469 … … 376 511 } 377 512 378 void EnumAttrFuncGenerator::gen TypedEnumFunction(const ast::EnumAttribute attr) {513 void EnumAttrFuncGenerator::genAttributesDecls(const ast::EnumAttribute attr) { 379 514 if (attr == ast::EnumAttribute::Value || 380 515 attr == ast::EnumAttribute::Label) { 381 // TypedEnum's backing arrays382 516 std::vector<ast::ptr<ast::Init>> inits = 383 517 attr == ast::EnumAttribute::Value ? genValueInit() : genLabelInit(); … … 400 534 } 401 535 402 void EnumAttrFuncGenerator::genTypedEnumFuncs() { 403 if (decl->base) genTypedEnumFunction(ast::EnumAttribute::Value); 404 genTypedEnumFunction(ast::EnumAttribute::Label); 405 genTypedEnumFunction(ast::EnumAttribute::Posn); 536 ast::FunctionDecl* EnumAttrFuncGenerator::genSuccPredFunc(bool succ) { 537 ast::FunctionDecl* funcDecl = succ ? genSuccPosProto() : genPredPosProto(); 538 produceForwardDecl(funcDecl); 539 540 const CodeLocation& location = getLocation(); 541 542 auto& params = funcDecl->params; 543 assert(params.size() == 1); 544 auto param = params.front().strict_as<ast::ObjectDecl>(); 545 546 547 auto rets = funcDecl->returns; 548 assert(params.size() == 1); 549 auto ret = rets.front().strict_as<ast::ObjectDecl>(); 550 auto retType = ret->type.strict_as<ast::EnumAttrType>(); 551 552 auto addOneExpr = ast::UntypedExpr::createCall( location, 553 succ? "?+?": "?-?", 554 {new ast::VariableExpr(location, param), 555 ast::ConstantExpr::from_int(location, 1)} 556 ); 557 558 funcDecl->stmts = new ast::CompoundStmt( 559 location, { 560 new ast::ReturnStmt( 561 location, 562 new ast::CastExpr(location, addOneExpr, retType) 563 ) 564 } 565 ); 566 567 return funcDecl; 568 } 569 570 void EnumAttrFuncGenerator::genAttrFunctions() { 571 genAttributesDecls(ast::EnumAttribute::Value); 572 genAttributesDecls(ast::EnumAttribute::Label); 573 genAttributesDecls(ast::EnumAttribute::Posn); 574 } 575 576 // void EnumAttrFuncGenerator::genSuccPredDecl() { 577 // auto succProto = genSuccProto(); 578 // auto predProto = genPredProto(); 579 580 // produceForwardDecl(succProto); 581 // produceForwardDecl(predProto); 582 // } 583 584 void EnumAttrFuncGenerator::genSuccPredPosn() { 585 ast::FunctionDecl* succ = genSuccPredFunc(true); 586 ast::FunctionDecl* pred = genSuccPredFunc(false); 587 588 produceDecl(succ); 589 produceDecl(pred); 406 590 } 407 591 … … 409 593 std::list<ast::ptr<ast::Decl>>& decls) { 410 594 // Generate the functions (they go into forwards and definitions). 411 genTypedEnumFuncs(); 595 genAttrStandardFuncs(); 596 genAttrFunctions(); 412 597 genSerialTraitFuncs(); 598 genSuccPredPosn(); 599 // problematic 413 600 genBoundedFunctions(); 414 601 // Now export the lists contents. … … 431 618 432 619 void ImplementEnumFunc::previsit(const ast::EnumDecl* enumDecl) { 433 if (!enumDecl->body || !enumDecl->isTyped) return; 620 if (!enumDecl->body) return; 621 if (!enumDecl->base) return; 622 434 623 ast::EnumInstType enumInst(enumDecl->name); 435 624 enumInst.base = enumDecl; 625 436 626 EnumAttrFuncGenerator gen(enumDecl, &enumInst, functionNesting); 437 627 gen.generateAndAppendFunctions(declsToAddAfter); -
src/Validate/ReplaceTypedef.cpp
rbf4fe05 rec20ab9 18 18 #include "AST/Copy.hpp" 19 19 #include "AST/Pass.hpp" 20 #include "Common/ScopedMap.h pp"21 #include "Common/UniqueName.h pp"22 #include "ResolvExpr/Unify.h pp"20 #include "Common/ScopedMap.h" 21 #include "Common/UniqueName.h" 22 #include "ResolvExpr/Unify.h" 23 23 24 24 namespace Validate { -
src/Validate/VerifyCtorDtorAssign.cpp
rbf4fe05 rec20ab9 17 17 18 18 #include "AST/Pass.hpp" 19 #include "CodeGen/OperatorTable.h pp"19 #include "CodeGen/OperatorTable.h" 20 20 21 21 namespace Validate { -
src/Validate/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC_VALIDATE = \ 18 Validate/FindSpecialDecls.h pp18 Validate/FindSpecialDecls.h 19 19 20 20 SRC += $(SRC_VALIDATE) \ … … 40 40 Validate/HoistTypeDecls.cpp \ 41 41 Validate/HoistTypeDecls.hpp \ 42 Validate/ImplementEnumFunc.cpp \43 Validate/ImplementEnumFunc.hpp \44 42 Validate/InitializerLength.cpp \ 45 43 Validate/InitializerLength.hpp \ … … 54 52 Validate/ReturnCheck.hpp \ 55 53 Validate/VerifyCtorDtorAssign.cpp \ 56 Validate/VerifyCtorDtorAssign.hpp 54 Validate/VerifyCtorDtorAssign.hpp \ 55 Validate/ReplacePseudoFunc.cpp \ 56 Validate/ReplacePseudoFunc.hpp \ 57 Validate/ImplementEnumFunc.cpp \ 58 Validate/ImplementEnumFunc.hpp 57 59 58 60 SRCDEMANGLE += $(SRC_VALIDATE) -
src/Virtual/module.mk
rbf4fe05 rec20ab9 16 16 17 17 SRC += \ 18 Virtual/ExpandCasts.c pp\19 Virtual/ExpandCasts.h pp\20 Virtual/Tables.c pp\21 Virtual/Tables.h pp\18 Virtual/ExpandCasts.cc \ 19 Virtual/ExpandCasts.h \ 20 Virtual/Tables.cc \ 21 Virtual/Tables.h \ 22 22 Virtual/VirtualDtor.cpp \ 23 23 Virtual/VirtualDtor.hpp -
src/include/cassert
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // cassert--7 // assert.h -- 8 8 // 9 9 // Author : Peter A. Buhr -
src/include/optional
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // optional --7 // optional.h -- 8 8 // 9 9 // Author : Michael L. Brooks -
src/main.cpp
rbf4fe05 rec20ab9 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // main.c pp--7 // main.cc -- 8 8 // 9 9 // Author : Peter Buhr and Rob Schluntz … … 35 35 #include "CompilationState.hpp" 36 36 #include "../config.h" // for CFA_LIBDIR 37 #include "CodeGen/FixMain.h pp"// for FixMain38 #include "CodeGen/FixNames.h pp"// for fixNames39 #include "CodeGen/Generate.h pp"// for generate40 #include "CodeGen/LinkOnce.h pp"// for translateLinkOnce37 #include "CodeGen/FixMain.h" // for FixMain 38 #include "CodeGen/FixNames.h" // for fixNames 39 #include "CodeGen/Generate.h" // for generate 40 #include "CodeGen/LinkOnce.h" // for translateLinkOnce 41 41 #include "Common/CodeLocationTools.hpp" // for forceFillCodeLocations 42 42 #include "Common/DeclStats.hpp" // for printDeclStats 43 43 #include "Common/ResolvProtoDump.hpp" // for dumpAsResolverProto 44 #include "Common/Stats.h pp"// for Stats45 #include "Common/ Utility.hpp"// for deleteAll, filter, printAll44 #include "Common/Stats.h" // for Stats 45 #include "Common/utility.h" // for deleteAll, filter, printAll 46 46 #include "Concurrency/Actors.hpp" // for implementActors 47 47 #include "Concurrency/Corun.hpp" // for implementCorun 48 #include "Concurrency/Keywords.h pp"// for implementMutex, implement...49 #include "Concurrency/Waitfor.h pp"// for generateWaitfor48 #include "Concurrency/Keywords.h" // for implementMutex, implement... 49 #include "Concurrency/Waitfor.h" // for generateWaitfor 50 50 #include "Concurrency/Waituntil.hpp" // for generateWaitUntil 51 #include "ControlStruct/ExceptDecl.h pp"// for translateExcept52 #include "ControlStruct/ExceptTranslate.h pp"// for translateThrows, translat...51 #include "ControlStruct/ExceptDecl.h" // for translateExcept 52 #include "ControlStruct/ExceptTranslate.h" // for translateThrows, translat... 53 53 #include "ControlStruct/FixLabels.hpp" // for fixLabels 54 54 #include "ControlStruct/HoistControlDecls.hpp" // hoistControlDecls 55 #include "GenPoly/Box.h pp"// for box56 #include "GenPoly/InstantiateGeneric.h pp"// for instantiateGeneric57 #include "GenPoly/Lvalue.h pp"// for convertLvalue58 #include "GenPoly/Specialize.h pp"// for convertSpecializations59 #include "InitTweak/FixInit.h pp"// for fix60 #include "InitTweak/GenInit.h pp"// for genInit55 #include "GenPoly/Box.h" // for box 56 #include "GenPoly/InstantiateGeneric.h" // for instantiateGeneric 57 #include "GenPoly/Lvalue.h" // for convertLvalue 58 #include "GenPoly/Specialize.h" // for convertSpecializations 59 #include "InitTweak/FixInit.h" // for fix 60 #include "InitTweak/GenInit.h" // for genInit 61 61 #include "MakeLibCfa.hpp" // for makeLibCfa 62 62 #include "Parser/RunParser.hpp" // for buildList, dumpParseTree,... 63 63 #include "ResolvExpr/CandidatePrinter.hpp" // for printCandidates 64 64 #include "ResolvExpr/EraseWith.hpp" // for eraseWith 65 #include "ResolvExpr/Resolver.h pp"// for resolve66 #include "Tuples/Tuples.h pp"// for expandMemberTuples, expan...65 #include "ResolvExpr/Resolver.h" // for resolve 66 #include "Tuples/Tuples.h" // for expandMemberTuples, expan... 67 67 #include "Validate/Autogen.hpp" // for autogenerateRoutines 68 #include "Validate/ImplementEnumFunc.hpp" // for implementEnumFunc 68 69 #include "Validate/CompoundLiteral.hpp" // for handleCompoundLiterals 69 70 #include "Validate/EliminateTypedef.hpp" // for eliminateTypedef 70 71 #include "Validate/EnumAndPointerDecay.hpp" // for decayEnumsAndPointers 71 #include "Validate/FindSpecialDecls.h pp"// for findGlobalDecls72 #include "Validate/FindSpecialDecls.h" // for findGlobalDecls 72 73 #include "Validate/FixQualifiedTypes.hpp" // for fixQualifiedTypes 73 74 #include "Validate/FixReturnTypes.hpp" // for fixReturnTypes … … 76 77 #include "Validate/HoistStruct.hpp" // for hoistStruct 77 78 #include "Validate/HoistTypeDecls.hpp" // for hoistTypeDecls 78 #include "Validate/ImplementEnumFunc.hpp" // for implementEnumFunc79 79 #include "Validate/InitializerLength.hpp" // for setLengthFromInitializer 80 80 #include "Validate/LabelAddressFixer.hpp" // for fixLabelAddresses … … 83 83 #include "Validate/ReturnCheck.hpp" // for checkReturnStatements 84 84 #include "Validate/VerifyCtorDtorAssign.hpp" // for verifyCtorDtorAssign 85 #include "Virtual/ExpandCasts.hpp" // for expandCasts 85 #include "Validate/ReplacePseudoFunc.hpp" // for replacePseudoFunc 86 #include "Virtual/ExpandCasts.h" // for expandCasts 86 87 #include "Virtual/VirtualDtor.hpp" // for implementVirtDtors 87 88 … … 382 383 PASS( "Resolve", ResolvExpr::resolve, transUnit ); 383 384 DUMP( exprp, std::move( transUnit ) ); 385 PASS( "Replace Pseudo Func", Validate::replacePseudoFunc, transUnit ); 384 386 PASS( "Fix Init", InitTweak::fix, transUnit, buildingLibrary() ); // Here 385 387 PASS( "Erase With", ResolvExpr::eraseWith, transUnit ); -
tests/enum_tests/.expect/voidEnum.txt
rbf4fe05 rec20ab9 1 Two different Opague Enum Should not be the same: 2 a and b are Not Equal 3 Default Output: 1 Not Equal 4 2 0 5 3 1 6 a7 b -
tests/enum_tests/structEnum.cfa
rbf4fe05 rec20ab9 17 17 }; 18 18 19 PointEnum identity(PointEnum in) {20 return in;21 }19 // PointEnum foo(PointEnum in) { 20 // return in; 21 // } 22 22 23 23 // The only valid usage -
tests/enum_tests/voidEnum.cfa
rbf4fe05 rec20ab9 1 1 #include <fstream.hfa> 2 #include <enum.hfa> 2 3 3 enum() voidEnum { 4 4 a, b, c … … 9 9 }; 10 10 11 char* a[voidEnum] = { 12 "A", 13 "B", 14 "C" 15 }; 11 // void foo (const enum voidEnum & t){} 16 12 17 13 int main() { 18 14 enum voidEnum v_1 = a; 19 15 enum voidEnum v_2 = b; 20 sout | "Two different Opague Enum Should not be the same:"; 16 // foo(b); 17 // enum voidEnum v_3 = 10; 18 // Error as int cannot convert to void enum 21 19 if ( v_1 == v_2 ) { 22 sout | " a and b areEqual" | nl;20 sout | "Equal" | nl; 23 21 } else { 24 sout | " a and b areNot Equal" | nl;22 sout | "Not Equal" | nl; 25 23 } 26 sout | "Default Output:"; 27 sout | a; 28 sout | b; 29 30 sout | labelE(v_1); 31 sout | labelE(v_2); 32 24 sout | a | nl; 25 sout | b | nl; 33 26 }
Note:
See TracChangeset
for help on using the changeset viewer.