Changeset 31f4837 for src/Common


Ignore:
Timestamp:
May 13, 2024, 10:26:59 AM (17 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
e6f1a4b
Parents:
acb33f15 (diff), ca4f2b2 (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:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/Common
Files:
4 edited
30 moved

Legend:

Unmodified
Added
Removed
  • src/Common/Assert.cpp

    racb33f15 r31f4837  
    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

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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

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

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

    racb33f15 r31f4837  
    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

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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

    racb33f15 r31f4837  
    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

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

    racb33f15 r31f4837  
    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)
Note: See TracChangeset for help on using the changeset viewer.