Changeset bf4fe05


Ignore:
Timestamp:
May 13, 2024, 7:07:06 AM (17 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
ca4f2b2
Parents:
ec20ab9 (diff), 5f225f5 (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.
Message:

fix merge

Files:
2 deleted
90 edited
123 moved

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    rec20ab9 rbf4fe05  
    2626#include <sys/stat.h>
    2727
    28 #include "Common/SemanticError.h"
     28#include "Common/SemanticError.hpp"
    2929#include "config.h"                                                                             // configure info
    3030
  • libcfa/src/enum.cfa

    rec20ab9 rbf4fe05  
     1#include "enum.hfa"
     2
     3#pragma GCC visibility push(default)
     4
     5forall(T, E| TypedEnum(T, E)) {
     6    // constructors
     7
     8    // comparison
     9    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

    rec20ab9 rbf4fe05  
    11#pragma once
    22
    3 forall( E ) trait Bounded {
    4         E lowerBound();
    5         E upperBound();
    6 };
     3forall(T) { // T is the based type of enum(T)
     4    forall(E) trait Bounded {
     5        E lowerBound();
     6        E upperBound();
     7    };
    78
    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 };
     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    };
    1415
    15 forall( E, T ) trait TypedEnum {
    16         T valueE( E e );
    17         char * labelE( E e );
    18         unsigned int posE( E e );
    19 };
     16    // Opague Enum + TypedEnum
     17    forall(E | Serial(T, E)) trait CfaEnum {
     18        char * labelE(E e);
     19        unsigned int posE(E e);
     20    };
    2021
    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         
     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        }
    3036}
  • src/AST/Decl.cpp

    rec20ab9 rbf4fe05  
    2020#include <unordered_map>
    2121
    22 #include "Common/Eval.h     // for eval
    23 #include "Common/SemanticError.h"
     22#include "Common/Eval.hpp"     // for eval
     23#include "Common/SemanticError.hpp"
    2424
    2525#include "Fwd.hpp"             // for UniqueId
  • src/AST/Expr.cpp

    rec20ab9 rbf4fe05  
    2727#include "Type.hpp"
    2828#include "TypeSubstitution.hpp"
    29 #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
     29#include "Common/Utility.hpp"
     30#include "Common/SemanticError.hpp"
     31#include "GenPoly/Lvalue.hpp"      // for referencesPermissable
     32#include "ResolvExpr/Unify.hpp"    // for extractResultType
     33#include "Tuples/Tuples.hpp"       // for makeTupleType
    3434
    3535namespace ast {
  • src/AST/Inspect.cpp

    rec20ab9 rbf4fe05  
    2424#include "AST/Stmt.hpp"
    2525#include "AST/Type.hpp"
    26 #include "CodeGen/OperatorTable.h"
     26#include "CodeGen/OperatorTable.hpp"
    2727
    2828namespace ast {
  • src/AST/Label.hpp

    rec20ab9 rbf4fe05  
    2121
    2222#include "Node.hpp"
    23 #include "Common/CodeLocation.h"
     23#include "Common/CodeLocation.hpp"
    2424
    2525namespace ast {
  • src/AST/LinkageSpec.cpp

    rec20ab9 rbf4fe05  
    2020#include <string>
    2121
    22 #include "Common/CodeLocation.h"
    23 #include "Common/SemanticError.h"
     22#include "Common/CodeLocation.hpp"
     23#include "Common/SemanticError.hpp"
    2424
    2525namespace ast {
  • src/AST/LinkageSpec.hpp

    rec20ab9 rbf4fe05  
    1919
    2020#include "Bitfield.hpp"
    21 #include "Common/CodeLocation.h"
     21#include "Common/CodeLocation.hpp"
    2222
    2323namespace ast {
  • src/AST/Node.hpp

    rec20ab9 rbf4fe05  
    2020#include <iosfwd>
    2121
    22 #include "Common/ErrorObjects.h"  // for SemanticErrorException
     22#include "Common/ErrorObjects.hpp"  // for SemanticErrorException
    2323
    2424namespace ast {
  • src/AST/ParseNode.hpp

    rec20ab9 rbf4fe05  
    1818#include "Node.hpp"
    1919
    20 #include "Common/CodeLocation.h"
     20#include "Common/CodeLocation.hpp"
    2121
    2222namespace ast {
  • src/AST/Pass.hpp

    rec20ab9 rbf4fe05  
    424424}
    425425
    426 #include "Common/Stats.h"
     426#include "Common/Stats.hpp"
    427427
    428428namespace ast {
  • src/AST/Pass.proto.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Pass.impl.hpp --
     7// Pass.proto.hpp --
    88//
    99// Author           : Thierry Delisle
     
    1818
    1919#include "Common/Iterate.hpp"
    20 #include "Common/Stats/Heap.h"
    21 #include "Common/utility.h"
     20#include "Common/Stats/Heap.hpp"
     21#include "Common/Utility.hpp"
    2222namespace ast {
    2323        template<typename core_t> class Pass;
  • src/AST/Print.hpp

    rec20ab9 rbf4fe05  
    1919
    2020#include "AST/Fwd.hpp"
    21 #include "Common/Indenter.h"
     21#include "Common/Indenter.hpp"
    2222
    2323namespace ast {
  • src/AST/Stmt.hpp

    rec20ab9 rbf4fe05  
    2424#include "ParseNode.hpp"
    2525#include "Visitor.hpp"
    26 #include "Common/CodeLocation.h"
     26#include "Common/CodeLocation.hpp"
    2727
    2828// Must be included in *all* AST classes; should be #undef'd at the end of the file
  • src/AST/SymbolTable.cpp

    rec20ab9 rbf4fe05  
    2323#include "Inspect.hpp"
    2424#include "Type.hpp"
    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"
     25#include "CodeGen/OperatorTable.hpp"       // for isCtorDtorAssign
     26#include "Common/SemanticError.hpp"
     27#include "Common/Stats/Counter.hpp"
     28#include "GenPoly/GenPoly.hpp"
     29#include "InitTweak/InitTweak.hpp"
     30#include "ResolvExpr/Cost.hpp"
    3131#include "ResolvExpr/CandidateFinder.hpp"  // for referenceToRvalueConversion
    32 #include "ResolvExpr/Unify.h"
    33 #include "SymTab/Mangler.h"
     32#include "ResolvExpr/Unify.hpp"
     33#include "SymTab/Mangler.hpp"
    3434
    3535namespace ast {
  • src/AST/SymbolTable.hpp

    rec20ab9 rbf4fe05  
    2121#include "Fwd.hpp"
    2222#include "Node.hpp"                // for ptr, readonly
    23 #include "Common/CodeLocation.h"
    24 #include "Common/PersistentMap.h"
     23#include "Common/CodeLocation.hpp"
     24#include "Common/PersistentMap.hpp"
    2525
    2626namespace ResolvExpr {
  • src/AST/Type.cpp

    rec20ab9 rbf4fe05  
    2323#include "Init.hpp"
    2424#include "Inspect.hpp"
    25 #include "Common/utility.h"      // for copy, move
    26 #include "Tuples/Tuples.h     // for isTtype
     25#include "Common/Utility.hpp"    // for copy, move
     26#include "Tuples/Tuples.hpp"     // for isTtype
    2727
    2828namespace ast {
  • src/AST/TypeEnvironment.cpp

    rec20ab9 rbf4fe05  
    2929#include "Print.hpp"
    3030#include "Type.hpp"
    31 #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
     31#include "Common/Indenter.hpp"
     32#include "ResolvExpr/Typeops.hpp"    // for occurs
     33#include "ResolvExpr/WidenMode.hpp"
     34#include "ResolvExpr/Unify.hpp"      // for unifyInexact
     35#include "Tuples/Tuples.hpp"         // for isTtype
    3636#include "CompilationState.hpp"
    3737
  • src/AST/TypeEnvironment.hpp

    rec20ab9 rbf4fe05  
    2828#include "Type.hpp"
    2929#include "TypeSubstitution.hpp"
    30 #include "Common/Indenter.h"
    31 #include "ResolvExpr/WidenMode.h"
     30#include "Common/Indenter.hpp"
     31#include "ResolvExpr/WidenMode.hpp"
    3232
    3333namespace ast {
  • src/AST/TypeSubstitution.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeSubstitution.cc --
     7// TypeSubstitution.cpp --
    88//
    99// Author           : Richard C. Bilson
  • src/AST/TypeSubstitution.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeSubstitution.h --
     7// TypeSubstitution.hpp --
    88//
    99// Author           : Richard C. Bilson
     
    1616#pragma once
    1717
    18 #include <cassert>                 // for assert
    19 #include <list>                    // for list<>::iterator, _List_iterator
     18#include <cassert>                   // for assert
     19#include <list>                      // for list<>::iterator, _List_iterator
    2020#include <unordered_map>
    2121#include <unordered_set>
    22 #include <string>                  // for string, operator!=
    23 #include <utility>                 // for pair
     22#include <string>                    // for string, operator!=
     23#include <utility>                   // for pair
    2424
    25 #include "Fwd.hpp"        // for UniqueId
     25#include "Fwd.hpp"                   // for UniqueId
    2626#include "ParseNode.hpp"
    2727#include "Type.hpp"
    28 #include "Common/SemanticError.h"  // for SemanticError
     28#include "Common/SemanticError.hpp"  // for SemanticError
    2929#include "Visitor.hpp"
    3030#include "Decl.hpp"
  • src/AST/Util.cpp

    rec20ab9 rbf4fe05  
    2020#include "Pass.hpp"
    2121#include "TranslationUnit.hpp"
    22 #include "Common/utility.h"
    23 #include "GenPoly/ScopedSet.h"
     22#include "Common/Utility.hpp"
     23#include "GenPoly/ScopedSet.hpp"
    2424
    2525#include <vector>
  • src/BasicTypes-gen.cpp

    rec20ab9 rbf4fe05  
    326326
    327327
    328         #define ConversionCost TOP_SRCDIR "src/ResolvExpr/ConversionCost.cc"
     328        #define ConversionCost TOP_SRCDIR "src/ResolvExpr/ConversionCost.cpp"
    329329        resetInput( file, ConversionCost, buffer, code, str );
    330330
     
    405405
    406406
    407         #define CommonType TOP_SRCDIR "src/ResolvExpr/CommonType.cc"
     407        #define CommonType TOP_SRCDIR "src/ResolvExpr/CommonType.cpp"
    408408        resetInput( file, CommonType, buffer, code, str );
    409409
     
    446446
    447447
    448         #define ManglerCommon TOP_SRCDIR "src/SymTab/ManglerCommon.cc"
     448        #define ManglerCommon TOP_SRCDIR "src/SymTab/ManglerCommon.cpp"
    449449        resetInput( file, ManglerCommon, buffer, code, str );
    450450
  • src/CodeGen/CodeGenerator.cpp

    rec20ab9 rbf4fe05  
    1717
    1818#include "AST/Print.hpp"
    19 #include "OperatorTable.h         // for OperatorInfo, operatorLookup
    20 #include "CodeGen/GenType.h       // for genType
     19#include "OperatorTable.hpp"         // for OperatorInfo, operatorLookup
     20#include "CodeGen/GenType.hpp"       // for genType
    2121#include "Common/ToString.hpp"       // for toString
    22 #include "Common/UniqueName.h     // for UniqueName
     22#include "Common/UniqueName.hpp"     // for UniqueName
    2323
    2424namespace CodeGen {
  • src/CodeGen/CodeGenerator.hpp

    rec20ab9 rbf4fe05  
    2020#include "AST/Fwd.hpp"
    2121#include "AST/Pass.hpp"          // for WithGuards, WithShortCircuiting, ...
    22 #include "CodeGen/Options.h   // for Options
    23 #include "Common/Indenter.h   // for Indenter
     22#include "CodeGen/Options.hpp"   // for Options
     23#include "Common/Indenter.hpp"   // for Indenter
    2424
    2525
  • src/CodeGen/FixMain.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixMain.cc -- Tools to change a Cforall main into a C main.
     7// FixMain.cpp -- Tools to change a Cforall main into a C main.
    88//
    99// Author           : Thierry Delisle
     
    1414//
    1515
    16 #include "FixMain.h"
     16#include "FixMain.hpp"
    1717
    18 #include <cassert>                 // for assert, assertf
    19 #include <fstream>                 // for operator<<, basic_ostream::operator<<
    20 #include <list>                    // for list
    21 #include <string>                  // for operator<<
     18#include <cassert>                   // for assert, assertf
     19#include <fstream>                   // for operator<<, basic_ostream::oper...
     20#include <list>                      // for list
     21#include <string>                    // for operator<<
    2222
    2323#include "AST/Decl.hpp"
     
    2525#include "AST/Type.hpp"
    2626#include "AST/Vector.hpp"
    27 #include "Common/SemanticError.h"  // for SemanticError
    28 #include "CodeGen/GenType.h"       // for GenType
    29 #include "SymTab/Mangler.h"
     27#include "Common/SemanticError.hpp"  // for SemanticError
     28#include "CodeGen/GenType.hpp"       // for GenType
     29#include "SymTab/Mangler.hpp"
    3030
    3131namespace CodeGen {
  • src/CodeGen/FixMain.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixMain.h -- Tools to change a Cforall main into a C main.
     7// FixMain.hpp -- Tools to change a Cforall main into a C main.
    88//
    99// Author           : Thierry Delisle
  • src/CodeGen/FixNames.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixNames.cc -- Adjustments to typed declarations.
     7// FixNames.cpp -- Adjustments to typed declarations.
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "FixNames.h"
     16#include "FixNames.hpp"
    1717
    18 #include <memory>                  // for unique_ptr
    19 #include <string>                  // for string, operator!=, operator==
     18#include <memory>                    // for unique_ptr
     19#include <string>                    // for string, operator!=, operator==
    2020
    2121#include "AST/Chain.hpp"
    2222#include "AST/Expr.hpp"
    2323#include "AST/Pass.hpp"
    24 #include "Common/SemanticError.h"  // for SemanticError
    25 #include "FixMain.h"               // for FixMain
    26 #include "SymTab/Mangler.h"        // for Mangler
     24#include "Common/SemanticError.hpp"  // for SemanticError
     25#include "FixMain.hpp"               // for FixMain
     26#include "SymTab/Mangler.hpp"        // for Mangler
    2727#include "CompilationState.hpp"
    2828
  • src/CodeGen/FixNames.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixNames.h -- Adjustments to typed declarations.
     7// FixNames.hpp -- Adjustments to typed declarations.
    88//
    99// Author           : Richard C. Bilson
  • src/CodeGen/GenType.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenType.cc --
     7// GenType.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1313// Update Count     : 24
    1414//
    15 #include "GenType.h"
     15
     16#include "GenType.hpp"
    1617
    1718#include <cassert>                // for assert, assertf
     
    2223#include "AST/Vector.hpp"         // for vector
    2324#include "CodeGenerator.hpp"      // for CodeGenerator
    24 #include "Common/UniqueName.h  // for UniqueName
     25#include "Common/UniqueName.hpp"  // for UniqueName
    2526
    2627namespace CodeGen {
  • src/CodeGen/GenType.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenType.h --
     7// GenType.hpp --
    88//
    99// Author           : Richard C. Bilson
     
    1818#include <string>  // for string
    1919
    20 #include "CodeGen/Options.h" // for Options
     20#include "CodeGen/Options.hpp" // for Options
    2121
    2222namespace ast {
  • src/CodeGen/Generate.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Generate.cc --
     7// Generate.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1313// Update Count     : 9
    1414//
    15 #include "Generate.h"
     15#include "Generate.hpp"
    1616
    1717#include <iostream>                  // for ostream, endl, operator<<
     
    2020
    2121#include "CodeGenerator.hpp"         // for CodeGenerator, doSemicolon, ...
    22 #include "GenType.h               // for genPrettyType
     22#include "GenType.hpp"               // for genPrettyType
    2323
    2424using namespace std;
  • src/CodeGen/Generate.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Generate.h --
     7// Generate.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/CodeGen/LinkOnce.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // LinkOnce.cc -- Translate the cfa_linkonce attribute.
     7// LinkOnce.cpp -- Translate the cfa_linkonce attribute.
    88//
    99// Author           : Andrew Beach
     
    1414//
    1515
    16 #include "LinkOnce.h"
     16#include "LinkOnce.hpp"
    1717
    1818#include <algorithm>
  • src/CodeGen/LinkOnce.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // LinkOnce.h -- Translate the cfa_linkonce attribute.
     7// LinkOnce.hpp -- Translate the cfa_linkonce attribute.
    88//
    99// Author           : Andrew Beach
  • src/CodeGen/OperatorTable.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // OperatorTable.cc --
     7// OperatorTable.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "OperatorTable.h"
     16#include "OperatorTable.hpp"
    1717
    1818#include <cassert>         // for assert
  • src/CodeGen/OperatorTable.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // OperatorTable.h --
     7// OperatorTable.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/CodeGen/module.mk

    rec20ab9 rbf4fe05  
    1818        CodeGen/CodeGenerator.cpp \
    1919        CodeGen/CodeGenerator.hpp \
    20         CodeGen/GenType.cc \
    21         CodeGen/GenType.h \
    22         CodeGen/OperatorTable.cc \
    23         CodeGen/OperatorTable.h
     20        CodeGen/GenType.cpp \
     21        CodeGen/GenType.hpp \
     22        CodeGen/OperatorTable.cpp \
     23        CodeGen/OperatorTable.hpp
    2424
    2525SRC += $(SRC_CODEGEN) \
    26         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
     26        CodeGen/FixMain.cpp \
     27        CodeGen/FixMain.hpp \
     28        CodeGen/FixNames.cpp \
     29        CodeGen/FixNames.hpp \
     30        CodeGen/Generate.cpp \
     31        CodeGen/Generate.hpp \
     32        CodeGen/LinkOnce.cpp \
     33        CodeGen/LinkOnce.hpp \
     34        CodeGen/Options.hpp
    3535
    3636SRCDEMANGLE += $(SRC_CODEGEN)
  • src/Common/Assert.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Assert.cc --
     7// Assert.cpp --
    88//
    99// Author           : Peter A. Buhr
     
    2222#define CFA_ASSERT_FMT "*CFA assertion error* \"%s\" from program \"%s\" in \"%s\" at line %d in file \"%s\""
    2323
    24 // called by macro assert in assert.h
     24// called by macro assert in cassert
    2525void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
    2626        fprintf( stderr, CFA_ASSERT_FMT ".\n", assertion, __progname, function, line, file );
  • src/Common/CodeLocation.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CodeLocation.h --
     7// CodeLocation.hpp --
    88//
    99// Author           : Andrew Beach
  • src/Common/CodeLocationTools.cpp

    rec20ab9 rbf4fe05  
    2020#include "AST/Pass.hpp"
    2121#include "AST/TranslationUnit.hpp"
    22 #include "Common/CodeLocation.h"
     22#include "Common/CodeLocation.hpp"
    2323
    2424namespace {
  • src/Common/DeclStats.cpp

    rec20ab9 rbf4fe05  
    1919#include "AST/Pass.hpp"
    2020#include "AST/Print.hpp"
    21 #include "Common/VectorMap.h"
     21#include "Common/VectorMap.hpp"
    2222
    2323#include <iostream>
  • src/Common/ErrorObjects.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ErrorObjects.h --
     7// ErrorObjects.hpp --
    88//
    99// Author           : Thierry Delisle
     
    2323#include <unistd.h>     // for isatty
    2424
    25 #include "CodeLocation.h"                                                               // for CodeLocation, toString
     25#include "CodeLocation.hpp"                                                             // for CodeLocation, toString
    2626
    2727struct error {
  • src/Common/Eval.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Eval.cc -- Evaluate parts of the ast at compile time.
     7// Eval.cpp -- Evaluate parts of the ast at compile time.
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "Eval.h"
     16#include "Eval.hpp"
    1717
    1818#include <utility> // for pair
    1919
    2020#include "AST/Inspect.hpp"
    21 #include "CodeGen/OperatorTable.h"                                              // access: OperatorInfo
     21#include "CodeGen/OperatorTable.hpp"                                            // access: OperatorInfo
    2222#include "AST/Pass.hpp"
    23 #include "InitTweak/InitTweak.h"
     23#include "InitTweak/InitTweak.hpp"
    2424
    2525struct EvalNew : public ast::WithShortCircuiting {
  • src/Common/Eval.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Eval.h -- Evaluate parts of the ast at compile time.
     7// Eval.hpp -- Evaluate parts of the ast at compile time.
    88//
    99// Author           : Andrew Beach
  • src/Common/Examine.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Examine.cc -- Helpers for examining AST code.
     7// Examine.cpp -- Helpers for examining AST code.
    88//
    99// Author           : Andrew Beach
     
    1414//
    1515
    16 #include "Common/Examine.h"
     16#include "Common/Examine.hpp"
    1717
    1818#include "AST/Type.hpp"
    19 #include "CodeGen/OperatorTable.h"
    20 #include "InitTweak/InitTweak.h"
     19#include "CodeGen/OperatorTable.hpp"
     20#include "InitTweak/InitTweak.hpp"
    2121
    2222namespace {
     
    5555const ast::Type * getDestructorParam( const ast::FunctionDecl * func ) {
    5656        if ( !CodeGen::isDestructor( func->name ) ) return nullptr;
    57         //return InitTweak::getParamThis( func )->type;
    5857        return getTypeofThisSolo( func );
    5958}
  • src/Common/Examine.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Examine.h -- Helpers for examining AST code.
     7// Examine.hpp -- Helpers for examining AST code.
    88//
    99// Author           : Andrew Beach
  • src/Common/FilterCombos.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FilterCombos.h --
     7// FilterCombos.hpp --
    88//
    99// Author           : Aaron B. Moss
     
    2222
    2323/// Combo iterator that simply collects values into a vector, marking all values as valid.
    24 /// Prefer combos in typeops.h to use of IntoVectorComboIter with filterCombos
     24/// Prefer combos in Typeops.hpp to use of IntoVectorComboIter with filterCombos
    2525/// @param T    The element type of the vector.
    2626template<typename T>
  • src/Common/Indenter.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Indenter.cc --
     7// Indenter.cpp --
    88//
    99// Author           : Andrew Beach
     
    1414//
    1515
    16 #include "Indenter.h"
     16#include "Indenter.hpp"
    1717
    1818unsigned Indenter::tabsize = 2;
  • src/Common/Indenter.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Indenter.h --
     7// Indenter.hpp --
    88//
    99// Author           : Rob Schluntz
  • src/Common/PersistentMap.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // PersistentMap.h --
     7// PersistentMap.hpp --
    88//
    99// Author           : Aaron B. Moss
  • src/Common/ResolvProtoDump.cpp

    rec20ab9 rbf4fe05  
    2626#include "AST/TranslationUnit.hpp"
    2727#include "AST/Type.hpp"
    28 #include "CodeGen/OperatorTable.h"
     28#include "CodeGen/OperatorTable.hpp"
    2929
    3030namespace {
  • src/Common/ScopedMap.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ScopedMap.h --
     7// ScopedMap.hpp --
    88//
    99// Author           : Aaron B. Moss
  • src/Common/SemanticError.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // SemanticError.cc --
     7// SemanticError.cpp --
    88//
    99// Author           : Thierry Delisle
     
    1313// Update Count     : 34
    1414//
     15
     16#include "SemanticError.hpp"
    1517
    1618#include <cstdarg>
     
    2325#include <vector>
    2426
     27#include "Common/Utility.hpp"                                                   // for to_string, CodeLocation (ptr only)
     28
    2529using namespace std;
    26 
    27 #include "Common/utility.h"                                                             // for to_string, CodeLocation (ptr only)
    28 #include "SemanticError.h"
    2930
    3031//-----------------------------------------------------------------------------
  • src/Common/SemanticError.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // SemanticError.h --
     7// SemanticError.hpp --
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "ErrorObjects.h"
     18#include "ErrorObjects.hpp"
    1919#include "AST/Node.hpp"
    2020#include "AST/ParseNode.hpp"
  • src/Common/Stats.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Stats.h --
     7// Stats.hpp --
    88//
    99// Author           : Thierry Delisle
     
    2424
    2525These can be enabled using the --stats option, to which a comma seperated list of options can be passed.
    26 For more details see Stats.cc
     26For more information, see Stats/Stats.cpp
    2727
    2828Counters:
     
    4040
    4141
    42 #include "Common/Stats/Counter.h"
    43 #include "Common/Stats/Heap.h"
    44 #include "Common/Stats/Time.h"
     42#include "Common/Stats/Counter.hpp"
     43#include "Common/Stats/Heap.hpp"
     44#include "Common/Stats/Time.hpp"
    4545
    4646namespace Stats {
  • src/Common/Stats/Base.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Heap.h --
     7// Heap.hpp --
    88//
    99// Author           : Thierry Delisle
  • src/Common/Stats/Counter.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Counter.cc --
     7// Counter.cpp --
    88//
    99// Author           : Thierry Delisle
     
    1414//
    1515
    16 #include "Counter.h"
     16#include "Counter.hpp"
    1717
    1818#include <algorithm>
  • src/Common/Stats/Counter.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Counter.h --
     7// Counter.hpp --
    88//
    99// Author           : Thierry Delisle
     
    1919#include <iostream>
    2020
    21 #include "Common/Stats/Base.h"
     21#include "Common/Stats/Base.hpp"
    2222
    2323#if defined( NO_STATISTICS )
  • src/Common/Stats/Heap.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Heap.cc --
     7// Heap.cpp --
    88//
    99// Author           : Thierry Delisle
     
    6969                void stacktrace_push(size_t id) {
    7070                        ++stacktrace_depth;
    71                         assertf(stacktrace_depth < stacktrace_max_depth, "Stack trace too deep: increase size of array in Heap.cc");
     71                        assertf(stacktrace_depth < stacktrace_max_depth, "Stack trace too deep: increase size of array in Heap.cpp");
    7272                        trace[stacktrace_depth] = id;
    7373                }
     
    8787                        passes_cnt++;
    8888
    89                         assertf(passes_cnt < passes_size, "Too many passes for Stats::Heap, increase the size of the array in Heap.cc");
     89                        assertf(passes_cnt < passes_size, "Too many passes for Stats::Heap, increase the size of the array in Heap.cpp");
    9090                }
    9191
  • src/Common/Stats/Heap.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Heap.h --
     7// Heap.hpp --
    88//
    99// Author           : Thierry Delisle
  • src/Common/Stats/ResolveTime.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ResolveTime.cc --
     7// ResolveTime.cpp --
    88//
    99// Author           : Thierry Delisle
     
    1414//
    1515
    16 #include "ResolveTime.h"
     16#include "ResolveTime.hpp"
    1717
    1818#include <fstream>
  • src/Common/Stats/ResolveTime.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ResolveTime.h --
     7// ResolveTime.hpp --
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "Common/Stats/Base.h"
     18#include "Common/Stats/Base.hpp"
    1919
    2020#if defined( NO_STATISTICS )
  • src/Common/Stats/Stats.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Stats.cc --
     7// Stats.cpp --
    88//
    99// Author           : Thierry Delisle
  • src/Common/Stats/Time.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Time.cc --
     7// Time.cpp --
    88//
    99// Author           : Thierry Delisle
     
    1414//
    1515
    16 #include "Time.h"
     16#include "Time.hpp"
    1717
    1818#include <cassert>
  • src/Common/Stats/Time.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Time.h --
     7// Time.hpp --
    88//
    99// Author           : Thierry Delisle
     
    1616#pragma once
    1717
    18 #include "Common/Stats/Base.h"
     18#include "Common/Stats/Base.hpp"
    1919
    2020#if defined( NO_STATISTICS )
  • src/Common/UniqueName.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // UniqueName.cc -- Create a unique variants of a base name with a counter.
     7// UniqueName.cpp -- Create a unique variants of a base name with a counter.
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "UniqueName.h"
     16#include "UniqueName.hpp"
    1717
    1818#include "Common/ToString.hpp"
  • src/Common/UniqueName.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // UniqueName.h -- Create a unique variants of a base name with a counter.
     7// UniqueName.hpp -- Create a unique variants of a base name with a counter.
    88//
    99// Author           : Richard C. Bilson
  • src/Common/Utility.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // utility.h -- General utilities used across the compiler.
     7// Utility.hpp -- General utilities used across the compiler.
    88//
    99// Author           : Richard C. Bilson
  • src/Common/VectorMap.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // VectorMap.h --
     7// VectorMap.hpp --
    88//
    99// Author           : Aaron B. Moss
  • src/Common/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC_COMMON = \
    18         Common/Assert.cc \
    19         Common/CodeLocation.h \
     18        Common/Assert.cpp \
     19        Common/CodeLocation.hpp \
    2020        Common/CodeLocationTools.hpp \
    2121        Common/CodeLocationTools.cpp \
    2222        Common/DeclStats.hpp \
    2323        Common/DeclStats.cpp \
    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 \
     24        Common/ErrorObjects.hpp \
     25        Common/Eval.cpp \
     26        Common/Eval.hpp \
     27        Common/Examine.cpp \
     28        Common/Examine.hpp \
     29        Common/FilterCombos.hpp \
     30        Common/Indenter.hpp \
     31        Common/Indenter.cpp \
    3232        Common/Iterate.hpp \
    33         Common/PersistentMap.h \
     33        Common/PersistentMap.hpp \
    3434        Common/ResolvProtoDump.hpp \
    3535        Common/ResolvProtoDump.cpp \
    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 \
     36        Common/ScopedMap.hpp \
     37        Common/SemanticError.cpp \
     38        Common/SemanticError.hpp \
     39        Common/Stats.hpp \
     40        Common/Stats/Base.hpp \
     41        Common/Stats/Counter.cpp \
     42        Common/Stats/Counter.hpp \
     43        Common/Stats/Heap.cpp \
     44        Common/Stats/Heap.hpp \
     45        Common/Stats/ResolveTime.cpp \
     46        Common/Stats/ResolveTime.hpp \
     47        Common/Stats/Stats.cpp \
     48        Common/Stats/Time.cpp \
     49        Common/Stats/Time.hpp \
    5050        Common/ToString.hpp \
    51         Common/UniqueName.cc \
    52         Common/UniqueName.h \
    53         Common/utility.h \
    54         Common/VectorMap.h
     51        Common/UniqueName.cpp \
     52        Common/UniqueName.hpp \
     53        Common/Utility.hpp \
     54        Common/VectorMap.hpp
    5555
    5656SRC += $(SRC_COMMON) \
    57         Common/DebugMalloc.cc
     57        Common/DebugMalloc.cpp
    5858
    5959SRCDEMANGLE += $(SRC_COMMON)
  • src/CompilationState.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CompilationState.cc --
     7// CompilationState.cpp --
    88//
    99// Author           : Rob Schluntz
  • src/Concurrency/Corun.cpp

    rec20ab9 rbf4fe05  
    1919#include "AST/Stmt.hpp"
    2020#include "AST/TranslationUnit.hpp"
    21 #include "Common/UniqueName.h"
     21#include "Common/UniqueName.hpp"
    2222using namespace ast;
    2323using namespace std;
  • src/Concurrency/Keywords.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "Concurrency/Keywords.h"
     16#include "Concurrency/Keywords.hpp"
    1717
    1818#include <iostream>
     
    2626#include "AST/DeclReplacer.hpp"
    2727#include "AST/TranslationUnit.hpp"
    28 #include "CodeGen/OperatorTable.h"
    29 #include "Common/Examine.h"
    30 #include "Common/utility.h"
    31 #include "Common/UniqueName.h"
     28#include "CodeGen/OperatorTable.hpp"
     29#include "Common/Examine.hpp"
     30#include "Common/Utility.hpp"
     31#include "Common/UniqueName.hpp"
    3232#include "ControlStruct/LabelGenerator.hpp"
    33 #include "InitTweak/InitTweak.h"
    34 #include "Virtual/Tables.h"
     33#include "InitTweak/InitTweak.hpp"
     34#include "Virtual/Tables.hpp"
    3535
    3636namespace Concurrency {
  • src/Concurrency/Keywords.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Keywords.h -- Implement concurrency constructs from their keywords.
     7// Keywords.hpp -- Implement concurrency constructs from their keywords.
    88//
    99// Author           : Thierry Delisle
  • src/Concurrency/Waitfor.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "Waitfor.h"
     16#include "Waitfor.hpp"
    1717
    1818#include <string>
    1919
    2020#include "AST/Pass.hpp"
    21 #include "Common/UniqueName.h"
    22 #include "InitTweak/InitTweak.h"
    23 #include "ResolvExpr/Resolver.h"
     21#include "Common/UniqueName.hpp"
     22#include "InitTweak/InitTweak.hpp"
     23#include "ResolvExpr/Resolver.hpp"
    2424
    2525#include "AST/Print.hpp"
  • src/Concurrency/Waitfor.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Waitfor.h --
     7// Waitfor.hpp --
    88//
    99// Author           : Thierry Delisle
  • src/Concurrency/Waituntil.cpp

    rec20ab9 rbf4fe05  
    2424#include "AST/Stmt.hpp"
    2525#include "AST/Type.hpp"
    26 #include "Common/UniqueName.h"
     26#include "Common/UniqueName.hpp"
    2727
    2828using namespace ast;
  • src/Concurrency/Waituntil.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Waitfor.h --
     7// Waituntil.hpp --
    88//
    99// Author           : Thierry Delisle
  • src/Concurrency/module.mk

    rec20ab9 rbf4fe05  
    2121        Concurrency/Corun.hpp \
    2222        Concurrency/Keywords.cpp \
    23         Concurrency/Keywords.h \
     23        Concurrency/Keywords.hpp \
    2424        Concurrency/Waitfor.cpp \
    25         Concurrency/Waitfor.h \
     25        Concurrency/Waitfor.hpp \
    2626        Concurrency/Waituntil.cpp \
    2727        Concurrency/Waituntil.hpp
  • src/ControlStruct/ExceptDecl.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "ExceptDecl.h"
     16#include "ExceptDecl.hpp"
    1717
    1818#include <sstream>
     
    2323#include "AST/Print.hpp"
    2424#include "AST/Type.hpp"
    25 #include "Virtual/Tables.h"
     25#include "Virtual/Tables.hpp"
    2626
    2727namespace ControlStruct {
  • src/ControlStruct/ExceptDecl.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExceptDecl.h -- Handles declarations of exception types.
     7// ExceptDecl.hpp -- Handles declarations of exception types.
    88//
    99// Author           : Henry Xue
  • src/ControlStruct/ExceptTranslate.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "ExceptTranslate.h"
     16#include "ExceptTranslate.hpp"
    1717
    1818#include "AST/Expr.hpp"
  • src/ControlStruct/module.mk

    rec20ab9 rbf4fe05  
    1717SRC += \
    1818        ControlStruct/ExceptDecl.cpp \
    19         ControlStruct/ExceptDecl.h \
     19        ControlStruct/ExceptDecl.hpp \
    2020        ControlStruct/ExceptTranslate.cpp \
    21         ControlStruct/ExceptTranslate.h \
     21        ControlStruct/ExceptTranslate.hpp \
    2222        ControlStruct/FixLabels.cpp \
    2323        ControlStruct/FixLabels.hpp \
  • src/GenPoly/Box.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "Box.h"
     16#include "Box.hpp"
    1717
    1818#include "AST/Decl.hpp"                // for Decl, FunctionDecl, ...
     
    2424#include "AST/Vector.hpp"              // for vector
    2525#include "AST/GenericSubstitution.hpp" // for genericSubstitution
    26 #include "CodeGen/OperatorTable.h   // for isAssignment
     26#include "CodeGen/OperatorTable.hpp"   // for isAssignment
    2727#include "Common/Iterate.hpp"          // for group_iterate
    28 #include "Common/ScopedMap.h        // for ScopedMap
     28#include "Common/ScopedMap.hpp"        // for ScopedMap
    2929#include "Common/ToString.hpp"         // for toCString
    30 #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
     30#include "Common/UniqueName.hpp"       // for UniqueName
     31#include "GenPoly/FindFunction.hpp"    // for findFunction
     32#include "GenPoly/GenPoly.hpp"         // for getFunctionType, ...
     33#include "GenPoly/Lvalue.hpp"          // for generalizedLvalue
     34#include "GenPoly/ScopedSet.hpp"       // for ScopedSet
    3535#include "GenPoly/ScrubTypeVars.hpp"   // for scrubTypeVars, scrubAllTypeVars
    36 #include "ResolvExpr/Unify.h        // for typesCompatible
    37 #include "SymTab/Mangler.h          // for mangle, mangleType
     36#include "ResolvExpr/Unify.hpp"        // for typesCompatible
     37#include "SymTab/Mangler.hpp"          // for mangle, mangleType
    3838
    3939namespace GenPoly {
  • src/GenPoly/Box.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Box.h -- Implement polymorphic function calls and types.
     7// Box.hpp -- Implement polymorphic function calls and types.
    88//
    99// Author           : Richard C. Bilson
  • src/GenPoly/ErasableScopedMap.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ErasableScopedMap.h -- A map that supports scoping and erasing elements.
     7// ErasableScopedMap.hpp -- A map that supports scoping and erasing elements.
    88//
    99// Author           : Aaron B. Moss
  • src/GenPoly/FindFunction.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FindFunction.cc -- Find function types in a larger type.
     7// FindFunction.cpp -- Find function types in a larger type.
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "FindFunction.h"
     16#include "FindFunction.hpp"
    1717
    18 #include <utility>                      // for pair
     18#include <utility>                        // for pair
    1919
    20 #include "AST/Pass.hpp"                 // for Pass
     20#include "AST/Pass.hpp"                   // for Pass
    2121#include "AST/Type.hpp"
    22 #include "GenPoly/ErasableScopedMap.h"  // for ErasableScopedMap<>::iterator
    23 #include "GenPoly/GenPoly.h"            // for TyVarMap
    24 #include "ScrubTypeVars.hpp"            // for scrubTypeVars
     22#include "GenPoly/ErasableScopedMap.hpp"  // for ErasableScopedMap<>::iterator
     23#include "GenPoly/GenPoly.hpp"            // for TyVarMap
     24#include "ScrubTypeVars.hpp"              // for scrubTypeVars
    2525
    2626namespace GenPoly {
  • src/GenPoly/FindFunction.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FindFunction.h -- Find function types in a larger type.
     7// FindFunction.hpp -- Find function types in a larger type.
    88//
    99// Author           : Richard C. Bilson
     
    1616#pragma once
    1717
    18 #include "GenPoly.h"            // for TypeVarMap
     18#include "GenPoly.hpp"            // for TypeVarMap
    1919
    2020namespace GenPoly {
  • src/GenPoly/GenPoly.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenPoly.cc -- General GenPoly utilities.
     7// GenPoly.cpp -- General GenPoly utilities.
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "GenPoly.h"
    17 
    18 #include <cassert>                      // for assertf, assert
    19 #include <iostream>                     // for operator<<, ostream, basic_os...
    20 #include <iterator>                     // for back_insert_iterator, back_in...
    21 #include <list>                         // for list, _List_iterator, list<>:...
    22 #include <typeindex>                    // for type_index
    23 #include <utility>                      // for pair
    24 #include <vector>                       // for vector
     16#include "GenPoly.hpp"
     17
     18#include <cassert>                        // for assertf, assert
     19#include <iostream>                       // for operator<<, ostream, basic_...
     20#include <iterator>                       // for back_insert_iterator, back_...
     21#include <list>                           // for list, _List_iterator, list<...
     22#include <typeindex>                      // for type_index
     23#include <utility>                        // for pair
     24#include <vector>                         // for vector
    2525
    2626#include "AST/Expr.hpp"
    2727#include "AST/Type.hpp"
    2828#include "AST/TypeSubstitution.hpp"
    29 #include "GenPoly/ErasableScopedMap.h"  // for ErasableScopedMap<>::const_it...
    30 #include "ResolvExpr/typeops.h"         // for flatten
     29#include "GenPoly/ErasableScopedMap.hpp"  // for ErasableScopedMap<>::const_...
     30#include "ResolvExpr/Typeops.hpp"         // for flatten
    3131
    3232using namespace std;
     
    256256
    257257        // So remaining types can be examined case by case.
    258         // Recurse through type structure (conditions borrowed from Unify.cc).
     258        // Recurse through type structure (conditions borrowed from Unify.cpp).
    259259
    260260        if ( type_index(typeid(ast::BasicType)) == lid ) {
  • src/GenPoly/GenPoly.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenPoly.h -- General GenPoly utilities.
     7// GenPoly.hpp -- General GenPoly utilities.
    88//
    99// Author           : Richard C. Bilson
     
    1919#include <string>                 // for string, allocator, operator+, basic...
    2020
    21 #include "ErasableScopedMap.h  // for ErasableScopedMap
     21#include "ErasableScopedMap.hpp"  // for ErasableScopedMap
    2222#include "AST/Decl.hpp"           // for AggregateDecl
    2323#include "AST/Fwd.hpp"            // for ApplicationExpr, BaseInstType, Func...
    24 #include "SymTab/Mangler.h     // for Mangler
     24#include "SymTab/Mangler.hpp"     // for Mangler
    2525
    2626namespace ast {
  • src/GenPoly/InstantiateGeneric.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "InstantiateGeneric.h"
     16#include "InstantiateGeneric.hpp"
    1717
    1818#include <cassert>                     // for assertf, assert
     
    2727#include "AST/TranslationUnit.hpp"     // for TranslationUnit
    2828#include "AST/Vector.hpp"              // for vector
    29 #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
     29#include "CodeGen/OperatorTable.hpp"   // for isAssignment
     30#include "Common/ScopedMap.hpp"        // for ScopedMap
     31#include "Common/UniqueName.hpp"       // for UniqueName
     32#include "GenPoly/GenPoly.hpp"         // for isPolyType, typesPolyCompatible
    3333#include "GenPoly/ScrubTypeVars.hpp"   // for scrubAllTypeVars
    3434#include "ResolvExpr/AdjustExprType.hpp"  // for adjustExprType
    35 #include "ResolvExpr/Unify.h        // for typesCompatible
     35#include "ResolvExpr/Unify.hpp"        // for typesCompatible
    3636
    3737namespace GenPoly {
  • src/GenPoly/InstantiateGeneric.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // InstantiateGeneric.h -- Create concrete instances of generic types.
     7// InstantiateGeneric.hpp -- Create concrete instances of generic types.
    88//
    99// Author           : Aaron B. Moss
  • src/GenPoly/Lvalue.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "Lvalue.h"
     16#include "Lvalue.hpp"
    1717
    1818#include <set>
     
    2424#include "AST/LinkageSpec.hpp"         // for Linkage
    2525#include "AST/Pass.hpp"
    26 #include "Common/SemanticError.h    // for SemanticWarning
     26#include "Common/SemanticError.hpp"    // for SemanticWarning
    2727#include "Common/ToString.hpp"         // for toCString
    28 #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
     28#include "Common/UniqueName.hpp"       // for UniqueName
     29#include "GenPoly/GenPoly.hpp"         // for genFunctionType
     30#include "ResolvExpr/Typeops.hpp"      // for typesCompatible
     31#include "ResolvExpr/Unify.hpp"        // for unify
    3232
    3333#if 0
  • src/GenPoly/Lvalue.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Lvalue.h -- Clean up lvalues and remove references.
     7// Lvalue.hpp -- Clean up lvalues and remove references.
    88//
    99// Author           : Richard C. Bilson
  • src/GenPoly/Lvalue2.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Lvalue2.cc -- Seperate Lvalue module for linking.
     7// Lvalue2.cpp -- Seperate Lvalue module for linking.
    88//
    99// Author           : Andrew Beach
  • src/GenPoly/ScopedSet.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ScopedSet.h -- A set that supports save/restore scoping.
     7// ScopedSet.hpp -- A set that supports save/restore scoping.
    88//
    99// Author           : Aaron B. Moss
  • src/GenPoly/ScrubTypeVars.cpp

    rec20ab9 rbf4fe05  
    1616#include "ScrubTypeVars.hpp"
    1717
    18 #include <utility>                      // for pair
     18#include <utility>                        // for pair
    1919
    2020#include "AST/Pass.hpp"
    21 #include "GenPoly.h"                    // for mangleType, TyVarMap, alignof...
    22 #include "GenPoly/ErasableScopedMap.h"  // for ErasableScopedMap<>::const_it...
    23 #include "SymTab/Mangler.h"             // for mangleType
     21#include "GenPoly.hpp"                    // for mangleType, TyVarMap, align...
     22#include "GenPoly/ErasableScopedMap.hpp"  // for ErasableScopedMap<>::const_...
     23#include "SymTab/Mangler.hpp"             // for mangleType
    2424
    2525namespace GenPoly {
  • src/GenPoly/ScrubTypeVars.hpp

    rec20ab9 rbf4fe05  
    1919
    2020#include "AST/Fwd.hpp"        // for Node
    21 #include "GenPoly.h        // for TypeVarMap
     21#include "GenPoly.hpp"        // for TypeVarMap
    2222
    2323namespace GenPoly {
  • src/GenPoly/Specialize.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "Specialize.h"
     16#include "Specialize.hpp"
    1717
    1818#include "AST/Copy.hpp"                  // for deepCopy
     
    2020#include "AST/Pass.hpp"                  // for Pass
    2121#include "AST/TypeEnvironment.hpp"       // for OpenVarSet, AssertionSet
    22 #include "Common/UniqueName.h         // for UniqueName
    23 #include "GenPoly/GenPoly.h           // for getFunctionType
    24 #include "ResolvExpr/FindOpenVars.h   // for findOpenVars
     22#include "Common/UniqueName.hpp"         // for UniqueName
     23#include "GenPoly/GenPoly.hpp"           // for getFunctionType
     24#include "ResolvExpr/FindOpenVars.hpp"   // for findOpenVars
    2525
    2626namespace GenPoly {
  • src/GenPoly/Specialize.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Specialize.h -- Generate thunks to specialize polymorphic functions.
     7// Specialize.hpp -- Generate thunks to specialize polymorphic functions.
    88//
    99// Author           : Richard C. Bilson
  • src/GenPoly/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC_GENPOLY = \
    18         GenPoly/GenPoly.cc \
    19         GenPoly/GenPoly.h \
    20         GenPoly/Lvalue2.cc \
    21         GenPoly/Lvalue.h
     18        GenPoly/GenPoly.cpp \
     19        GenPoly/GenPoly.hpp \
     20        GenPoly/Lvalue2.cpp \
     21        GenPoly/Lvalue.hpp
    2222
    2323SRC += $(SRC_GENPOLY) \
    2424        GenPoly/Box.cpp \
    25         GenPoly/Box.h \
    26         GenPoly/ErasableScopedMap.h \
    27         GenPoly/FindFunction.cc \
    28         GenPoly/FindFunction.h \
     25        GenPoly/Box.hpp \
     26        GenPoly/ErasableScopedMap.hpp \
     27        GenPoly/FindFunction.cpp \
     28        GenPoly/FindFunction.hpp \
    2929        GenPoly/InstantiateGeneric.cpp \
    30         GenPoly/InstantiateGeneric.h \
     30        GenPoly/InstantiateGeneric.hpp \
    3131        GenPoly/Lvalue.cpp \
    32         GenPoly/ScopedSet.h \
     32        GenPoly/ScopedSet.hpp \
    3333        GenPoly/ScrubTypeVars.cpp \
    3434        GenPoly/ScrubTypeVars.hpp \
    3535        GenPoly/Specialize.cpp \
    36         GenPoly/Specialize.h
     36        GenPoly/Specialize.hpp
    3737
    3838SRCDEMANGLE += $(SRC_GENPOLY)
  • src/InitTweak/FixGlobalInit.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixGlobalInit.cc --
     7// FixGlobalInit.cpp --
    88//
    99// Author           : Rob Schluntz
     
    1414//
    1515
    16 #include "FixGlobalInit.h"
     16#include "FixGlobalInit.hpp"
    1717
    1818#include <cassert>                 // for assert
     
    2323#include "AST/Node.hpp"
    2424#include "AST/Pass.hpp"
    25 #include "Common/UniqueName.h   // for UniqueName
    26 #include "InitTweak.h           // for isIntrinsicSingleArgCallStmt
     25#include "Common/UniqueName.hpp"   // for UniqueName
     26#include "InitTweak.hpp"           // for isIntrinsicSingleArgCallStmt
    2727
    2828namespace InitTweak {
  • src/InitTweak/FixGlobalInit.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixGlobalInit.h --
     7// FixGlobalInit.hpp --
    88//
    99// Author           : Rob Schluntz
  • src/InitTweak/FixInit.cpp

    rec20ab9 rbf4fe05  
    1 #include "FixInit.h"
     1#include "FixInit.hpp"
    22
    33#include <stddef.h>                    // for NULL
     
    2222#include "AST/SymbolTable.hpp"
    2323#include "AST/Type.hpp"
    24 #include "CodeGen/OperatorTable.h   // for isConstructor, isCtorDtor, isD...
    25 #include "Common/SemanticError.h    // for SemanticError
     24#include "CodeGen/OperatorTable.hpp"   // for isConstructor, isCtorDtor, isD...
     25#include "Common/SemanticError.hpp"    // for SemanticError
    2626#include "Common/ToString.hpp"         // for toCString
    27 #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
     27#include "Common/UniqueName.hpp"       // for UniqueName
     28#include "FixGlobalInit.hpp"           // for fixGlobalInit
     29#include "GenInit.hpp"                 // for genCtorDtor
     30#include "GenPoly/GenPoly.hpp"         // for getFunctionType
     31#include "ResolvExpr/Resolver.hpp"     // for findVoidExpression
     32#include "ResolvExpr/Unify.hpp"        // for typesCompatible
    3333#include "SymTab/GenImplicitCall.hpp"  // for genImplicitCall
    3434
  • src/InitTweak/FixInit.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixInit.h --
     7// FixInit.hpp --
    88//
    99// Author           : Rob Schluntz
  • src/InitTweak/GenInit.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenInit.cc -- Generate initializers, and other stuff.
     7// GenInit.cpp -- Generate initializers, and other stuff.
    88//
    99// Author           : Rob Schluntz
     
    1313// Update Count     : 186
    1414//
    15 #include "GenInit.h"
     15#include "GenInit.hpp"
    1616
    1717#include <stddef.h>                    // for NULL
     
    2828#include "AST/Stmt.hpp"
    2929#include "CompilationState.hpp"
    30 #include "CodeGen/OperatorTable.h"
    31 #include "Common/SemanticError.h    // for SemanticError
     30#include "CodeGen/OperatorTable.hpp"
     31#include "Common/SemanticError.hpp"    // for SemanticError
    3232#include "Common/ToString.hpp"         // for toCString
    33 #include "Common/UniqueName.h       // for UniqueName
    34 #include "Common/utility.h"            // for ValueGuard, maybeClone
    35 #include "GenPoly/GenPoly.h         // for getFunctionType, isPolyType
    36 #include "GenPoly/ScopedSet.h       // for ScopedSet, ScopedSet<>::const_iter...
    37 #include "InitTweak.h               // for isConstExpr, InitExpander, checkIn...
    38 #include "ResolvExpr/Resolver.h"
     33#include "Common/UniqueName.hpp"       // for UniqueName
     34#include "Common/Utility.hpp"          // for ValueGuard, maybeClone
     35#include "GenPoly/GenPoly.hpp"         // for getFunctionType, isPolyType
     36#include "GenPoly/ScopedSet.hpp"       // for ScopedSet, ScopedSet<>::const_iter...
     37#include "InitTweak.hpp"               // for isConstExpr, InitExpander, checkIn...
     38#include "ResolvExpr/Resolver.hpp"
    3939#include "SymTab/GenImplicitCall.hpp"  // for genImplicitCall
    40 #include "SymTab/Mangler.h"            // for Mangler
    41 #include "Tuples/Tuples.h"             // for maybeImpure
    42 #include "Validate/FindSpecialDecls.h" // for SizeType
     40#include "SymTab/Mangler.hpp"          // for Mangler
     41#include "Tuples/Tuples.hpp"           // for maybeImpure
    4342
    4443namespace InitTweak {
     
    334333
    335334ast::ConstructorInit * genCtorInit( const CodeLocation & loc, const ast::ObjectDecl * objDecl ) {
    336         // call into genImplicitCall from Autogen.h to generate calls to ctor/dtor for each
    337         // constructable object
     335        // Call genImplicitCall to generate calls to ctor/dtor for each constructable object.
    338336        InitExpander srcParam{ objDecl->init }, nullParam{ (const ast::Init *)nullptr };
    339337        ast::ptr< ast::Expr > dstParam = new ast::VariableExpr(loc, objDecl);
  • src/InitTweak/GenInit.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenInit.h -- Generate initializers, and other stuff.
     7// GenInit.hpp -- Generate initializers, and other stuff.
    88//
    99// Author           : Rodolfo G. Esteves
     
    2020
    2121#include "AST/Fwd.hpp"
    22 #include "Common/CodeLocation.h"
    23 #include "GenPoly/ScopedSet.h" // for ScopedSet
     22#include "Common/CodeLocation.hpp"
     23#include "GenPoly/ScopedSet.hpp"  // for ScopedSet
    2424
    2525namespace InitTweak {
  • src/InitTweak/InitTweak.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // InitTweak.cc --
     7// InitTweak.cpp --
    88//
    99// Author           : Rob Schluntz
     
    1414//
    1515
    16 #include "InitTweak.h"
    17 
    18 #include <algorithm>               // for find, all_of
    19 #include <cassert>                 // for assertf, assert, strict_dynamic_cast
    20 #include <iostream>                // for ostream, cerr, endl
    21 #include <iterator>                // for back_insert_iterator, back_inserter
    22 #include <memory>                  // for __shared_ptr
     16#include "InitTweak.hpp"
     17
     18#include <algorithm>                  // for find, all_of
     19#include <cassert>                    // for assertf, assert, strict_dynamic_...
     20#include <iostream>                   // for ostream, cerr, endl
     21#include <iterator>                   // for back_insert_iterator, back_inser...
     22#include <memory>                     // for __shared_ptr
    2323#include <vector>
    2424
     
    3030#include "AST/Stmt.hpp"
    3131#include "AST/Type.hpp"
    32 #include "CodeGen/OperatorTable.h" // for isConstructor, isDestructor, isCto...
    33 #include "Common/SemanticError.h"  // for SemanticError
    34 #include "Common/ToString.hpp"     // for toCString
    35 #include "Common/UniqueName.h"     // for UniqueName
    36 #include "GenPoly/GenPoly.h"       // for getFunctionType
    37 #include "ResolvExpr/Unify.h"      // for typesCompatibleIgnoreQualifiers
    38 #include "Tuples/Tuples.h"         // for Tuples::isTtype
     32#include "CodeGen/OperatorTable.hpp"  // for isConstructor, isDestructor, isC...
     33#include "Common/SemanticError.hpp"   // for SemanticError
     34#include "Common/ToString.hpp"        // for toCString
     35#include "Common/UniqueName.hpp"      // for UniqueName
     36#include "GenPoly/GenPoly.hpp"        // for getFunctionType
     37#include "ResolvExpr/Unify.hpp"       // for typesCompatibleIgnoreQualifiers
     38#include "Tuples/Tuples.hpp"          // for Tuples::isTtype
    3939
    4040namespace InitTweak {
  • src/InitTweak/InitTweak.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // InitTweak.h --
     7// InitTweak.hpp --
    88//
    99// Author           : Rob Schluntz
  • src/InitTweak/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC_INITTWEAK = \
    18         InitTweak/GenInit.cc \
    19         InitTweak/GenInit.h \
    20         InitTweak/InitTweak.cc \
    21         InitTweak/InitTweak.h
     18        InitTweak/GenInit.cpp \
     19        InitTweak/GenInit.hpp \
     20        InitTweak/InitTweak.cpp \
     21        InitTweak/InitTweak.hpp
    2222
    2323SRC += $(SRC_INITTWEAK) \
    24         InitTweak/FixGlobalInit.cc \
    25         InitTweak/FixGlobalInit.h \
     24        InitTweak/FixGlobalInit.cpp \
     25        InitTweak/FixGlobalInit.hpp \
    2626        InitTweak/FixInit.cpp \
    27         InitTweak/FixInit.h
     27        InitTweak/FixInit.hpp
    2828
    2929SRCDEMANGLE += $(SRC_INITTWEAK)
  • src/MakeLibCfa.cpp

    rec20ab9 rbf4fe05  
    1919#include "AST/Fwd.hpp"
    2020#include "AST/Pass.hpp"
    21 #include "CodeGen/OperatorTable.h"
    22 #include "Common/UniqueName.h"
     21#include "CodeGen/OperatorTable.hpp"
     22#include "Common/UniqueName.hpp"
    2323
    2424namespace LibCfa {
  • src/Makefile.am

    rec20ab9 rbf4fe05  
    5353include Virtual/module.mk
    5454
    55 $(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cc ResolvExpr/CommonType.cc SymTab/ManglerCommon.cc) : $(srcdir)/AST/BasicKind.hpp
     55$(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cpp ResolvExpr/CommonType.cpp SymTab/ManglerCommon.cpp) : $(srcdir)/AST/BasicKind.hpp
    5656
    5757$(srcdir)/AST/BasicKind.hpp : BasicTypes-gen.cpp
     
    6565___driver_cfa_cpp_SOURCES = $(SRC)
    6666___driver_cfa_cpp_LDADD = -ldl $(LIBPROFILER) $(LIBTCMALLOC)
    67 EXTRA_DIST = include/cassert include/optional BasicTypes-gen.cc
     67EXTRA_DIST = include/cassert include/optional BasicTypes-gen.cpp
    6868
    6969AM_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)
     
    7373cfa_cpplib_PROGRAMS += $(DEMANGLER)
    7474EXTRA_PROGRAMS = ../driver/demangler
    75 ___driver_demangler_SOURCES = SymTab/demangler.cc # test driver for the demangler, also useful as a sanity check that libdemangle.a is complete
     75___driver_demangler_SOURCES = SymTab/demangler.cpp # test driver for the demangler, also useful as a sanity check that libdemangle.a is complete
    7676___driver_demangler_LDADD = libdemangle.a -ldl                  # yywrap
    7777noinst_LIBRARIES = $(LIBDEMANGLE)
  • src/Parser/DeclarationNode.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // DeclarationNode.cc --
     7// DeclarationNode.cpp --
    88//
    99// Author           : Rodolfo G. Esteves
     
    1414//
    1515
    16 #include "DeclarationNode.h"
    17 
    18 #include <cassert>                 // for assert, assertf, strict_dynamic_cast
    19 #include <iterator>                // for back_insert_iterator
    20 #include <list>                    // for list
    21 #include <memory>                  // for unique_ptr
    22 #include <ostream>                 // for operator<<, ostream, basic_ostream
    23 #include <string>                  // for string, operator+, allocator, char...
    24 
    25 #include "AST/Attribute.hpp"       // for Attribute
    26 #include "AST/Copy.hpp"            // for shallowCopy
    27 #include "AST/Decl.hpp"            // for Decl
    28 #include "AST/Expr.hpp"            // for Expr
    29 #include "AST/Print.hpp"           // for print
    30 #include "AST/Stmt.hpp"            // for AsmStmt, DirectiveStmt
    31 #include "AST/StorageClasses.hpp"  // for Storage::Class
    32 #include "AST/Type.hpp"            // for Type
    33 #include "Common/CodeLocation.h"   // for CodeLocation
    34 #include "Common/Iterate.hpp"      // for reverseIterate
    35 #include "Common/SemanticError.h"  // for SemanticError
    36 #include "Common/UniqueName.h"     // for UniqueName
    37 #include "Common/utility.h"        // for copy, spliceBegin
    38 #include "Parser/ExpressionNode.h" // for ExpressionNode
    39 #include "Parser/InitializerNode.h"// for InitializerNode
    40 #include "Parser/StatementNode.h"  // for StatementNode
    41 #include "TypeData.h"              // for TypeData, TypeData::Aggregate_t
    42 #include "TypedefTable.h"          // for TypedefTable
     16#include "DeclarationNode.hpp"
     17
     18#include <cassert>                     // for assert, assertf, strict_dynami...
     19#include <iterator>                    // for back_insert_iterator
     20#include <list>                        // for list
     21#include <memory>                      // for unique_ptr
     22#include <ostream>                     // for operator<<, ostream, basic_ost...
     23#include <string>                      // for string, operator+, allocator, ...
     24
     25#include "AST/Attribute.hpp"           // for Attribute
     26#include "AST/Copy.hpp"                // for shallowCopy
     27#include "AST/Decl.hpp"                // for Decl
     28#include "AST/Expr.hpp"                // for Expr
     29#include "AST/Print.hpp"               // for print
     30#include "AST/Stmt.hpp"                // for AsmStmt, DirectiveStmt
     31#include "AST/StorageClasses.hpp"      // for Storage::Class
     32#include "AST/Type.hpp"                // for Type
     33#include "Common/CodeLocation.hpp"     // for CodeLocation
     34#include "Common/Iterate.hpp"          // for reverseIterate
     35#include "Common/SemanticError.hpp"    // for SemanticError
     36#include "Common/UniqueName.hpp"       // for UniqueName
     37#include "Common/Utility.hpp"          // for copy, spliceBegin
     38#include "Parser/ExpressionNode.hpp"  // for ExpressionNode
     39#include "Parser/InitializerNode.hpp"  // for InitializerNode
     40#include "Parser/StatementNode.hpp"    // for StatementNode
     41#include "TypeData.hpp"                // for TypeData, TypeData::Aggregate_t
     42#include "TypedefTable.hpp"            // for TypedefTable
    4343
    4444extern TypedefTable typedefTable;
  • src/Parser/DeclarationNode.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // DeclarationNode.h --
     7// DeclarationNode.hpp --
    88//
    99// Author           : Andrew Beach
     
    1616#pragma once
    1717
    18 #include "ParseNode.h"
     18#include "ParseNode.hpp"
    1919
    2020struct TypeData;
  • src/Parser/ExpressionNode.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpressionNode.cc --
     7// ExpressionNode.cpp --
    88//
    99// Author           : Peter A. Buhr
     
    1414//
    1515
    16 #include "ExpressionNode.h"
     16#include "ExpressionNode.hpp"
    1717
    1818#include <cassert>                 // for assert
     
    2626#include "AST/Expr.hpp"            // for NameExpr
    2727#include "AST/Type.hpp"            // for Type, LengthFlag, DimentionFlag
    28 #include "Common/SemanticError.h// for SemanticError
    29 #include "Common/utility.h"        // for maybeMoveBuild, maybeBuild, CodeLo...
    30 #include "DeclarationNode.h     // for DeclarationNode
    31 #include "InitializerNode.h     // for InitializerNode
    32 #include "TypeData.h            // for addType, build_basic_type, build_c...
    33 #include "parserutility.h"         // for notZeroExpr
     28#include "Common/SemanticError.hpp"// for SemanticError
     29#include "Common/Utility.hpp"      // for maybeMoveBuild, maybeBuild, CodeLo...
     30#include "DeclarationNode.hpp"     // for DeclarationNode
     31#include "InitializerNode.hpp"     // for InitializerNode
     32#include "TypeData.hpp"            // for addType, build_basic_type, build_c...
     33#include "ParserUtility.hpp"       // for notZeroExpr
    3434
    3535using namespace std;
  • src/Parser/ExpressionNode.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpressionNode.h --
     7// ExpressionNode.hpp --
    88//
    99// Author           : Andrew Beach
     
    1616#pragma once
    1717
    18 #include "ParseNode.h"
     18#include "ParseNode.hpp"
    1919
    2020struct InitializerNode;
  • src/Parser/InitializerNode.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // InitializerNode.cc --
     7// InitializerNode.cpp --
    88//
    99// Author           : Rodolfo G. Esteves
     
    1414//
    1515
    16 #include "InitializerNode.h"
     16#include "InitializerNode.hpp"
    1717
    18 #include <iostream>                // for operator<<, ostream, basic_ostream
    19 #include <list>                    // for list
    20 #include <string>                  // for operator<<, string
     18#include <iostream>                  // for operator<<, ostream, basic_ostream
     19#include <list>                      // for list
     20#include <string>                    // for operator<<, string
    2121
    22 #include "AST/Expr.hpp"            // for Expr
    23 #include "AST/Init.hpp"            // for Designator, Init, ListInit, Sing...
    24 #include "Common/SemanticError.h"  // for SemanticError
    25 #include "Common/utility.h"        // for maybeBuild
    26 #include "ExpressionNode.h"        // for ExpressionNode
    27 #include "DeclarationNode.h"       // for buildList
     22#include "AST/Expr.hpp"              // for Expr
     23#include "AST/Init.hpp"              // for Designator, Init, ListInit, Sing...
     24#include "Common/SemanticError.hpp"  // for SemanticError
     25#include "Common/Utility.hpp"        // for maybeBuild
     26#include "ExpressionNode.hpp"        // for ExpressionNode
     27#include "DeclarationNode.hpp"       // for buildList
    2828
    2929using namespace std;
  • src/Parser/InitializerNode.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // InitializerNode.h --
     7// InitializerNode.hpp --
    88//
    99// Author           : Andrew Beach
     
    1616#pragma once
    1717
    18 #include "ParseNode.h"
     18#include "ParseNode.hpp"
    1919
    2020struct InitializerNode final : public ParseList<InitializerNode> {
  • src/Parser/ParseNode.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ParseNode.cc --
     7// ParseNode.cpp --
    88//
    99// Author           : Rodolfo G. Esteves
     
    1414//
    1515
    16 #include "ParseNode.h"
     16#include "ParseNode.hpp"
    1717using namespace std;
    1818
  • src/Parser/ParseNode.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ParseNode.h --
     7// ParseNode.hpp --
    88//
    99// Author           : Rodolfo G. Esteves
     
    1616#pragma once
    1717
    18 #include <algorithm>               // for move
    19 #include <cassert>                 // for assert, assertf
    20 #include <iosfwd>                  // for ostream
    21 #include <iterator>                // for back_insert_iterator
    22 #include <list>                    // for list
    23 #include <memory>                  // for unique_ptr, pointer_traits
    24 #include <string>                  // for string
     18#include <algorithm>                 // for move
     19#include <cassert>                   // for assert, assertf
     20#include <iosfwd>                    // for ostream
     21#include <iterator>                  // for back_insert_iterator
     22#include <list>                      // for list
     23#include <memory>                    // for unique_ptr, pointer_traits
     24#include <string>                    // for string
    2525
    26 #include "AST/Expr.hpp"            // for Expr, NameExpr LogicalFlag
    27 #include "AST/Fwd.hpp"             // for ptr, Decl, DeclWithType,
    28 #include "AST/Stmt.hpp"            // for Stmt
    29 #include "Common/CodeLocation.h"   // for CodeLocation
    30 #include "Common/SemanticError.h"  // for SemanticError
    31 #include "Common/UniqueName.h"     // for UniqueName
    32 #include "Parser/parserutility.h"  // for maybeBuild, maybeCopy
     26#include "AST/Expr.hpp"              // for Expr, NameExpr, LogicalFlag
     27#include "AST/Fwd.hpp"               // for ptr, Decl, DeclWithType,
     28#include "AST/Stmt.hpp"              // for Stmt
     29#include "Common/CodeLocation.hpp"   // for CodeLocation
     30#include "Common/SemanticError.hpp"  // for SemanticError
     31#include "Common/UniqueName.hpp"     // for UniqueName
     32#include "Parser/ParserUtility.hpp"  // for maybeBuild, maybeCopy
    3333
    3434struct DeclarationNode;
  • src/Parser/ParserTypes.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // parser.hh --
     7// ParserTypes.hpp --
    88//
    99// Author           : Peter A. Buhr
     
    2020
    2121#include <string>
    22 #include "ParseNode.h"
     22#include "ParseNode.hpp"
    2323// External declarations for information sharing between lexer and scanner
    2424class TypedefTable;
  • src/Parser/ParserUtility.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // parserutility.h -- Collected utilities for the parser.
     7// ParserUtility.hpp -- Collected utilities for the parser.
    88//
    99// Author           : Rodolfo G. Esteves
  • src/Parser/RunParser.cpp

    rec20ab9 rbf4fe05  
    1818#include "AST/TranslationUnit.hpp"          // for TranslationUnit
    1919#include "Common/CodeLocationTools.hpp"     // for forceFillCodeLocations
    20 #include "Parser/DeclarationNode.h       // for DeclarationNode, buildList
    21 #include "Parser/TypedefTable.h          // for TypedefTable
     20#include "Parser/DeclarationNode.hpp"       // for DeclarationNode, buildList
     21#include "Parser/TypedefTable.hpp"          // for TypedefTable
    2222
    2323// Variables global to the parsing code.
  • src/Parser/StatementNode.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // StatementNode.cc -- Transform from parse data-structures to AST data-structures, usually deleting the parse
     7// StatementNode.cpp -- Transform from parse data-structures to AST data-structures, usually deleting the parse
    88//     data-structure after the transformation.
    99//
     
    1515//
    1616
    17 #include "StatementNode.h"
     17#include "StatementNode.hpp"
    1818
    1919#include <cassert>                 // for assert, strict_dynamic_cast, assertf
     
    2323#include "AST/Label.hpp"           // for Label
    2424#include "AST/Stmt.hpp"            // for Stmt, AsmStmt, BranchStmt, CaseCla...
    25 #include "Common/SemanticError.h// for SemanticError
    26 #include "Common/utility.h"        // for maybeMoveBuild, maybeBuild
    27 #include "DeclarationNode.h     // for DeclarationNode
    28 #include "ExpressionNode.h      // for ExpressionNode
    29 #include "parserutility.h"         // for notZeroExpr
     25#include "Common/SemanticError.hpp"// for SemanticError
     26#include "Common/Utility.hpp"      // for maybeMoveBuild, maybeBuild
     27#include "DeclarationNode.hpp"     // for DeclarationNode
     28#include "ExpressionNode.hpp"      // for ExpressionNode
     29#include "ParserUtility.hpp"       // for notZeroExpr
    3030
    3131class Declaration;
  • src/Parser/StatementNode.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // StatementNode.h --
     7// StatementNode.hpp --
    88//
    99// Author           : Andrew Beach
     
    1616#pragma once
    1717
    18 #include "ParseNode.h"
     18#include "ParseNode.hpp"
    1919
    2020struct StatementNode final : public ParseList<StatementNode> {
  • src/Parser/TypeData.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeData.cc --
     7// TypeData.cpp --
    88//
    99// Author           : Rodolfo G. Esteves
     
    1414//
    1515
    16 #include "TypeData.h"
    17 
    18 #include <cassert>                 // for assert
    19 #include <ostream>                 // for operator<<, ostream, basic_ostream
    20 
    21 #include "AST/Attribute.hpp"       // for Attribute
    22 #include "AST/Decl.hpp"            // for AggregateDecl, ObjectDecl, TypeDe...
    23 #include "AST/Init.hpp"            // for SingleInit, ListInit
    24 #include "AST/Print.hpp"           // for print
    25 #include "AST/Type.hpp"            // for Type
    26 #include "Common/SemanticError.h"  // for SemanticError
    27 #include "Common/utility.h"        // for splice, spliceBegin
    28 #include "Common/Iterate.hpp"      // for reverseIterate
    29 #include "Parser/ExpressionNode.h" // for ExpressionNode
    30 #include "Parser/StatementNode.h"  // for StatementNode
     16#include "TypeData.hpp"
     17
     18#include <cassert>                   // for assert
     19#include <ostream>                   // for operator<<, ostream, basic_ostream
     20
     21#include "AST/Attribute.hpp"         // for Attribute
     22#include "AST/Decl.hpp"              // for AggregateDecl, ObjectDecl, Type...
     23#include "AST/Init.hpp"              // for SingleInit, ListInit
     24#include "AST/Print.hpp"             // for print
     25#include "AST/Type.hpp"              // for Type
     26#include "Common/SemanticError.hpp"  // for SemanticError
     27#include "Common/Utility.hpp"        // for splice, spliceBegin
     28#include "Common/Iterate.hpp"        // for reverseIterate
     29#include "Parser/ExpressionNode.hpp" // for ExpressionNode
     30#include "Parser/StatementNode.hpp"  // for StatementNode
    3131
    3232class Attribute;
  • src/Parser/TypeData.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeData.h --
     7// TypeData.hpp --
    88//
    99// Author           : Peter A. Buhr
     
    2222#include "AST/CVQualifiers.hpp"                     // for CV
    2323#include "AST/Fwd.hpp"                              // for Type
    24 #include "DeclarationNode.h                      // for DeclarationNode
     24#include "DeclarationNode.hpp"                      // for DeclarationNode
    2525
    2626struct TypeData {
  • src/Parser/TypedefTable.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypedefTable.cc --
     7// TypedefTable.cpp --
    88//
    99// Author           : Peter A. Buhr
     
    1515
    1616
    17 #include "TypedefTable.h"
     17#include "TypedefTable.hpp"
    1818
    1919#include <cassert>                                                                              // for assert
     
    2323struct TypeData;
    2424
    25 #include "ExpressionNode.h"                                                             // for LabelNode
    26 #include "ParserTypes.h"                                                                // for Token
    27 #include "StatementNode.h"                                                              // for CondCtl, ForCtrl
     25#include "ExpressionNode.hpp"                                                   // for LabelNode
     26#include "ParserTypes.hpp"                                                              // for Token
     27#include "StatementNode.hpp"                                                    // for CondCtl, ForCtrl
    2828// This (generated) header must come late as it is missing includes.
    2929#include "parser.hh"                                                                    // for IDENTIFIER, TYPEDEFname, TYPEGENname
  • src/Parser/TypedefTable.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypedefTable.h --
     7// TypedefTable.hpp --
    88//
    99// Author           : Peter A. Buhr
     
    1818#include <string>                                                                               // for string
    1919
    20 #include "Common/ScopedMap.h"                                                   // for ScopedMap
     20#include "Common/ScopedMap.hpp"                                                 // for ScopedMap
    2121
    2222class TypedefTable {
  • src/Parser/lex.ll

    rec20ab9 rbf4fe05  
    4444
    4545#include "config.h"                                                                             // configure info
    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"
     46#include "DeclarationNode.hpp"                          // for DeclarationNode
     47#include "ExpressionNode.hpp"                           // for LabelNode
     48#include "InitializerNode.hpp"                          // for InitializerNode
     49#include "ParseNode.hpp"
     50#include "ParserTypes.hpp"                              // for Token
     51#include "StatementNode.hpp"                            // for CondCtl, ForCtrl
     52#include "TypedefTable.hpp"
    5353// This (generated) header must come late as it is missing includes.
    5454#include "parser.hh"                                    // generated info
  • src/Parser/module.mk

    rec20ab9 rbf4fe05  
    2020
    2121SRC += \
    22        Parser/DeclarationNode.cc \
    23        Parser/DeclarationNode.h \
    24        Parser/ExpressionNode.cc \
    25        Parser/ExpressionNode.h \
    26        Parser/InitializerNode.cc \
    27        Parser/InitializerNode.h \
     22       Parser/DeclarationNode.cpp \
     23       Parser/DeclarationNode.hpp \
     24       Parser/ExpressionNode.cpp \
     25       Parser/ExpressionNode.hpp \
     26       Parser/InitializerNode.cpp \
     27       Parser/InitializerNode.hpp \
    2828       Parser/lex.ll \
    29        Parser/ParseNode.cc \
    30        Parser/ParseNode.h \
     29       Parser/ParseNode.cpp \
     30       Parser/ParseNode.hpp \
    3131       Parser/parser.yy \
    32        Parser/ParserTypes.h \
    33        Parser/parserutility.h \
     32       Parser/ParserTypes.hpp \
     33       Parser/ParserUtility.hpp \
    3434       Parser/RunParser.cpp \
    3535       Parser/RunParser.hpp \
    36        Parser/StatementNode.cc \
    37        Parser/StatementNode.h \
    38        Parser/TypeData.cc \
    39        Parser/TypeData.h \
    40        Parser/TypedefTable.cc \
    41        Parser/TypedefTable.h
     36       Parser/StatementNode.cpp \
     37       Parser/StatementNode.hpp \
     38       Parser/TypeData.cpp \
     39       Parser/TypeData.hpp \
     40       Parser/TypedefTable.cpp \
     41       Parser/TypedefTable.hpp
    4242
    43 MOSTLYCLEANFILES += Parser/lex.cc Parser/parser.cc Parser/parser.hh Parser/parser.output
     43MOSTLYCLEANFILES += \
     44       Parser/lex.cc \
     45       Parser/parser.cc \
     46       Parser/parser.hh \
     47       Parser/parser.output
  • src/Parser/parser.yy

    rec20ab9 rbf4fe05  
    4848using namespace std;
    4949
    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"
     50#include "DeclarationNode.hpp"                          // for DeclarationNode, ...
     51#include "ExpressionNode.hpp"                           // for ExpressionNode, ...
     52#include "InitializerNode.hpp"                          // for InitializerNode, ...
     53#include "ParserTypes.hpp"
     54#include "StatementNode.hpp"                            // for build_...
     55#include "TypedefTable.hpp"
     56#include "TypeData.hpp"
    5757#include "AST/Type.hpp"                                 // for BasicType, BasicKind
    58 #include "Common/SemanticError.h"                                               // error_str
    59 #include "Common/utility.h"                                                             // for maybeMoveBuild, maybeBuild, CodeLo...
     58#include "Common/SemanticError.hpp"                     // error_str
     59#include "Common/Utility.hpp"                           // for maybeMoveBuild, maybeBuild, CodeLo...
    6060
    6161// lex uses __null in a boolean context, it's fine.
  • src/ResolvExpr/AdjustExprType.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // AdjustExprType_old.cc --
     7// AdjustExprType.cpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/Candidate.hpp

    rec20ab9 rbf4fe05  
    2020#include <vector>
    2121
    22 #include "Cost.h"
     22#include "Cost.hpp"
    2323#include "AST/Node.hpp"
    2424#include "AST/TypeEnvironment.hpp"
    25 #include "Common/Indenter.h"
     25#include "Common/Indenter.hpp"
    2626
    2727namespace ast {
  • src/ResolvExpr/CandidateFinder.cpp

    rec20ab9 rbf4fe05  
    1717
    1818#include <deque>
    19 #include <iterator>               // for back_inserter
     19#include <iterator>                 // for back_inserter
    2020#include <sstream>
    2121#include <string>
     
    2525#include "AdjustExprType.hpp"
    2626#include "Candidate.hpp"
    27 #include "CastCost.hpp"           // for castCost
     27#include "CastCost.hpp"             // for castCost
    2828#include "CompilationState.hpp"
    29 #include "ConversionCost.h"       // for conversionCast
    30 #include "Cost.h"
     29#include "ConversionCost.hpp"       // for conversionCast
     30#include "Cost.hpp"
    3131#include "ExplodedArg.hpp"
    3232#include "PolyCost.hpp"
    33 #include "RenameVars.h"           // for renameTyVars
    34 #include "Resolver.h"
    35 #include "ResolveTypeof.h"
     33#include "RenameVars.hpp"           // for renameTyVars
     34#include "Resolver.hpp"
     35#include "ResolveTypeof.hpp"
    3636#include "SatisfyAssertions.hpp"
    3737#include "SpecCost.hpp"
    38 #include "typeops.h"              // for combos
    39 #include "Unify.h"
    40 #include "WidenMode.h"
     38#include "Typeops.hpp"              // for combos
     39#include "Unify.hpp"
     40#include "WidenMode.hpp"
    4141#include "AST/Expr.hpp"
    4242#include "AST/Node.hpp"
     
    4545#include "AST/SymbolTable.hpp"
    4646#include "AST/Type.hpp"
    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"
     47#include "Common/Utility.hpp"       // for move, copy
     48#include "SymTab/Mangler.hpp"
     49#include "Tuples/Tuples.hpp"        // for handleTupleAssignment
     50#include "InitTweak/InitTweak.hpp"  // for getPointerBase
     51
     52#include "Common/Stats/Counter.hpp"
    5353
    5454#include "AST/Inspect.hpp"             // for getFunctionName
     
    21382138}
    21392139
    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 
    21562140const ast::Expr * createCondExpr( const ast::Expr * expr ) {
    21572141        assert( expr );
  • src/ResolvExpr/CandidateFinder.hpp

    rec20ab9 rbf4fe05  
    7070        const ast::Expr * expr, Cost & cost );
    7171
    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 
    7672/// Wrap an expression to convert the result to a conditional result.
    7773const ast::Expr * createCondExpr( const ast::Expr * expr );
  • src/ResolvExpr/CandidatePrinter.cpp

    rec20ab9 rbf4fe05  
    2424#include "AST/TranslationUnit.hpp"
    2525#include "ResolvExpr/CandidateFinder.hpp"
    26 #include "ResolvExpr/Resolver.h"
     26#include "ResolvExpr/Resolver.hpp"
    2727
    2828namespace ResolvExpr {
  • src/ResolvExpr/CastCost.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CastCost.cc --
     7// CastCost.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    2222#include "AST/Type.hpp"
    2323#include "AST/TypeEnvironment.hpp"
    24 #include "ConversionCost.h            // for ConversionCost
    25 #include "Cost.h                      // for Cost, Cost::infinity
    26 #include "ResolvExpr/ConversionCost.h // for conversionCost
     24#include "ConversionCost.hpp"            // for ConversionCost
     25#include "Cost.hpp"                      // for Cost, Cost::infinity
     26#include "ResolvExpr/ConversionCost.hpp" // for conversionCost
    2727#include "ResolvExpr/PtrsCastable.hpp"   // for ptrsCastable
    28 #include "ResolvExpr/Unify.h          // for typesCompatibleIgnoreQualifiers
     28#include "ResolvExpr/Unify.hpp"          // for typesCompatibleIgnoreQualifiers
    2929
    3030#if 0
     
    5454                                cost = conversionCost( basicType, dst, srcIsLvalue, symtab, env );
    5555                                if ( Cost::unsafe < cost ) {
    56                                         if (auto enumInst =  dynamic_cast<const ast::EnumInstType *>(dst)) {
    57                                                 assert(enumInst->base->base);
    58                                                 cost = Cost::unsafe;
     56                                        if (auto enumInst = dynamic_cast<const ast::EnumInstType *>(dst)) {
     57                                                // Always explict cast only for typed enum
     58                                                if (enumInst->base->isTyped) cost = Cost::unsafe;
    5959                                        }
    6060                                }
     
    6363
    6464                void postvisit( const ast::ZeroType * zero ) {
    65                         // auto ptr = dynamic_cast< const ast::PointerType * >( dst );
    66                         // if ( ptr && basicType->isInteger() ) {
    67                         //      // needed for, e.g. unsigned long => void *
    68                         //      cost = Cost::unsafe;
    69                         // } else {
    7065                        cost = conversionCost( zero, dst, srcIsLvalue, symtab, env );
    7166                        if ( Cost::unsafe < cost ) {
    7267                                if (auto enumInst =  dynamic_cast<const ast::EnumInstType *>(dst)) {
    73                                         assert(enumInst->base->base);
    74                                         cost = Cost::unsafe;
     68                                        if (enumInst->base->isTyped) cost = Cost::unsafe;
    7569                                }
    7670                        }
    77                         // }
    7871                }
    7972
    8073                void postvisit( const ast::OneType * one ) {
    81                         // auto ptr = dynamic_cast< const ast::PointerType * >( dst );
    82                         // if ( ptr && basicType->isInteger() ) {
    83                         //      // needed for, e.g. unsigned long => void *
    84                         //      cost = Cost::unsafe;
    85                         // } else {
    8674                        cost = conversionCost( one, dst, srcIsLvalue, symtab, env );
    8775                        if ( Cost::unsafe < cost ) {
    88                                 if (auto enumInst =  dynamic_cast<const ast::EnumInstType *>(dst)) {
    89                                         assert(enumInst->base->base);
    90                                         cost = Cost::unsafe;
     76                                if (auto enumInst = dynamic_cast<const ast::EnumInstType *>(dst)) {
     77                                        if (enumInst->base->isTyped) cost = Cost::unsafe;
    9178                                }
    9279                        }
    93                         // }
    9480                }
    9581
  • src/ResolvExpr/CastCost.hpp

    rec20ab9 rbf4fe05  
    1616#pragma once
    1717
    18 #include "ResolvExpr/Cost.h"     // for Cost
    19 
    2018namespace ast {
    2119        class SymbolTable;
     
    2523
    2624namespace ResolvExpr {
     25
     26class Cost;
    2727
    2828Cost castCost(
  • src/ResolvExpr/CommonType.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CommonType.cc --
     7// CommonType.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    2323#include "AST/Pass.hpp"
    2424#include "AST/Type.hpp"
    25 #include "Unify.h                     // for unifyExact, WidenMode
    26 #include "typeops.h"                     // for isFtype
    27 #include "Tuples/Tuples.h"
     25#include "Unify.hpp"                     // for unifyExact, WidenMode
     26#include "Typeops.hpp"                   // for isFtype
     27#include "Tuples/Tuples.hpp"
    2828
    2929// #define DEBUG
     
    650650
    651651        void postvisit( const ast::EnumInstType * enumInst ) {
    652                 if ( enumInst->base && !enumInst->base->base ) {
     652                if ( enumInst->base && !enumInst->base->isTyped ) {
    653653                        auto basicType = new ast::BasicType( ast::BasicKind::UnsignedInt );
    654654                        result = commonType( basicType, type2, tenv, need, have, open, widen);
  • src/ResolvExpr/CommonType.hpp

    rec20ab9 rbf4fe05  
    1818#include "AST/Fwd.hpp"
    1919#include "AST/TypeEnvironment.hpp"  // for AssertionSet, OpenVarSet
    20 #include "WidenMode.h            // for WidenMode
     20#include "WidenMode.hpp"            // for WidenMode
    2121
    2222namespace ResolvExpr {
  • src/ResolvExpr/ConversionCost.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ConversionCost.cc --
     7// ConversionCost.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "ConversionCost.h"
     16#include "ConversionCost.hpp"
    1717
    1818#include <cassert>                       // for assert
     
    2020#include <string>                        // for operator==, string
    2121
    22 #include "ResolvExpr/Cost.h           // for Cost
    23 #include "ResolvExpr/Unify.h          // for typesCompatibleIgnoreQualifiers
     22#include "ResolvExpr/Cost.hpp"           // for Cost
     23#include "ResolvExpr/Unify.hpp"          // for typesCompatibleIgnoreQualifiers
    2424#include "ResolvExpr/PtrsAssignable.hpp" // for ptrsAssignable
    2525
     
    283283                cost = costCalc( basicType, integer, srcIsLvalue, symtab, env );
    284284        } else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
    285                 if ( dstAsEnumInst->base && !dstAsEnumInst->base->base ) {
     285                if ( dstAsEnumInst->base && !dstAsEnumInst->base->isTyped ) {
    286286                        cost = Cost::unsafe;
    287287                }
     
    480480                // assuming 0p is supposed to be used for pointers?
    481481        } else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
    482                 if ( dstAsEnumInst->base && !dstAsEnumInst->base->base ) {
     482                if ( dstAsEnumInst->base && !dstAsEnumInst->base->isTyped ) {
    483483                        cost = Cost::unsafe;
    484484                }
     
    501501                }
    502502        } else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
    503                 if ( dstAsEnumInst->base && !dstAsEnumInst->base->base ) {
     503                if ( dstAsEnumInst->base && !dstAsEnumInst->base->isTyped ) {
    504504                        cost = Cost::unsafe;
    505505                }
  • src/ResolvExpr/ConversionCost.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ConversionCost.h --
     7// ConversionCost.hpp --
    88//
    99// Author           : Richard C. Bilson
     
    1818#include <functional>         // for function
    1919
    20 #include "Cost.h           // for Cost
     20#include "Cost.hpp"           // for Cost
    2121
    2222#include "AST/Fwd.hpp"
  • src/ResolvExpr/CurrentObject.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CurrentObject.h --
     7// CurrentObject.cpp --
    88//
    99// Author           : Rob Schluntz
     
    1414//
    1515
     16#include "CurrentObject.hpp"
     17
    1618#include <stddef.h>                    // for size_t
    1719#include <cassert>                     // for assertf, assert, safe_dynamic_...
     
    2830#include "AST/Print.hpp"               // for readonly
    2931#include "AST/Type.hpp"
    30 #include "Common/Eval.h"               // for eval
    31 #include "Common/Indenter.h"           // for Indenter, operator<<
    32 #include "Common/SemanticError.h"      // for SemanticError
    33 #include "Common/utility.h"            // for toString
    34 #include "CurrentObject.h"
     32#include "Common/Eval.hpp"             // for eval
     33#include "Common/Indenter.hpp"         // for Indenter, operator<<
     34#include "Common/SemanticError.hpp"    // for SemanticError
     35#include "Common/Utility.hpp"          // for toString
    3536
    3637#if 0
  • src/ResolvExpr/CurrentObject.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CurrentObject.h --
     7// CurrentObject.hpp --
    88//
    99// Author           : Rob Schluntz
     
    2121
    2222#include "AST/Node.hpp"  // for ptr
    23 #include "Common/CodeLocation.h"
     23#include "Common/CodeLocation.hpp"
    2424
    2525namespace ast {
  • src/ResolvExpr/ExplodedArg.cpp

    rec20ab9 rbf4fe05  
    1616#include "ExplodedArg.hpp"
    1717
    18 #include "Tuples/Explode.h"   // for Tuples::explode
     18#include "Tuples/Explode.hpp"   // for Tuples::explode
    1919
    2020namespace ResolvExpr {
  • src/ResolvExpr/ExplodedArg.hpp

    rec20ab9 rbf4fe05  
    1919
    2020#include "Candidate.hpp"            // for Candidate, CandidateList
    21 #include "Cost.h                 // for Cost
     21#include "Cost.hpp"                 // for Cost
    2222#include "AST/Expr.hpp"
    2323#include "AST/Node.hpp"             // for ptr
  • src/ResolvExpr/FindOpenVars.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FindOpenVars.cc --
     7// FindOpenVars.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "FindOpenVars.h"
     16#include "FindOpenVars.hpp"
    1717
    1818#include "AST/Pass.hpp"
  • src/ResolvExpr/PolyCost.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // PolyCost.cc --
     7// PolyCost.cpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/PtrsAssignable.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // PtrsAssignable.cc --
     7// PtrsAssignable.cpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/PtrsCastable.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // PtrsCastable.cc --
     7// PtrsCastable.cpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/RenameVars.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // RenameVars.cc --
     7// RenameVars.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include <ext/alloc_traits.h>      // for __alloc_traits<>::value_type
    17 #include <memory>                  // for allocator_traits<>::value_type
    18 #include <sstream>                 // for operator<<, basic_ostream, ostring...
    19 #include <utility>                 // for pair
     16#include <ext/alloc_traits.h>         // for __alloc_traits<>::value_type
     17#include <memory>                     // for allocator_traits<>::value_type
     18#include <sstream>                    // for operator<<, basic_ostream, ostr...
     19#include <utility>                    // for pair
    2020
    2121#include "AST/Pass.hpp"
    2222#include "AST/Type.hpp"
    23 #include "Common/ScopedMap.h"
    24 #include "Common/SemanticError.h"  // for SemanticError
    25 #include "RenameVars.h"
     23#include "Common/ScopedMap.hpp"
     24#include "Common/SemanticError.hpp"   // for SemanticError
     25#include "RenameVars.hpp"
    2626
    2727#include "AST/Copy.hpp"
  • src/ResolvExpr/RenameVars.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // RenameVars.h --
     7// RenameVars.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/ResolveTypeof.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ResolveTypeof.cc --
     7// ResolveTypeof.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "ResolveTypeof.h"
     16#include "ResolveTypeof.hpp"
    1717
    18 #include <cassert>  // for assert
     18#include <cassert>                  // for assert
    1919
    2020#include "AST/CVQualifiers.hpp"
     
    2424#include "AST/Type.hpp"
    2525#include "AST/TypeEnvironment.hpp"
    26 #include "Common/utility.h"       // for copy
    27 #include "InitTweak/InitTweak.h"  // for isConstExpr
    28 #include "RenameVars.h"
    29 #include "Resolver.h"  // for resolveInVoidContext
    30 #include "SymTab/Mangler.h"
     26#include "Common/Utility.hpp"       // for copy
     27#include "InitTweak/InitTweak.hpp"  // for isConstExpr
     28#include "RenameVars.hpp"
     29#include "Resolver.hpp"             // for resolveInVoidContext
     30#include "SymTab/Mangler.hpp"
    3131
    3232namespace ResolvExpr {
  • src/ResolvExpr/ResolveTypeof.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ResolveTypeof.h --
     7// ResolveTypeof.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/Resolver.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Resolver.cc --
     7// Resolver.cpp --
    88//
    99// Author           : Aaron B. Moss
     
    2121#include "Candidate.hpp"
    2222#include "CandidateFinder.hpp"
    23 #include "CurrentObject.h             // for CurrentObject
    24 #include "RenameVars.h                // for RenameVars, global_renamer
    25 #include "Resolver.h"
    26 #include "ResolveTypeof.h"
     23#include "CurrentObject.hpp"             // for CurrentObject
     24#include "RenameVars.hpp"                // for RenameVars, global_renamer
     25#include "Resolver.hpp"
     26#include "ResolveTypeof.hpp"
    2727#include "ResolveMode.hpp"               // for ResolveMode
    28 #include "typeops.h"                     // for extractResultType
    29 #include "Unify.h                     // for unify
     28#include "Typeops.hpp"                   // for extractResultType
     29#include "Unify.hpp"                     // for unify
    3030#include "CompilationState.hpp"
    3131#include "AST/Decl.hpp"
     
    3535#include "AST/SymbolTable.hpp"
    3636#include "AST/Type.hpp"
    37 #include "Common/Eval.h               // for eval
     37#include "Common/Eval.hpp"               // for eval
    3838#include "Common/Iterate.hpp"            // for group_iterate
    39 #include "Common/SemanticError.h      // for SemanticError
    40 #include "Common/Stats/ResolveTime.h  // for ResolveTime::start(), ResolveTime::stop()
     39#include "Common/SemanticError.hpp"      // for SemanticError
     40#include "Common/Stats/ResolveTime.hpp"  // for ResolveTime::start(), ResolveTime::stop()
    4141#include "Common/ToString.hpp"           // for toCString
    42 #include "Common/UniqueName.h         // for UniqueName
    43 #include "InitTweak/GenInit.h"
    44 #include "InitTweak/InitTweak.h       // for isIntrinsicSingleArgCallStmt
    45 #include "SymTab/Mangler.h            // for Mangler
    46 #include "Tuples/Tuples.h"
    47 #include "Validate/FindSpecialDecls.h // for SizeType
     42#include "Common/UniqueName.hpp"         // for UniqueName
     43#include "InitTweak/GenInit.hpp"
     44#include "InitTweak/InitTweak.hpp"       // for isIntrinsicSingleArgCallStmt
     45#include "SymTab/Mangler.hpp"            // for Mangler
     46#include "Tuples/Tuples.hpp"
     47#include "Validate/FindSpecialDecls.hpp" // for SizeType
    4848
    4949using namespace std;
  • src/ResolvExpr/Resolver.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Resolver.h --
     7// Resolver.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/SatisfyAssertions.cpp

    rec20ab9 rbf4fe05  
    2828#include "CandidateFinder.hpp"
    2929#include "CommonType.hpp"
    30 #include "Cost.h"
    31 #include "RenameVars.h"
     30#include "Cost.hpp"
     31#include "RenameVars.hpp"
    3232#include "SpecCost.hpp"
    33 #include "typeops.h"
    34 #include "Unify.h"
     33#include "Typeops.hpp"
     34#include "Unify.hpp"
    3535#include "AST/Decl.hpp"
    3636#include "AST/Expr.hpp"
     
    4040#include "AST/SymbolTable.hpp"
    4141#include "AST/TypeEnvironment.hpp"
    42 #include "FindOpenVars.h"
    43 #include "Common/FilterCombos.h"
    44 #include "Common/Indenter.h"
    45 #include "GenPoly/GenPoly.h"
    46 #include "SymTab/Mangler.h"
     42#include "FindOpenVars.hpp"
     43#include "Common/FilterCombos.hpp"
     44#include "Common/Indenter.hpp"
     45#include "GenPoly/GenPoly.hpp"
     46#include "SymTab/Mangler.hpp"
    4747
    4848namespace ResolvExpr {
  • src/ResolvExpr/SpecCost.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // SpecCost.cc --
     7// SpecCost.cpp --
    88//
    99// Author           : Aaron B. Moss
  • src/ResolvExpr/Typeops.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // typeops.h --
     7// Typeops.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/ResolvExpr/Unify.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Unify.cc --
     7// Unify.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "Unify.h"
     16#include "Unify.hpp"
    1717
    1818#include <cassert>                  // for assertf, assert
     
    3232#include "AST/Type.hpp"
    3333#include "AST/TypeEnvironment.hpp"
    34 #include "Common/Eval.h          // for eval
     34#include "Common/Eval.hpp"          // for eval
    3535#include "CommonType.hpp"           // for commonType
    36 #include "FindOpenVars.h         // for findOpenVars
     36#include "FindOpenVars.hpp"         // for findOpenVars
    3737#include "SpecCost.hpp"             // for SpecCost
    38 #include "Tuples/Tuples.h        // for isTtype
    39 #include "typeops.h"                // for flatten, occurs
     38#include "Tuples/Tuples.hpp"        // for isTtype
     39#include "Typeops.hpp"              // for flatten, occurs
    4040
    4141namespace ast {
  • src/ResolvExpr/Unify.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Unify.h --
     7// Unify.hpp --
    88//
    99// Author           : Richard C. Bilson
     
    1818#include "AST/Node.hpp"             // for ptr
    1919#include "AST/TypeEnvironment.hpp"  // for TypeEnvironment, AssertionSet, OpenVarSet
    20 #include "WidenMode.h            // for WidenMode
     20#include "WidenMode.hpp"            // for WidenMode
    2121
    2222namespace ast {
  • src/ResolvExpr/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC_RESOLVEXPR = \
    18       ResolvExpr/AdjustExprType.cc \
     18      ResolvExpr/AdjustExprType.cpp \
    1919      ResolvExpr/AdjustExprType.hpp \
    2020      ResolvExpr/Candidate.cpp \
     
    2222      ResolvExpr/CandidateFinder.hpp \
    2323      ResolvExpr/Candidate.hpp \
    24       ResolvExpr/CastCost.cc \
     24      ResolvExpr/CastCost.cpp \
    2525      ResolvExpr/CastCost.hpp \
    26       ResolvExpr/CommonType.cc \
     26      ResolvExpr/CommonType.cpp \
    2727      ResolvExpr/CommonType.hpp \
    28       ResolvExpr/ConversionCost.cc \
    29       ResolvExpr/ConversionCost.h \
    30       ResolvExpr/Cost.h \
    31       ResolvExpr/CurrentObject.cc \
    32       ResolvExpr/CurrentObject.h \
     28      ResolvExpr/ConversionCost.cpp \
     29      ResolvExpr/ConversionCost.hpp \
     30      ResolvExpr/Cost.hpp \
     31      ResolvExpr/CurrentObject.cpp \
     32      ResolvExpr/CurrentObject.hpp \
    3333      ResolvExpr/ExplodedArg.cpp \
    3434      ResolvExpr/ExplodedArg.hpp \
    35       ResolvExpr/FindOpenVars.cc \
    36       ResolvExpr/FindOpenVars.h \
    37       ResolvExpr/PolyCost.cc \
     35      ResolvExpr/FindOpenVars.cpp \
     36      ResolvExpr/FindOpenVars.hpp \
     37      ResolvExpr/PolyCost.cpp \
    3838      ResolvExpr/PolyCost.hpp \
    39       ResolvExpr/PtrsAssignable.cc \
     39      ResolvExpr/PtrsAssignable.cpp \
    4040      ResolvExpr/PtrsAssignable.hpp \
    41       ResolvExpr/PtrsCastable.cc \
     41      ResolvExpr/PtrsCastable.cpp \
    4242      ResolvExpr/PtrsCastable.hpp \
    43       ResolvExpr/RenameVars.cc \
    44       ResolvExpr/RenameVars.h \
    45       ResolvExpr/Resolver.cc \
    46       ResolvExpr/Resolver.h \
    47       ResolvExpr/ResolveTypeof.cc \
    48       ResolvExpr/ResolveTypeof.h \
     43      ResolvExpr/RenameVars.cpp \
     44      ResolvExpr/RenameVars.hpp \
     45      ResolvExpr/Resolver.cpp \
     46      ResolvExpr/Resolver.hpp \
     47      ResolvExpr/ResolveTypeof.cpp \
     48      ResolvExpr/ResolveTypeof.hpp \
    4949      ResolvExpr/ResolveMode.hpp \
    5050      ResolvExpr/SatisfyAssertions.cpp \
    5151      ResolvExpr/SatisfyAssertions.hpp \
    52       ResolvExpr/SpecCost.cc \
     52      ResolvExpr/SpecCost.cpp \
    5353      ResolvExpr/SpecCost.hpp \
    54       ResolvExpr/typeops.h \
    55       ResolvExpr/Unify.cc \
    56       ResolvExpr/Unify.h \
    57       ResolvExpr/WidenMode.h
     54      ResolvExpr/Typeops.hpp \
     55      ResolvExpr/Unify.cpp \
     56      ResolvExpr/Unify.hpp \
     57      ResolvExpr/WidenMode.hpp
    5858
    5959SRC += $(SRC_RESOLVEXPR) \
  • src/SymTab/Demangle.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Demangle.cc -- Convert a mangled name into a human readable name.
     7// Demangle.cpp -- Convert a mangled name into a human readable name.
    88//
    99// Author           : Rob Schluntz
     
    1919#include "AST/Pass.hpp"
    2020#include "AST/Type.hpp"
    21 #include "CodeGen/GenType.h"
    22 #include "CodeGen/OperatorTable.h"
    23 #include "Common/utility.h"                                                             // isPrefix
    24 #include "Mangler.h"
     21#include "CodeGen/GenType.hpp"
     22#include "CodeGen/OperatorTable.hpp"
     23#include "Common/Utility.hpp"                                                           // isPrefix
     24#include "Mangler.hpp"
    2525
    2626#define DEBUG
  • src/SymTab/Demangle.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Demangle.h -- Convert a mangled name into a human readable name.
     7// Demangle.hpp -- Convert a mangled name into a human readable name.
    88//
    99// Author           : Andrew Beach
  • src/SymTab/FixFunction.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixFunction.cc --
     7// FixFunction.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "FixFunction.h"
     16#include "FixFunction.hpp"
    1717
    1818#include <list>                   // for list
     
    2121#include "AST/Pass.hpp"
    2222#include "AST/Type.hpp"
    23 #include "Common/utility.h"       // for copy
     23#include "Common/Utility.hpp"     // for copy
    2424
    2525namespace SymTab {
  • src/SymTab/FixFunction.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixFunction.h --
     7// FixFunction.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/SymTab/GenImplicitCall.cpp

    rec20ab9 rbf4fe05  
    2323#include "AST/Stmt.hpp"                  // for ExprStmt
    2424#include "AST/Type.hpp"                  // for ArrayType, BasicType, ...
    25 #include "CodeGen/OperatorTable.h     // for isCtorDtor
    26 #include "Common/UniqueName.h         // for UniqueName
    27 #include "Common/utility.h"              // for splice
     25#include "CodeGen/OperatorTable.hpp"     // for isCtorDtor
     26#include "Common/UniqueName.hpp"         // for UniqueName
     27#include "Common/Utility.hpp"            // for splice
    2828
    2929namespace SymTab {
  • src/SymTab/GenImplicitCall.hpp

    rec20ab9 rbf4fe05  
    1616#pragma once
    1717
    18 #include "InitTweak/InitTweak.h"  // for InitExpander
     18#include "InitTweak/InitTweak.hpp"  // for InitExpander
    1919
    2020namespace SymTab {
  • src/SymTab/Mangler.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Mangler.cc --
     7// Mangler.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1313// Update Count     : 75
    1414//
    15 #include "Mangler.h"
     15#include "Mangler.hpp"
    1616
    1717#include <algorithm>                     // for copy, transform
     
    2323
    2424#include "AST/Pass.hpp"
    25 #include "CodeGen/OperatorTable.h     // for OperatorInfo, operatorLookup
     25#include "CodeGen/OperatorTable.hpp"     // for OperatorInfo, operatorLookup
    2626#include "Common/ToString.hpp"           // for toCString
    27 #include "Common/SemanticError.h      // for SemanticError
     27#include "Common/SemanticError.hpp"      // for SemanticError
    2828
    2929namespace Mangle {
  • src/SymTab/Mangler.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Mangler.h --
     7// Mangler.hpp --
    88//
    99// Author           : Richard C. Bilson
  • src/SymTab/ManglerCommon.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Mangler.h --
     7// ManglerCommon.cpp --
    88//
    99// Author           : Richard C. Bilson
     
    1414//
    1515
    16 #include "Mangler.h"
     16#include "Mangler.hpp"
    1717
    1818#include "AST/Decl.hpp"
  • src/SymTab/demangler.cpp

    rec20ab9 rbf4fe05  
    1 #include "Demangle.h"
     1#include "Demangle.hpp"
    22#include <iostream>
    33#include <fstream>
  • src/SymTab/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC_SYMTAB = \
    18         SymTab/FixFunction.cc \
    19         SymTab/FixFunction.h \
     18        SymTab/FixFunction.cpp \
     19        SymTab/FixFunction.hpp \
    2020        SymTab/GenImplicitCall.cpp \
    2121        SymTab/GenImplicitCall.hpp \
    22         SymTab/Mangler.cc \
    23         SymTab/ManglerCommon.cc \
    24         SymTab/Mangler.h
     22        SymTab/Mangler.cpp \
     23        SymTab/ManglerCommon.cpp \
     24        SymTab/Mangler.hpp
    2525
    2626SRC += $(SRC_SYMTAB)
    2727
    2828SRCDEMANGLE += $(SRC_SYMTAB) \
    29         SymTab/Demangle.cc \
    30         SymTab/Demangle.h
     29        SymTab/Demangle.cpp \
     30        SymTab/Demangle.hpp
  • src/Tuples/Explode.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Explode.cc --
     7// Explode.cpp --
    88//
    99// Author           : Rob Schluntz
     
    1414//
    1515
    16 #include "Explode.h"
     16#include "Explode.hpp"
    1717
    1818#include "AST/Pass.hpp"          // for Pass
  • src/Tuples/Explode.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Explode.h --
     7// Explode.hpp --
    88//
    99// Author           : Rob Schluntz
     
    2222#include "ResolvExpr/Candidate.hpp"     // for Candidate, CandidateList
    2323#include "ResolvExpr/ExplodedArg.hpp"   // for ExplodedArg
    24 #include "Tuples.h                   // for maybeImpure
     24#include "Tuples.hpp"                   // for maybeImpure
    2525
    2626namespace ast {
  • src/Tuples/TupleAssignment.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TupleAssignment.cc --
     7// TupleAssignment.cpp --
    88//
    99// Author           : Rodolfo G. Esteves
     
    1414//
    1515
    16 #include "Tuples.h"
     16#include "Tuples.hpp"
    1717
    1818#include <algorithm>                       // for transform
     
    2929#include "AST/Stmt.hpp"
    3030#include "AST/TypeEnvironment.hpp"
    31 #include "CodeGen/OperatorTable.h"
    32 #include "Common/UniqueName.h           // for UniqueName
    33 #include "Common/utility.h"                // for splice, zipWith
    34 #include "Explode.h                     // for explode
    35 #include "InitTweak/GenInit.h           // for genCtorInit
    36 #include "InitTweak/InitTweak.h         // for getPointerBase, isAssignment
     31#include "CodeGen/OperatorTable.hpp"
     32#include "Common/UniqueName.hpp"           // for UniqueName
     33#include "Common/Utility.hpp"              // for splice, zipWith
     34#include "Explode.hpp"                     // for explode
     35#include "InitTweak/GenInit.hpp"           // for genCtorInit
     36#include "InitTweak/InitTweak.hpp"         // for getPointerBase, isAssignment
    3737#include "ResolvExpr/CandidateFinder.hpp"  // for CandidateFinder
    38 #include "ResolvExpr/Cost.h             // for Cost
    39 #include "ResolvExpr/Resolver.h         // for resolveCtorInit
    40 #include "ResolvExpr/typeops.h"            // for combos
     38#include "ResolvExpr/Cost.hpp"             // for Cost
     39#include "ResolvExpr/Resolver.hpp"         // for resolveCtorInit
     40#include "ResolvExpr/Typeops.hpp"          // for combos
    4141
    4242#if 0
  • src/Tuples/TupleExpansion.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "Tuples.h"
     16#include "Tuples.hpp"
    1717
    1818#include "AST/Pass.hpp"
    19 #include "Common/ScopedMap.h"
     19#include "Common/ScopedMap.hpp"
    2020
    2121namespace Tuples {
  • src/Tuples/Tuples.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Tuples.cc -- A collection of tuple operations.
     7// Tuples.cpp -- A collection of tuple operations.
    88//
    99// Author           : Andrew Beach
     
    1414//
    1515
    16 #include "Tuples.h"
     16#include "Tuples.hpp"
    1717
    1818#include "AST/Pass.hpp"
    1919#include "AST/Inspect.hpp"
    2020#include "AST/LinkageSpec.hpp"
    21 #include "InitTweak/InitTweak.h"
     21#include "InitTweak/InitTweak.hpp"
    2222
    2323namespace Tuples {
  • src/Tuples/Tuples.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Tuples.h -- A collection of tuple operations.
     7// Tuples.hpp -- A collection of tuple operations.
    88//
    99// Author           : Rodolfo G. Esteves
     
    2727namespace Tuples {
    2828
    29 // TupleAssignment.cc
     29// TupleAssignment.cpp
    3030void handleTupleAssignment(
    3131        ResolvExpr::CandidateFinder & finder, const ast::UntypedExpr * assign,
    3232        std::vector< ResolvExpr::CandidateFinder > & args );
    3333
    34 // TupleExpansion.cc
     34// TupleExpansion.cpp
    3535/// Expands z.[a, b.[x, y], c] into [z.a, z.b.x, z.b.y, z.c], inserting UniqueExprs as appropriate.
    3636void expandMemberTuples( ast::TranslationUnit & translationUnit );
  • src/Tuples/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC_TUPLES = \
    18         Tuples/Explode.cc \
    19         Tuples/Explode.h \
    20         Tuples/TupleAssignment.cc \
     18        Tuples/Explode.cpp \
     19        Tuples/Explode.hpp \
     20        Tuples/TupleAssignment.cpp \
    2121        Tuples/TupleExpansion.cpp \
    22         Tuples/Tuples.cc \
    23         Tuples/Tuples.h
     22        Tuples/Tuples.cpp \
     23        Tuples/Tuples.hpp
    2424
    2525SRC += $(SRC_TUPLES)
  • src/Validate/Autogen.cpp

    rec20ab9 rbf4fe05  
    1616#include "Autogen.hpp"
    1717
    18 #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
     18#include <algorithm>                   // for count_if
     19#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_iterator
     23#include <utility>                     // for pair
     24#include <vector>                      // for vector
    2525
    2626#include "AST/Attribute.hpp"
     
    3434#include "AST/Stmt.hpp"
    3535#include "AST/SymbolTable.hpp"
    36 #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
     36#include "CodeGen/OperatorTable.hpp"  // for isCtorDtor, isCtorDtorAssign
     37#include "Common/ScopedMap.hpp"        // for ScopedMap<>::const_iterator, S...
     38#include "Common/Utility.hpp"          // for cloneAll, operator+
     39#include "GenPoly/ScopedSet.hpp"       // for ScopedSet, ScopedSet<>::iterator
     40#include "InitTweak/GenInit.hpp"       // for fixReturnStatements
     41#include "InitTweak/InitTweak.hpp"     // for isAssignment, isCopyConstructor
    4242#include "SymTab/GenImplicitCall.hpp"  // for genImplicitCall
    43 #include "SymTab/Mangler.h"        // for Mangler
     43#include "SymTab/Mangler.hpp"          // for Mangler
    4444#include "CompilationState.hpp"
    4545
  • src/Validate/CompoundLiteral.cpp

    rec20ab9 rbf4fe05  
    2020#include "AST/Pass.hpp"
    2121#include "AST/TranslationUnit.hpp"
    22 #include "Common/UniqueName.h"
     22#include "Common/UniqueName.hpp"
    2323
    2424namespace Validate {
  • src/Validate/EliminateTypedef.cpp

    rec20ab9 rbf4fe05  
    2121#include "AST/Pass.hpp"
    2222#include "AST/Stmt.hpp"
    23 #include "Common/utility.h"
     23#include "Common/Utility.hpp"
    2424
    2525namespace Validate {
  • src/Validate/EnumAndPointerDecay.cpp

    rec20ab9 rbf4fe05  
    2020#include "AST/Pass.hpp"
    2121#include "AST/Type.hpp"
    22 #include "SymTab/FixFunction.h"
     22#include "SymTab/FixFunction.hpp"
    2323#include "Validate/NoIdSymbolTable.hpp"
    2424
  • src/Validate/FindSpecialDecls.cpp

    rec20ab9 rbf4fe05  
    1414//
    1515
    16 #include "Validate/FindSpecialDecls.h"
     16#include "Validate/FindSpecialDecls.hpp"
    1717
    1818#include "AST/Decl.hpp"
  • src/Validate/FindSpecialDecls.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FindSpecialDeclarations.h -- Find special declarations used in the compiler.
     7// FindSpecialDeclarations.hpp -- Find special declarations used in the compiler.
    88//
    99// Author           : Rob Schluntz
  • src/Validate/FixQualifiedTypes.cpp

    rec20ab9 rbf4fe05  
    2121#include "AST/TranslationUnit.hpp"
    2222#include "Common/ToString.hpp"             // for toString
    23 #include "SymTab/Mangler.h              // for Mangler
     23#include "SymTab/Mangler.hpp"              // for Mangler
    2424#include "Validate/NoIdSymbolTable.hpp"
    2525
  • src/Validate/FixReturnTypes.cpp

    rec20ab9 rbf4fe05  
    2020#include "AST/Type.hpp"
    2121#include "CodeGen/CodeGenerator.hpp"
    22 #include "ResolvExpr/Unify.h"
     22#include "ResolvExpr/Unify.hpp"
    2323
    2424namespace Validate {
  • src/Validate/ForallPointerDecay.cpp

    rec20ab9 rbf4fe05  
    2020#include "AST/DeclReplacer.hpp"
    2121#include "AST/Pass.hpp"
    22 #include "CodeGen/OperatorTable.h"
    23 #include "Common/CodeLocation.h"
     22#include "CodeGen/OperatorTable.hpp"
     23#include "Common/CodeLocation.hpp"
    2424#include "Common/ToString.hpp"
    25 #include "Common/utility.h"
    26 #include "SymTab/FixFunction.h"
     25#include "Common/Utility.hpp"
     26#include "SymTab/FixFunction.hpp"
    2727
    2828namespace Validate {
  • src/Validate/ImplementEnumFunc.cpp

    rec20ab9 rbf4fe05  
    22#include "AST/Pass.hpp"
    33#include "AST/TranslationUnit.hpp"
    4 #include "CodeGen/OperatorTable.h"  // for isCtorDtor, isCtorDtorAssign
    5 #include "InitTweak/InitTweak.h"    // for isAssignment, isCopyConstructor
     4#include "CodeGen/OperatorTable.hpp"  // for isCtorDtor, isCtorDtorAssign
     5#include "InitTweak/InitTweak.hpp"    // for isAssignment, isCopyConstructor
    66namespace Validate {
    77
     
    2828                  proto_linkage{ast::Linkage::Cforall} {}
    2929
    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 
    6330private:
    6431        const CodeLocation& getLocation() const { return decl->location; }
     
    7340        const ast::Decl* getDecl() const { return decl; }
    7441
    75         // Implement Bounded trait for enum
    76     void genBoundedFunctions();
    77         // Implement Serial trait for enum
     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
    7848        void genSerialTraitFuncs();
    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 
     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);
    8659        ast::FunctionDecl* genPosnProto() const;
    8760        ast::FunctionDecl* genLabelProto() const;
    8861        ast::FunctionDecl* genValueProto() const;
    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;
     62        void genValueOrLabelBody(
     63                ast::FunctionDecl* func, ast::ObjectDecl* arrDecl) const;
     64        void genPosnBody(ast::FunctionDecl* func) const;
     65
    9866        ////////////////
    99 
    100         ast::FunctionDecl* genSuccPosProto() const;
    101         ast::FunctionDecl* genPredPosProto() const;
    10267
    10368        // ---------------------------------------------------
     
    12186        }
    12287
    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*
    20488        // ----------------------------------------------------
    205 
    206         ast::FunctionDecl* genSuccPredFunc(bool succ);
    20789
    20890        const ast::Init* getAutoInit(const ast::Init* prev) const;
     
    21496                const ast::EnumAttribute attr, const CodeLocation& location,
    21597                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);
    22098};
    22199
     
    374252}
    375253
     254void 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::ExplicitCast
     263        );
     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::ExplicitCast
     274        );
     275        func->stmts = new ast::CompoundStmt(
     276                func->location, {
     277                        new ast::ReturnStmt(
     278                                func->location,
     279                                intToEnum
     280                        )
     281                }
     282        );
     283}
     284
     285
    376286void EnumAttrFuncGenerator::genSerialTraitFuncs() {
    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 {
     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
     301ast::FunctionDecl* EnumAttrFuncGenerator::genInstToInstFuncProto(const char * func) const {
    394302        return genProto(
    395                 "succ",
     303                func,
    396304                {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))},
    397305                {new ast::ObjectDecl(getLocation(), "_ret",
     
    399307}
    400308
    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", {}, {
     309ast::FunctionDecl* EnumAttrFuncGenerator::genBoundedProto(const char * func) const {
     310    return genProto(func, {}, {
    411311        new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))
    412312    });
    413313}
    414314
    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 {
     315void EnumAttrFuncGenerator::genBoundedBody(ast::FunctionDecl* func) const {
    422316        const CodeLocation & loc = func->location;
    423         auto mem = decl->members.front();
    424         // auto expr = new ast::QualifiedNameExpr( loc, decl, mem->name );
    425         // expr->result = new ast::EnumInstType( decl );
     317        auto mem = func->name=="lowerBound"?  decl->members.front() : decl->members.back();
    426318        auto expr = new ast::NameExpr( loc, mem->name );
    427319        func->stmts = new ast::CompoundStmt( loc, {new ast::ReturnStmt(loc, expr)});
    428320}
    429321
    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 
    438322void EnumAttrFuncGenerator::genBoundedFunctions() {
    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);
     323        ast::FunctionDecl * boundedProtos[2] = {genBoundedProto("upperBound"), genBoundedProto("lowerBound")};
     324        for (auto & protos: boundedProtos) {
     325                produceForwardDecl(protos);
     326                genBoundedBody(protos);
     327                produceDecl(protos);
     328        }
    448329}
    449330
    450331inline ast::EnumAttrType * getPosnType( const ast::EnumDecl * decl ) {
    451332        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         );
    468333}
    469334
     
    511376}
    512377
    513 void EnumAttrFuncGenerator::genAttributesDecls(const ast::EnumAttribute attr) {
     378void EnumAttrFuncGenerator::genTypedEnumFunction(const ast::EnumAttribute attr) {
    514379        if (attr == ast::EnumAttribute::Value ||
    515380                attr == ast::EnumAttribute::Label) {
     381                // TypedEnum's backing arrays
    516382                std::vector<ast::ptr<ast::Init>> inits =
    517383                        attr == ast::EnumAttribute::Value ? genValueInit() : genLabelInit();
     
    534400}
    535401
    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);
     402void EnumAttrFuncGenerator::genTypedEnumFuncs() {
     403        if (decl->base) genTypedEnumFunction(ast::EnumAttribute::Value);
     404        genTypedEnumFunction(ast::EnumAttribute::Label);
     405        genTypedEnumFunction(ast::EnumAttribute::Posn);
    590406}
    591407
     
    593409        std::list<ast::ptr<ast::Decl>>& decls) {
    594410        // Generate the functions (they go into forwards and definitions).
    595         genAttrStandardFuncs();
    596         genAttrFunctions();
     411        genTypedEnumFuncs();
    597412        genSerialTraitFuncs();
    598         genSuccPredPosn();
    599         // problematic
    600413        genBoundedFunctions();
    601414        // Now export the lists contents.
     
    618431
    619432void ImplementEnumFunc::previsit(const ast::EnumDecl* enumDecl) {
    620         if (!enumDecl->body) return;
    621         if (!enumDecl->base) return;
    622 
     433        if (!enumDecl->body || !enumDecl->isTyped) return;
    623434        ast::EnumInstType enumInst(enumDecl->name);
    624435        enumInst.base = enumDecl;
    625 
    626436        EnumAttrFuncGenerator gen(enumDecl, &enumInst, functionNesting);
    627437        gen.generateAndAppendFunctions(declsToAddAfter);
  • src/Validate/ReplaceTypedef.cpp

    rec20ab9 rbf4fe05  
    1818#include "AST/Copy.hpp"
    1919#include "AST/Pass.hpp"
    20 #include "Common/ScopedMap.h"
    21 #include "Common/UniqueName.h"
    22 #include "ResolvExpr/Unify.h"
     20#include "Common/ScopedMap.hpp"
     21#include "Common/UniqueName.hpp"
     22#include "ResolvExpr/Unify.hpp"
    2323
    2424namespace Validate {
  • src/Validate/VerifyCtorDtorAssign.cpp

    rec20ab9 rbf4fe05  
    1717
    1818#include "AST/Pass.hpp"
    19 #include "CodeGen/OperatorTable.h"
     19#include "CodeGen/OperatorTable.hpp"
    2020
    2121namespace Validate {
  • src/Validate/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC_VALIDATE = \
    18         Validate/FindSpecialDecls.h
     18        Validate/FindSpecialDecls.hpp
    1919
    2020SRC += $(SRC_VALIDATE) \
     
    4040        Validate/HoistTypeDecls.cpp \
    4141        Validate/HoistTypeDecls.hpp \
     42        Validate/ImplementEnumFunc.cpp \
     43        Validate/ImplementEnumFunc.hpp \
    4244        Validate/InitializerLength.cpp \
    4345        Validate/InitializerLength.hpp \
     
    5254        Validate/ReturnCheck.hpp \
    5355        Validate/VerifyCtorDtorAssign.cpp \
    54         Validate/VerifyCtorDtorAssign.hpp \
    55         Validate/ReplacePseudoFunc.cpp \
    56         Validate/ReplacePseudoFunc.hpp \
    57         Validate/ImplementEnumFunc.cpp \
    58         Validate/ImplementEnumFunc.hpp
     56        Validate/VerifyCtorDtorAssign.hpp
    5957
    6058SRCDEMANGLE += $(SRC_VALIDATE)
  • src/Virtual/ExpandCasts.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpandCasts.cc --
     7// ExpandCasts.cpp --
    88//
    99// Author           : Andrew Beach
     
    1414//
    1515
    16 #include "ExpandCasts.h"
    17 
    18 #include <cassert>                 // for assert, assertf
    19 #include <iterator>                // for back_inserter, inserter
    20 #include <string>                  // for string, allocator, operator==, ope...
     16#include "ExpandCasts.hpp"
     17
     18#include <cassert>                   // for assert, assertf
     19#include <iterator>                  // for back_inserter, inserter
     20#include <string>                    // for string, allocator, operator==, o...
    2121
    2222#include "AST/Copy.hpp"
     
    2424#include "AST/Expr.hpp"
    2525#include "AST/Pass.hpp"
    26 #include "Common/ScopedMap.h"      // for ScopedMap
    27 #include "Common/SemanticError.h"  // for SemanticError
    28 #include "SymTab/Mangler.h"        // for mangleType
     26#include "Common/ScopedMap.hpp"      // for ScopedMap
     27#include "Common/SemanticError.hpp"  // for SemanticError
     28#include "SymTab/Mangler.hpp"        // for mangleType
    2929
    3030namespace Virtual {
  • src/Virtual/ExpandCasts.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpandCasts.h --
     7// ExpandCasts.hpp --
    88//
    99// Author           : Andrew Beach
  • src/Virtual/Tables.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Tables.cc --
     7// Tables.cpp --
    88//
    99// Author           : Andrew Beach
  • src/Virtual/Tables.hpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Tables.h --
     7// Tables.hpp --
    88//
    99// Author           : Andrew Beach
  • src/Virtual/module.mk

    rec20ab9 rbf4fe05  
    1616
    1717SRC += \
    18         Virtual/ExpandCasts.cc \
    19         Virtual/ExpandCasts.h \
    20         Virtual/Tables.cc \
    21         Virtual/Tables.h \
     18        Virtual/ExpandCasts.cpp \
     19        Virtual/ExpandCasts.hpp \
     20        Virtual/Tables.cpp \
     21        Virtual/Tables.hpp \
    2222        Virtual/VirtualDtor.cpp \
    2323        Virtual/VirtualDtor.hpp
  • src/include/cassert

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // assert.h --
     7// cassert --
    88//
    99// Author           : Peter A. Buhr
  • src/include/optional

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // optional.h --
     7// optional --
    88//
    99// Author           : Michael L. Brooks
  • src/main.cpp

    rec20ab9 rbf4fe05  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // main.cc --
     7// main.cpp --
    88//
    99// Author           : Peter Buhr and Rob Schluntz
     
    3535#include "CompilationState.hpp"
    3636#include "../config.h"                      // for CFA_LIBDIR
    37 #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
     37#include "CodeGen/FixMain.hpp"              // for FixMain
     38#include "CodeGen/FixNames.hpp"             // for fixNames
     39#include "CodeGen/Generate.hpp"             // for generate
     40#include "CodeGen/LinkOnce.hpp"             // for translateLinkOnce
    4141#include "Common/CodeLocationTools.hpp"     // for forceFillCodeLocations
    4242#include "Common/DeclStats.hpp"             // for printDeclStats
    4343#include "Common/ResolvProtoDump.hpp"       // for dumpAsResolverProto
    44 #include "Common/Stats.h                 // for Stats
    45 #include "Common/utility.h"                 // for deleteAll, filter, printAll
     44#include "Common/Stats.hpp"                 // for Stats
     45#include "Common/Utility.hpp"               // for deleteAll, filter, printAll
    4646#include "Concurrency/Actors.hpp"           // for implementActors
    4747#include "Concurrency/Corun.hpp"            // for implementCorun
    48 #include "Concurrency/Keywords.h         // for implementMutex, implement...
    49 #include "Concurrency/Waitfor.h          // for generateWaitfor
     48#include "Concurrency/Keywords.hpp"         // for implementMutex, implement...
     49#include "Concurrency/Waitfor.hpp"          // for generateWaitfor
    5050#include "Concurrency/Waituntil.hpp"        // for generateWaitUntil
    51 #include "ControlStruct/ExceptDecl.h     // for translateExcept
    52 #include "ControlStruct/ExceptTranslate.h// for translateThrows, translat...
     51#include "ControlStruct/ExceptDecl.hpp"     // for translateExcept
     52#include "ControlStruct/ExceptTranslate.hpp"// for translateThrows, translat...
    5353#include "ControlStruct/FixLabels.hpp"      // for fixLabels
    5454#include "ControlStruct/HoistControlDecls.hpp" //  hoistControlDecls
    55 #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
     55#include "GenPoly/Box.hpp"                  // for box
     56#include "GenPoly/InstantiateGeneric.hpp"   // for instantiateGeneric
     57#include "GenPoly/Lvalue.hpp"               // for convertLvalue
     58#include "GenPoly/Specialize.hpp"           // for convertSpecializations
     59#include "InitTweak/FixInit.hpp"            // for fix
     60#include "InitTweak/GenInit.hpp"            // for genInit
    6161#include "MakeLibCfa.hpp"                   // for makeLibCfa
    6262#include "Parser/RunParser.hpp"             // for buildList, dumpParseTree,...
    6363#include "ResolvExpr/CandidatePrinter.hpp"  // for printCandidates
    6464#include "ResolvExpr/EraseWith.hpp"         // for eraseWith
    65 #include "ResolvExpr/Resolver.h          // for resolve
    66 #include "Tuples/Tuples.h                // for expandMemberTuples, expan...
     65#include "ResolvExpr/Resolver.hpp"          // for resolve
     66#include "Tuples/Tuples.hpp"                // for expandMemberTuples, expan...
    6767#include "Validate/Autogen.hpp"             // for autogenerateRoutines
    68 #include "Validate/ImplementEnumFunc.hpp"   // for implementEnumFunc
    6968#include "Validate/CompoundLiteral.hpp"     // for handleCompoundLiterals
    7069#include "Validate/EliminateTypedef.hpp"    // for eliminateTypedef
    7170#include "Validate/EnumAndPointerDecay.hpp" // for decayEnumsAndPointers
    72 #include "Validate/FindSpecialDecls.h    // for findGlobalDecls
     71#include "Validate/FindSpecialDecls.hpp"    // for findGlobalDecls
    7372#include "Validate/FixQualifiedTypes.hpp"   // for fixQualifiedTypes
    7473#include "Validate/FixReturnTypes.hpp"      // for fixReturnTypes
     
    7776#include "Validate/HoistStruct.hpp"         // for hoistStruct
    7877#include "Validate/HoistTypeDecls.hpp"      // for hoistTypeDecls
     78#include "Validate/ImplementEnumFunc.hpp"   // for implementEnumFunc
    7979#include "Validate/InitializerLength.hpp"   // for setLengthFromInitializer
    8080#include "Validate/LabelAddressFixer.hpp"   // for fixLabelAddresses
     
    8383#include "Validate/ReturnCheck.hpp"         // for checkReturnStatements
    8484#include "Validate/VerifyCtorDtorAssign.hpp" // for verifyCtorDtorAssign
    85 #include "Validate/ReplacePseudoFunc.hpp"   // for replacePseudoFunc
    86 #include "Virtual/ExpandCasts.h"            // for expandCasts
     85#include "Virtual/ExpandCasts.hpp"          // for expandCasts
    8786#include "Virtual/VirtualDtor.hpp"          // for implementVirtDtors
    8887
     
    383382                PASS( "Resolve", ResolvExpr::resolve, transUnit );
    384383                DUMP( exprp, std::move( transUnit ) );
    385                 PASS( "Replace Pseudo Func", Validate::replacePseudoFunc, transUnit );
    386384                PASS( "Fix Init", InitTweak::fix, transUnit, buildingLibrary() ); // Here
    387385                PASS( "Erase With", ResolvExpr::eraseWith, transUnit );
  • tests/enum_tests/.expect/voidEnum.txt

    rec20ab9 rbf4fe05  
    1 Not Equal
     1Two different Opague Enum Should not be the same:
     2a and b are Not Equal
     3Default Output:
    240
    351
     6a
     7b
  • tests/enum_tests/structEnum.cfa

    rec20ab9 rbf4fe05  
    1717};
    1818
    19 // PointEnum foo(PointEnum in) {
    20 //      return in;
    21 // }
     19PointEnum identity(PointEnum in) {
     20     return in;
     21}
    2222
    2323// The only valid usage
  • tests/enum_tests/voidEnum.cfa

    rec20ab9 rbf4fe05  
    11#include <fstream.hfa>
    2 
     2#include <enum.hfa>
    33enum() voidEnum {
    44    a, b, c
     
    99};
    1010
    11 // void foo (const enum voidEnum & t){}
     11char* a[voidEnum] = {
     12    "A",
     13    "B",
     14    "C"
     15};
    1216
    1317int main() {
    1418    enum voidEnum v_1 = a;
    1519    enum voidEnum v_2 = b;
    16     // foo(b);
    17     // enum voidEnum v_3 = 10;
    18     // Error as int cannot convert to void enum
     20    sout | "Two different Opague Enum Should not be the same:";
    1921    if ( v_1 == v_2 ) {
    20         sout | "Equal" | nl;
     22        sout | "a and b are Equal" | nl;
    2123    } else {
    22         sout | "Not Equal" | nl;
     24        sout | "a and b are Not Equal" | nl;
    2325    }
    24     sout | a | nl;
    25     sout | b | nl;
     26    sout | "Default Output:";
     27    sout | a;
     28    sout | b;
     29   
     30    sout | labelE(v_1);
     31    sout | labelE(v_2);
     32
    2633}
Note: See TracChangeset for help on using the changeset viewer.