Changeset 11df881 for src/Validate


Ignore:
Timestamp:
Jul 20, 2022, 11:42:29 AM (22 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
b585593
Parents:
0577df2
Message:

Updated documentation on pre-resolver passes, moving code to headers instead of uses. Note that some comments were just copied over, I don't know if they are accurate.

Location:
src/Validate
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/Autogen.hpp

    r0577df2 r11df881  
    2222namespace Validate {
    2323
     24/// Generate routines for all data types in the translation unit.
     25/// A lot of passes have to happen either before or after this pass.
    2426void autogenerateRoutines( ast::TranslationUnit & translationUnit );
    2527
  • src/Validate/CompoundLiteral.hpp

    r0577df2 r11df881  
    2323
    2424/// Use variables to implement compound literals.
     25/// Must happen after auto-gen routines are added.
    2526void handleCompoundLiterals( ast::TranslationUnit & translationUnit );
    2627
  • src/Validate/EnumAndPointerDecay.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // EnumAndPointerDecay.cpp --
     7// EnumAndPointerDecay.cpp -- Normalizes enumerations and types in functions.
    88//
    99// Author           : Andrew Beach
  • src/Validate/EnumAndPointerDecay.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // EnumAndPointerDecay.hpp --
     7// EnumAndPointerDecay.hpp -- Normalizes enumerations and types in functions.
    88//
    99// Author           : Andrew Beach
     
    2222namespace Validate {
    2323
     24/// Fix the parameter and return types of functions. Also assigns types to
     25/// enumeration values. This must happen before Link Reference to Types,
     26/// it needs correct types for mangling, and before auto-gen.
    2427void decayEnumsAndPointers( ast::TranslationUnit & translationUnit );
    2528
  • src/Validate/FindSpecialDecls.h

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FindSpecialDeclarations.h --
     7// FindSpecialDeclarations.h -- Find special declarations used in the compiler.
    88//
    99// Author           : Rob Schluntz
     
    4343        void findSpecialDecls( std::list< Declaration * > & translationUnit );
    4444
    45 /// find and remember some of the special declarations that are useful for
     45/// Find and remember some of the special declarations that are useful for
    4646/// generating code, so that they do not have to be discovered multiple times.
    4747void findGlobalDecls( ast::TranslationUnit & translationUnit );
  • src/Validate/FixQualifiedTypes.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixQualifiedTypes.cpp --
     7// FixQualifiedTypes.cpp -- Replace the qualified type with a direct type.
    88//
    99// Author           : Andrew Beach
     
    7676                                                        ret->qualifiers = type->qualifiers;
    7777                                                        ast::TypeSubstitution sub( aggr->params, instp->params );
    78                                                         // = parent->genericSubstitution();
    7978                                                        auto result = sub.apply(ret);
    8079                                                        return result.node.release();
  • src/Validate/FixQualifiedTypes.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixQualifiedTypes.hpp --
     7// FixQualifiedTypes.hpp -- Replace the qualified type with a direct type.
    88//
    99// Author           : Andrew Beach
     
    2222namespace Validate {
    2323
     24/// Replaces qualified types with an unqualified NamedTypeDecl.
     25/// Must happen after Link References To Types,
     26/// because aggregate members are accessed.
    2427void fixQualifiedTypes( ast::TranslationUnit & translationUnit );
    2528
  • src/Validate/FixReturnTypes.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixReturnTypes.cpp --
     7// FixReturnTypes.cpp -- Unifies the representation of return types.
    88//
    99// Author           : Andrew Beach
  • src/Validate/FixReturnTypes.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixReturnTypes.hpp --
     7// FixReturnTypes.hpp -- Unifies the representation of return types.
    88//
    99// Author           : Andrew Beach
     
    2222namespace Validate {
    2323
    24 // This pass needs to happen early so that other passes can find tuple types
    25 // in the right places, especially for function return types.
     24/// This pass needs to happen early so that other passes can find tuple types
     25/// in the right places, especially for function return types.
     26/// Must happen before auto-gen.
    2627void fixReturnTypes( ast::TranslationUnit & translationUnit );
    2728
  • src/Validate/ForallPointerDecay.hpp

    r0577df2 r11df881  
    2929/// Also checks that operator names are used properly on functions and
    3030/// assigns unique IDs. This is a "legacy" pass.
     31/// Must be after implement concurrent keywords; because uniqueIds must be
     32/// set on declaration before resolution.
     33/// Must happen before auto-gen routines are added.
    3134void decayForallPointers( ast::TranslationUnit & transUnit );
    3235
  • src/Validate/GenericParameter.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenericParameter.hpp --
     7// GenericParameter.hpp -- Generic parameter related passes.
    88//
    99// Author           : Andrew Beach
  • src/Validate/GenericParameter.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // GenericParameter.hpp --
     7// GenericParameter.hpp -- Generic parameter related passes.
    88//
    99// Author           : Andrew Beach
     
    2323
    2424/// Perform substutions for generic parameters and fill in defaults.
     25/// Check as early as possible, but it can't happen before Link References to
     26/// Types and observed failing when attempted before eliminate typedef.
    2527void fillGenericParameters( ast::TranslationUnit & translationUnit );
    2628
  • src/Validate/HoistStruct.hpp

    r0577df2 r11df881  
    2222namespace Validate {
    2323
    24 /// Flattens nested type declarations.
     24/// Flattens nested type declarations. (Run right after Fix Qualified Types.)
    2525void hoistStruct( ast::TranslationUnit & translationUnit );
    2626
  • src/Validate/HoistTypeDecls.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // HoistTypeDecls.cpp --
     7// HoistTypeDecls.cpp -- Hoists declarations of implicitly declared types.
    88//
    99// Author           : Andrew Beach
  • src/Validate/HoistTypeDecls.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // HoistTypeDecls.hpp --
     7// HoistTypeDecls.hpp -- Hoists declarations of implicitly declared types.
    88//
    99// Author           : Andrew Beach
     
    2222namespace Validate {
    2323
     24/// There are some places where a type can be declared but are usually only
     25/// referenced (with an *InstType). This inserts the declarations before
     26/// they are referenced.
    2427void hoistTypeDecls( ast::TranslationUnit & translationUnit );
    2528
  • src/Validate/LabelAddressFixer.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // LabelAddressFixer.cpp --
     7// LabelAddressFixer.cpp -- Create label address expressions.
    88//
    99// Author           : Andrew Beach
  • src/Validate/LabelAddressFixer.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // LabelAddressFixer.hpp --
     7// LabelAddressFixer.hpp -- Create label address expressions.
    88//
    99// Author           : Andrew Beach
     
    2020namespace Validate {
    2121
     22/// Label addresses are not actually created in the parser, this pass finds
     23/// the patterns that represent the label address expression.
    2224void fixLabelAddresses( ast::TranslationUnit & translationUnit );
    2325
  • src/Validate/LinkReferenceToTypes.hpp

    r0577df2 r11df881  
    2222namespace Validate {
    2323
     24/// Fills in the base value of various instance types, and some related
     25/// adjustments, such as setting the sized flag.
     26/// Because of the sized flag, it must happen before auto-gen.
    2427void linkReferenceToTypes( ast::TranslationUnit & translationUnit );
    2528
  • src/Validate/ReplaceTypedef.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ReplaceTypedef.cpp --
     7// ReplaceTypedef.cpp -- Fill in all typedefs with the underlying type.
    88//
    99// Author           : Andrew Beach
  • src/Validate/ReplaceTypedef.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ReplaceTypedef.hpp --
     7// ReplaceTypedef.hpp -- Fill in all typedefs with the underlying type.
    88//
    99// Author           : Andrew Beach
     
    2222namespace Validate {
    2323
     24/// Uses of typedef are replaced with the type in the typedef.
    2425void replaceTypedef( ast::TranslationUnit & translationUnit );
    2526
  • src/Validate/VerifyCtorDtorAssign.cpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // VerifyCtorDtorAssign.cpp --
     7// VerifyCtorDtorAssign.cpp -- Check the form of operators.
    88//
    99// Author           : Andrew Beach
  • src/Validate/VerifyCtorDtorAssign.hpp

    r0577df2 r11df881  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // VerifyCtorDtorAssign.hpp --
     7// VerifyCtorDtorAssign.hpp -- Check the form of operators.
    88//
    99// Author           : Andrew Beach
     
    2222namespace Validate {
    2323
     24/// Check that constructors, destructors and assignments all have the correct
     25/// form. Must happen before auto-gen or anything that examines operators.
    2426void verifyCtorDtorAssign( ast::TranslationUnit & translationUnit );
    2527
Note: See TracChangeset for help on using the changeset viewer.