Changeset 11df881
- Timestamp:
- Jul 20, 2022, 11:42:29 AM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- b585593
- Parents:
- 0577df2
- Location:
- src
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/FixNames.cc
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixNames.cc -- 7 // FixNames.cc -- Adjustments to typed declarations. 8 8 // 9 9 // Author : Richard C. Bilson -
src/CodeGen/FixNames.h
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixNames.h -- 7 // FixNames.h -- Adjustments to typed declarations. 8 8 // 9 9 // Author : Richard C. Bilson … … 26 26 /// mangles object and function names 27 27 void fixNames( std::list< Declaration* > & translationUnit ); 28 void fixNames( ast::TranslationUnit & translationUnit ); 28 /// Sets scope levels and fills in main's default return. 29 void fixNames( ast::TranslationUnit & translationUnit ); 29 30 } // namespace CodeGen 30 31 -
src/Concurrency/Keywords.h
r0577df2 r11df881 28 28 void implementThreadStarter( std::list< Declaration * > & translationUnit ); 29 29 30 /// Implement the sue-like keywords and the suspend keyword. 30 /// Implement the sue-like keywords and the suspend keyword. Pre-Autogen 31 31 void implementKeywords( ast::TranslationUnit & translationUnit ); 32 /// Implement the mutex parameters and mutex statement. 32 /// Implement the mutex parameters and mutex statement. Post-Autogen 33 33 void implementMutex( ast::TranslationUnit & translationUnit ); 34 /// Add the thread starter code to constructors. 34 /// Add the thread starter code to constructors. Post-Autogen 35 35 void implementThreadStarter( ast::TranslationUnit & translationUnit ); 36 36 }; -
src/ControlStruct/ExceptDecl.cc
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ExceptDecl.cc -- 7 // ExceptDecl.cc -- Handles declarations of exception types. 8 8 // 9 9 // Author : Henry Xue -
src/ControlStruct/ExceptDecl.h
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ExceptDecl.h -- 7 // ExceptDecl.h -- Handles declarations of exception types. 8 8 // 9 9 // Author : Henry Xue … … 25 25 26 26 namespace ControlStruct { 27 void translateExcept( std::list< Declaration *> & translationUnit ); 28 void translateExcept( ast::TranslationUnit & translationUnit ); 27 /// Unfold exception declarations into raw structure declarations. 28 /// Also builds vtable declarations and converts vtable types. 29 void translateExcept( std::list< Declaration *> & translationUnit ); 30 void translateExcept( ast::TranslationUnit & translationUnit ); 29 31 } -
src/ControlStruct/HoistControlDecls.hpp
r0577df2 r11df881 21 21 22 22 namespace ControlStruct { 23 // Hoist declarations out of control flow statements into compound statement. 23 /// Hoist declarations out of control flow statements into compound statement. 24 /// Must happen before auto-gen routines are added. 24 25 void hoistControlDecls( ast::TranslationUnit & translationUnit ); 25 26 } // namespace ControlStruct -
src/InitTweak/GenInit.cc
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // GenInit.cc -- 7 // GenInit.cc -- Generate initializers, and other stuff. 8 8 // 9 9 // Author : Rob Schluntz -
src/InitTweak/GenInit.h
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // GenInit.h -- 7 // GenInit.h -- Generate initializers, and other stuff. 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 29 29 void genInit( ast::TranslationUnit & translationUnit ); 30 30 31 /// Converts return statements into copy constructor calls on the hidden return variable 31 /// Converts return statements into copy constructor calls on the hidden return variable. 32 /// This pass must happen before auto-gen. 32 33 void fixReturnStatements( std::list< Declaration * > & translationUnit ); 33 34 void fixReturnStatements( ast::TranslationUnit & translationUnit ); -
src/Tuples/Tuples.cc
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Tuples. h --7 // Tuples.cc -- A collection of tuple operations. 8 8 // 9 9 // Author : Andrew Beach -
src/Tuples/Tuples.h
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Tuples.h -- 7 // Tuples.h -- A collection of tuple operations. 8 8 // 9 9 // Author : Rodolfo G. Esteves -
src/Validate/Autogen.hpp
r0577df2 r11df881 22 22 namespace Validate { 23 23 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. 24 26 void autogenerateRoutines( ast::TranslationUnit & translationUnit ); 25 27 -
src/Validate/CompoundLiteral.hpp
r0577df2 r11df881 23 23 24 24 /// Use variables to implement compound literals. 25 /// Must happen after auto-gen routines are added. 25 26 void handleCompoundLiterals( ast::TranslationUnit & translationUnit ); 26 27 -
src/Validate/EnumAndPointerDecay.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // EnumAndPointerDecay.cpp -- 7 // EnumAndPointerDecay.cpp -- Normalizes enumerations and types in functions. 8 8 // 9 9 // Author : Andrew Beach -
src/Validate/EnumAndPointerDecay.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // EnumAndPointerDecay.hpp -- 7 // EnumAndPointerDecay.hpp -- Normalizes enumerations and types in functions. 8 8 // 9 9 // Author : Andrew Beach … … 22 22 namespace Validate { 23 23 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. 24 27 void decayEnumsAndPointers( ast::TranslationUnit & translationUnit ); 25 28 -
src/Validate/FindSpecialDecls.h
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FindSpecialDeclarations.h -- 7 // FindSpecialDeclarations.h -- Find special declarations used in the compiler. 8 8 // 9 9 // Author : Rob Schluntz … … 43 43 void findSpecialDecls( std::list< Declaration * > & translationUnit ); 44 44 45 /// find and remember some of the special declarations that are useful for45 /// Find and remember some of the special declarations that are useful for 46 46 /// generating code, so that they do not have to be discovered multiple times. 47 47 void findGlobalDecls( ast::TranslationUnit & translationUnit ); -
src/Validate/FixQualifiedTypes.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixQualifiedTypes.cpp -- 7 // FixQualifiedTypes.cpp -- Replace the qualified type with a direct type. 8 8 // 9 9 // Author : Andrew Beach … … 76 76 ret->qualifiers = type->qualifiers; 77 77 ast::TypeSubstitution sub( aggr->params, instp->params ); 78 // = parent->genericSubstitution();79 78 auto result = sub.apply(ret); 80 79 return result.node.release(); -
src/Validate/FixQualifiedTypes.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixQualifiedTypes.hpp -- 7 // FixQualifiedTypes.hpp -- Replace the qualified type with a direct type. 8 8 // 9 9 // Author : Andrew Beach … … 22 22 namespace Validate { 23 23 24 /// Replaces qualified types with an unqualified NamedTypeDecl. 25 /// Must happen after Link References To Types, 26 /// because aggregate members are accessed. 24 27 void fixQualifiedTypes( ast::TranslationUnit & translationUnit ); 25 28 -
src/Validate/FixReturnTypes.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixReturnTypes.cpp -- 7 // FixReturnTypes.cpp -- Unifies the representation of return types. 8 8 // 9 9 // Author : Andrew Beach -
src/Validate/FixReturnTypes.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixReturnTypes.hpp -- 7 // FixReturnTypes.hpp -- Unifies the representation of return types. 8 8 // 9 9 // Author : Andrew Beach … … 22 22 namespace Validate { 23 23 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. 26 27 void fixReturnTypes( ast::TranslationUnit & translationUnit ); 27 28 -
src/Validate/ForallPointerDecay.hpp
r0577df2 r11df881 29 29 /// Also checks that operator names are used properly on functions and 30 30 /// 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. 31 34 void decayForallPointers( ast::TranslationUnit & transUnit ); 32 35 -
src/Validate/GenericParameter.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // GenericParameter.hpp -- 7 // GenericParameter.hpp -- Generic parameter related passes. 8 8 // 9 9 // Author : Andrew Beach -
src/Validate/GenericParameter.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // GenericParameter.hpp -- 7 // GenericParameter.hpp -- Generic parameter related passes. 8 8 // 9 9 // Author : Andrew Beach … … 23 23 24 24 /// 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. 25 27 void fillGenericParameters( ast::TranslationUnit & translationUnit ); 26 28 -
src/Validate/HoistStruct.hpp
r0577df2 r11df881 22 22 namespace Validate { 23 23 24 /// Flattens nested type declarations. 24 /// Flattens nested type declarations. (Run right after Fix Qualified Types.) 25 25 void hoistStruct( ast::TranslationUnit & translationUnit ); 26 26 -
src/Validate/HoistTypeDecls.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // HoistTypeDecls.cpp -- 7 // HoistTypeDecls.cpp -- Hoists declarations of implicitly declared types. 8 8 // 9 9 // Author : Andrew Beach -
src/Validate/HoistTypeDecls.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // HoistTypeDecls.hpp -- 7 // HoistTypeDecls.hpp -- Hoists declarations of implicitly declared types. 8 8 // 9 9 // Author : Andrew Beach … … 22 22 namespace Validate { 23 23 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. 24 27 void hoistTypeDecls( ast::TranslationUnit & translationUnit ); 25 28 -
src/Validate/LabelAddressFixer.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // LabelAddressFixer.cpp -- 7 // LabelAddressFixer.cpp -- Create label address expressions. 8 8 // 9 9 // Author : Andrew Beach -
src/Validate/LabelAddressFixer.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // LabelAddressFixer.hpp -- 7 // LabelAddressFixer.hpp -- Create label address expressions. 8 8 // 9 9 // Author : Andrew Beach … … 20 20 namespace Validate { 21 21 22 /// Label addresses are not actually created in the parser, this pass finds 23 /// the patterns that represent the label address expression. 22 24 void fixLabelAddresses( ast::TranslationUnit & translationUnit ); 23 25 -
src/Validate/LinkReferenceToTypes.hpp
r0577df2 r11df881 22 22 namespace Validate { 23 23 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. 24 27 void linkReferenceToTypes( ast::TranslationUnit & translationUnit ); 25 28 -
src/Validate/ReplaceTypedef.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ReplaceTypedef.cpp -- 7 // ReplaceTypedef.cpp -- Fill in all typedefs with the underlying type. 8 8 // 9 9 // Author : Andrew Beach -
src/Validate/ReplaceTypedef.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // ReplaceTypedef.hpp -- 7 // ReplaceTypedef.hpp -- Fill in all typedefs with the underlying type. 8 8 // 9 9 // Author : Andrew Beach … … 22 22 namespace Validate { 23 23 24 /// Uses of typedef are replaced with the type in the typedef. 24 25 void replaceTypedef( ast::TranslationUnit & translationUnit ); 25 26 -
src/Validate/VerifyCtorDtorAssign.cpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // VerifyCtorDtorAssign.cpp -- 7 // VerifyCtorDtorAssign.cpp -- Check the form of operators. 8 8 // 9 9 // Author : Andrew Beach -
src/Validate/VerifyCtorDtorAssign.hpp
r0577df2 r11df881 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // VerifyCtorDtorAssign.hpp -- 7 // VerifyCtorDtorAssign.hpp -- Check the form of operators. 8 8 // 9 9 // Author : Andrew Beach … … 22 22 namespace Validate { 23 23 24 /// Check that constructors, destructors and assignments all have the correct 25 /// form. Must happen before auto-gen or anything that examines operators. 24 26 void verifyCtorDtorAssign( ast::TranslationUnit & translationUnit ); 25 27 -
src/main.cc
r0577df2 r11df881 345 345 } 346 346 347 // Must happen before auto-gen, or anything that examines ops.348 347 PASS( "Verify Ctor, Dtor & Assign", Validate::verifyCtorDtorAssign( transUnit ) ); 349 350 348 PASS( "Hoist Type Decls", Validate::hoistTypeDecls( transUnit ) ); 351 349 // Hoist Type Decls pulls some declarations out of contexts where … … 355 353 356 354 PASS( "Replace Typedefs", Validate::replaceTypedef( transUnit ) ); 357 358 // Must happen before auto-gen.359 355 PASS( "Fix Return Types", Validate::fixReturnTypes( transUnit ) ); 360 361 // Must happen before Link Reference to Types, it needs correct362 // types for mangling.363 356 PASS( "Enum and Pointer Decay", Validate::decayEnumsAndPointers( transUnit ) ); 364 357 365 // Must happen before auto-gen, because it uses the sized flag.366 358 PASS( "Link Reference To Types", Validate::linkReferenceToTypes( transUnit ) ); 367 359 368 // Must happen after Link References To Types,369 // because aggregate members are accessed.370 360 PASS( "Fix Qualified Types", Validate::fixQualifiedTypes( transUnit ) ); 371 372 361 PASS( "Hoist Struct", Validate::hoistStruct( transUnit ) ); 373 362 PASS( "Eliminate Typedef", Validate::eliminateTypedef( transUnit ) ); 374 375 // Check as early as possible. Can't happen before376 // LinkReferenceToType, observed failing when attempted377 // before eliminateTypedef378 363 PASS( "Validate Generic Parameters", Validate::fillGenericParameters( transUnit ) ); 379 380 364 PASS( "Translate Dimensions", Validate::translateDimensionParameters( transUnit ) ); 381 365 PASS( "Check Function Returns", Validate::checkReturnStatements( transUnit ) ); 382 383 // Must happen before Autogen.384 366 PASS( "Fix Return Statements", InitTweak::fixReturnStatements( transUnit ) ); 385 386 367 PASS( "Implement Concurrent Keywords", Concurrency::implementKeywords( transUnit ) ); 387 388 // Must be after implement concurrent keywords; because uniqueIds389 // must be set on declaration before resolution.390 // Must happen before autogen routines are added.391 368 PASS( "Forall Pointer Decay", Validate::decayForallPointers( transUnit ) ); 392 393 // Must happen before autogen routines are added.394 369 PASS( "Hoist Control Declarations", ControlStruct::hoistControlDecls( transUnit ) ); 395 370 396 // Must be after enum and pointer decay.397 // Must be before compound literals.398 371 PASS( "Generate Autogen Routines", Validate::autogenerateRoutines( transUnit ) ); 399 372
Note: See TracChangeset
for help on using the changeset viewer.