Changeset 74ec742 for src/Validate


Ignore:
Timestamp:
May 20, 2022, 10:36:45 AM (4 years ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
25fa20a
Parents:
29d8c02 (diff), 7831e8fb (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/Validate
Files:
7 added
5 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/Autogen.cpp

    r29d8c02 r74ec742  
    350350                name,
    351351                std::move( type_params ),
     352                std::move( assertions ),
    352353                std::move( params ),
    353354                std::move( returns ),
     
    360361                // Auto-generated routines are inline to avoid conflicts.
    361362                ast::Function::Specs( ast::Function::Inline ) );
    362         decl->assertions = std::move( assertions );
    363363        decl->fixUniqueId();
    364364        return decl;
  • src/Validate/ForallPointerDecay.cpp

    r29d8c02 r74ec742  
    1010// Created On       : Tue Dec  7 16:15:00 2021
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Feb 11 10:59:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Sat Apr 23 13:10:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    237237}
    238238
     239std::vector<ast::ptr<ast::DeclWithType>> expandAssertions(
     240                std::vector<ast::ptr<ast::DeclWithType>> const & old ) {
     241        return TraitExpander::expandAssertions( old );
     242}
     243
    239244} // namespace Validate
    240245
  • src/Validate/ForallPointerDecay.hpp

    r29d8c02 r74ec742  
    1010// Created On       : Tue Dec  7 16:15:00 2021
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Dec  8 11:50:00 2021
    13 // Update Count     : 0
     12// Last Modified On : Sat Apr 23 13:13:00 2022
     13// Update Count     : 1
    1414//
    1515
    1616#pragma once
    1717
     18#include <vector>
     19#include "AST/Node.hpp"
     20
    1821namespace ast {
     22        class DeclWithType;
    1923        class TranslationUnit;
    2024}
     
    2731void decayForallPointers( ast::TranslationUnit & transUnit );
    2832
     33/// Expand all traits in an assertion list.
     34std::vector<ast::ptr<ast::DeclWithType>> expandAssertions(
     35        std::vector<ast::ptr<ast::DeclWithType>> const & );
     36
    2937}
    3038
  • src/Validate/GenericParameter.cpp

    r29d8c02 r74ec742  
    1010// Created On       : Fri Mar 21 10:02:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Apr 13 10:09:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Fri Apr 22 16:43:00 2022
     13// Update Count     : 1
    1414//
    1515
     
    2222#include "AST/TranslationUnit.hpp"
    2323#include "AST/Type.hpp"
     24#include "Validate/NoIdSymbolTable.hpp"
    2425
    2526namespace Validate {
     
    138139// --------------------------------------------------------------------------
    139140
    140 // A SymbolTable that only has the operations used in the Translate Dimension
    141 // pass. More importantly, it doesn't have some methods that should no be
    142 // called by the Pass template (lookupId and addId).
    143 class NoIdSymbolTable {
    144         ast::SymbolTable base;
    145 public:
    146 #       define FORWARD_X( func, types_and_names, just_names ) \
    147         inline auto func types_and_names -> decltype( base.func just_names ) { \
    148                 return base.func just_names ; \
    149         }
    150 #       define FORWARD_0( func )         FORWARD_X( func, (),             () )
    151 #       define FORWARD_1( func, type )   FORWARD_X( func, (type arg),     (arg) )
    152 #       define FORWARD_2( func, t0, t1 ) FORWARD_X( func, (t0 a0, t1 a1), (a0, a1) )
    153 
    154         FORWARD_0( enterScope )
    155         FORWARD_0( leaveScope )
    156         FORWARD_1( lookupType, const std::string &        )
    157         FORWARD_1( addType   , const ast::NamedTypeDecl * )
    158         FORWARD_1( addStruct , const ast::StructDecl *    )
    159         FORWARD_1( addEnum   , const ast::EnumDecl *      )
    160         FORWARD_1( addUnion  , const ast::UnionDecl *     )
    161         FORWARD_1( addTrait  , const ast::TraitDecl *     )
    162         FORWARD_2( addWith   , const std::vector< ast::ptr<ast::Expr> > &, const ast::Decl * )
    163 };
    164 
    165 struct TranslateDimensionCore : public ast::WithGuards {
    166         NoIdSymbolTable symtab;
     141struct TranslateDimensionCore :
     142                public WithNoIdSymbolTable, public ast::WithGuards {
    167143
    168144        // SUIT: Struct- or Union- InstType
  • src/Validate/module.mk

    r29d8c02 r74ec742  
    1010## Author           : Rob Schluntz
    1111## Created On       : Fri Jul 27 10:10:10 2018
    12 ## Last Modified By : Rob Schluntz
    13 ## Last Modified On : Fri Jul 27 10:10:26 2018
    14 ## Update Count     : 2
     12## Last Modified By : Andrew Beach
     13## Last Modified On : Tue May 17 14:59:00 2022
     14## Update Count     : 3
    1515###############################################################################
    1616
    1717SRC_VALIDATE = \
     18        Validate/FindSpecialDecls.cc \
     19        Validate/FindSpecialDecls.h
     20
     21SRC += $(SRC_VALIDATE) \
    1822        Validate/Autogen.cpp \
    1923        Validate/Autogen.hpp \
    2024        Validate/CompoundLiteral.cpp \
    2125        Validate/CompoundLiteral.hpp \
     26        Validate/EliminateTypedef.cpp \
     27        Validate/EliminateTypedef.hpp \
     28        Validate/FindSpecialDeclsNew.cpp \
     29        Validate/FixQualifiedTypes.cpp \
     30        Validate/FixQualifiedTypes.hpp \
    2231        Validate/ForallPointerDecay.cpp \
    2332        Validate/ForallPointerDecay.hpp \
     
    2635        Validate/HandleAttributes.cc \
    2736        Validate/HandleAttributes.h \
     37        Validate/HoistStruct.cpp \
     38        Validate/HoistStruct.hpp \
    2839        Validate/InitializerLength.cpp \
    2940        Validate/InitializerLength.hpp \
    3041        Validate/LabelAddressFixer.cpp \
    3142        Validate/LabelAddressFixer.hpp \
     43        Validate/NoIdSymbolTable.hpp \
    3244        Validate/ReturnCheck.cpp \
    33         Validate/ReturnCheck.hpp \
    34         Validate/FindSpecialDeclsNew.cpp \
    35         Validate/FindSpecialDecls.cc \
    36         Validate/FindSpecialDecls.h
     45        Validate/ReturnCheck.hpp
    3746
    38 SRC += $(SRC_VALIDATE)
    3947SRCDEMANGLE += $(SRC_VALIDATE)
Note: See TracChangeset for help on using the changeset viewer.