Changeset 0720e049 for src


Ignore:
Timestamp:
Aug 11, 2017, 10:33:37 AM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
54cd58b0
Parents:
3d4b23fa (diff), 59a75cb (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:/u/cforall/software/cfa/cfa-cc

Location:
src
Files:
14 added
4 deleted
201 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun  8 16:00:00 2017
    13 // Update Count     : 485
     12// Last Modified On : Tus Jul 25 15:29:00 2017
     13// Update Count     : 486
    1414//
     15#include "CodeGenerator.h"
    1516
    1617#include <cassert>                   // for assert, assertf
    1718#include <list>                      // for _List_iterator, list, list<>::it...
    1819
    19 #include "CodeGenerator.h"
    2020#include "Common/SemanticError.h"    // for SemanticError
    2121#include "Common/UniqueName.h"       // for UniqueName
     
    586586        }
    587587
     588        void CodeGenerator::visit( VirtualCastExpr * castExpr ) {
     589                assertf( ! genC, "VirtualCastExpr should not reach code generation." );
     590                extension( castExpr );
     591                output << "(virtual ";
     592                castExpr->get_arg()->accept( *this );
     593                output << ")";
     594        }
     595
    588596        void CodeGenerator::visit( UntypedMemberExpr * memberExpr ) {
    589597                assertf( ! genC, "UntypedMemberExpr should not reach code generation." );
  • src/CodeGen/CodeGenerator.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun  8 15:48:00 2017
    13 // Update Count     : 52
     12// Last Modified On : Tus Jul 25 25:30:00 2017
     13// Update Count     : 54
    1414//
    1515
    16 #ifndef CODEGENV_H
    17 #define CODEGENV_H
     16#pragma once
    1817
    1918#include <list>                   // for list
     
    6059                virtual void visit( AddressExpr *addressExpr );
    6160                virtual void visit( CastExpr *castExpr );
     61                virtual void visit( VirtualCastExpr *castExpr );
    6262                virtual void visit( UntypedMemberExpr *memberExpr );
    6363                virtual void visit( MemberExpr *memberExpr );
     
    159159} // namespace CodeGen
    160160
    161 #endif // CODEGENV_H
    162 
    163161// Local Variables: //
    164162// tab-width: 4 //
  • src/CodeGen/FixMain.h

    r3d4b23fa r0720e049  
    99// Author           : Thierry Delisle
    1010// Created On       : Thr Jan 12 14:11:09 2017
    11 // Last Modified By :
    12 // Last Modified On :
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:16:59 2017
     13// Update Count     : 1
    1414//
    1515
    16 #ifndef FIXMAIN_H
    17 #define FIXMAIN_H
     16#pragma once
    1817
    1918#include <iosfwd>
     
    4443        };
    4544};
    46 
    47 #endif //FIXMAIN_H
  • src/CodeGen/FixNames.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 23:37:32 2015
    13 // Update Count     : 2
     12// Last Modified On : Fri Jul 21 22:17:33 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef FIXNAMES_H
    17 #define FIXNAMES_H
     16#pragma once
    1817
    1918#include <list>  // for list
     
    2625} // namespace CodeGen
    2726
    28 #endif // FIXNAMES_H
    29 
    3027// Local Variables: //
    3128// tab-width: 4 //
  • src/CodeGen/GenType.cc

    r3d4b23fa r0720e049  
    1313// Update Count     : 22
    1414//
     15#include "GenType.h"
    1516
    1617#include <cassert>                // for assert, assertf
     
    1920
    2021#include "CodeGenerator.h"        // for CodeGenerator
    21 #include "GenType.h"
    2222#include "SynTree/Declaration.h"  // for DeclarationWithType
    2323#include "SynTree/Expression.h"   // for Expression
  • src/CodeGen/GenType.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 23:38:53 2015
    13 // Update Count     : 1
     12// Last Modified On : Fri Jul 21 22:17:23 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef _GENTYPE_H
    17 #define _GENTYPE_H
     16#pragma once
    1817
    1918#include <string>  // for string
     
    2625} // namespace CodeGen
    2726
    28 #endif // _GENTYPE_H
    29 
    3027// Local Variables: //
    3128// tab-width: 4 //
  • src/CodeGen/Generate.cc

    r3d4b23fa r0720e049  
    1313// Update Count     : 6
    1414//
     15#include "Generate.h"
    1516
    1617#include <iostream>                  // for ostream, endl, operator<<
     
    2021#include "CodeGenerator.h"           // for CodeGenerator, doSemicolon, oper...
    2122#include "GenType.h"                 // for genPrettyType
    22 #include "Generate.h"
    2323#include "Parser/LinkageSpec.h"      // for isBuiltin, isGeneratable
    2424#include "SynTree/BaseSyntaxNode.h"  // for BaseSyntaxNode
  • src/CodeGen/Generate.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 23:39:51 2015
    13 // Update Count     : 1
     12// Last Modified On : Fri Jul 21 22:16:35 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef GENERATE_H
    17 #define GENERATE_H
     16#pragma once
    1817
    1918#include <iostream>  // for ostream
     
    3130} // namespace CodeGen
    3231
    33 #endif // GENERATE_H
    34 
    3532// Local Variables: //
    3633// tab-width: 4 //
  • src/CodeGen/OperatorTable.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Dec 13 14:33:05 2016
    13 // Update Count     : 10
     12// Last Modified On : Sat Jul 15 17:12:22 2017
     13// Update Count     : 15
    1414//
    1515
     
    3535                        {       "++?",          "++",   "_operator_preincr",                    OT_PREFIXASSIGN         },
    3636                        {       "--?",          "--",   "_operator_predecr",                    OT_PREFIXASSIGN         },
     37                        {       "?\\?",         "\\",   "_operator_exponential",                OT_INFIX                        },
    3738                        {       "?*?",          "*",    "_operator_multiply",                   OT_INFIX                        },
    3839                        {       "?/?",          "/",    "_operator_divide",                             OT_INFIX                        },
     
    5253                        {       "?|?",          "|",    "_operator_bitor",                              OT_INFIX                        },
    5354                        {       "?=?",          "=",    "_operator_assign",                             OT_INFIXASSIGN          },
     55                        {       "?\\=?",        "\\=",  "_operator_expassign",                  OT_INFIXASSIGN          },
    5456                        {       "?*=?",         "*=",   "_operator_multassign",                 OT_INFIXASSIGN          },
    5557                        {       "?/=?",         "/=",   "_operator_divassign",                  OT_INFIXASSIGN          },
  • src/CodeGen/OperatorTable.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jun 24 16:17:57 2015
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:17:11 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef _OPERATORTABLE_H
    17 #define _OPERATORTABLE_H
     16#pragma once
    1817
    1918#include <string>
     
    4544} // namespace CodeGen
    4645
    47 #endif // _OPERATORTABLE_H
    48 
    4946// Local Variables: //
    5047// tab-width: 4 //
  • src/CodeTools/DeclStats.h

    r3d4b23fa r0720e049  
    99// Author           : Aaron Moss
    1010// Created On       : Wed Jan 31 16:40:00 2016
    11 // Last Modified By : Aaron Moss
    12 // Last Modified On : Wed Jan 31 16:40:00 2016
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:17:56 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef DECLSTATS_H
    17 #define DECLSTATS_H
     16#pragma once
    1817
    1918#include <list>  // for list
     
    2827}  // namespace CodeTools
    2928
    30 #endif // DECLSTATS_H
    31 
    3229// Local Variables: //
    3330// tab-width: 4 //
  • src/CodeTools/TrackLoc.cc

    r3d4b23fa r0720e049  
    1616#include "TrackLoc.h"
    1717
    18 #include <cstdlib>                    // for size_t, exit, EXIT_FAILURE
    19 #include <iostream>                   // for operator<<, ostream, basic_ostream
    20 #include <iterator>                   // for back_inserter, inserter
    21 #include <stack>                      // for stack
    22 #include <string>                     // for operator<<, string
    23 #include <typeindex>                  // for type_index
     18#include <cstdlib>                   // for exit, EXIT_FAILURE
     19#include <iostream>                  // for operator<<, ostream, basic_ostream
     20#include <stack>                     // for stack
     21#include <string>                    // for operator<<, string
     22#include <typeindex>                 // for type_index
    2423
    25 #include "Common/PassVisitor.h"       // for PassVisitor
    26 #include "Common/PassVisitor.impl.h"  // for acceptAll
    27 #include "Common/SemanticError.h"     // for SemanticError
    28 #include "Common/utility.h"           // for CodeLocation
    29 #include "SynTree/BaseSyntaxNode.h"   // for BaseSyntaxNode
    30 #include "SynTree/Mutator.h"          // for mutateAll
    31 #include "SynTree/Visitor.h"          // for acceptAll
     24#include "Common/PassVisitor.h"      // for PassVisitor
     25#include "Common/utility.h"          // for CodeLocation
     26#include "SynTree/BaseSyntaxNode.h"  // for BaseSyntaxNode
    3227
    3328class Declaration;
     
    4641                std::stack< CodeLocation * > parents;
    4742        public:
    48                 LocationPrinter(size_t printLevel) : 
     43                LocationPrinter(size_t printLevel) :
    4944                        printLevel(printLevel), lastNode(nullptr)
    5045                {}
     
    6560                                if ( !parents.empty() ) {
    6661                                        node->location = *parents.top();
    67                                 } 
     62                                }
    6863                                else if (nullptr != lastNode) {
    6964                                        node->location = *lastNode;
    70                                 } 
     65                                }
    7166                                else {
    7267                                        std::cerr << "Top level node has no CodeLocation " << name << std::endl;
  • src/CodeTools/TrackLoc.h

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Tues May 2 15:40:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed May 3 14:42:00 2017
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:17:44 2017
     13// Update Count     : 1
    1414//
    1515
    16 #ifndef TRACKLOC_H
    17 #define TRACKLOC_H
     16#pragma once
    1817
    1918#include <cstddef>   // for size_t
     
    3130}  // namespace CodeTools
    3231
    33 #endif // TRACKLOC_H
    34 
    3532// Local Variables: //
    3633// tab-width: 4 //
  • src/Common/CompilerError.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 18 23:41:30 2016
    13 // Update Count     : 3
     12// Last Modified On : Fri Jul 21 22:18:07 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef COMPILER_ERROR_H
    17 #define COMPILER_ERROR_H
     16#pragma once
    1817
    1918#include <string>
     
    3130};
    3231
    33 #endif // COMPILER_ERROR_H
    34 
    3532// Local Variables: //
    3633// tab-width: 4 //
  • src/Common/PassVisitor.h

    r3d4b23fa r0720e049  
    8181        virtual void visit( NameExpr *nameExpr ) override final;
    8282        virtual void visit( CastExpr *castExpr ) override final;
     83        virtual void visit( VirtualCastExpr *castExpr ) override final;
    8384        virtual void visit( AddressExpr *addressExpr ) override final;
    8485        virtual void visit( LabelAddressExpr *labAddressExpr ) override final;
     
    168169        virtual Expression* mutate( LabelAddressExpr *labAddressExpr ) override final;
    169170        virtual Expression* mutate( CastExpr *castExpr ) override final;
     171        virtual Expression* mutate( VirtualCastExpr *castExpr ) override final;
    170172        virtual Expression* mutate( UntypedMemberExpr *memberExpr ) override final;
    171173        virtual Expression* mutate( MemberExpr *memberExpr ) override final;
  • src/Common/PassVisitor.impl.h

    r3d4b23fa r0720e049  
    11#pragma once
     2// IWYU pragma: private, include "PassVisitor.h"
    23
    34#define VISIT_START( node )                     \
     
    606607
    607608template< typename pass_type >
     609void PassVisitor< pass_type >::visit( VirtualCastExpr * node ) {
     610        VISIT_BODY( node );
     611}
     612
     613template< typename pass_type >
    608614void PassVisitor< pass_type >::visit( AddressExpr * node ) {
    609615        VISIT_BODY( node );
     
    978984
    979985template< typename pass_type >
     986Expression * PassVisitor< pass_type >::mutate( VirtualCastExpr * node ) {
     987        MUTATE_BODY( Expression, node );
     988}
     989
     990template< typename pass_type >
    980991Expression * PassVisitor< pass_type >::mutate( UntypedMemberExpr * node ) {
    981992        MUTATE_BODY( Expression, node );
  • src/Common/PassVisitor.proto.h

    r3d4b23fa r0720e049  
    11#pragma once
     2// IWYU pragma: private, include "PassVisitor.h"
    23
    34template<typename pass_type>
  • src/Common/ScopedMap.h

    r3d4b23fa r0720e049  
    99// Author           : Aaron B. Moss
    1010// Created On       : Wed Dec 2 11:37:00 2015
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Wed Dec 2 11:37:00 2015
    13 // Update Count     : 1
    14 //
    15 
    16 #ifndef _SCOPEDMAP_H
    17 #define _SCOPEDMAP_H
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:18:24 2017
     13// Update Count     : 2
     14//
     15
     16#pragma once
    1817
    1918#include <cassert>
     
    305304};
    306305
    307 #endif // _SCOPEDMAP_H
    308 
    309306// Local Variables: //
    310307// tab-width: 4 //
  • src/Common/SemanticError.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep 24 15:13:42 2016
    13 // Update Count     : 5
     12// Last Modified On : Fri Jul 21 22:18:59 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef SEMANTICERROR_H
    17 #define SEMANTICERROR_H
     16#pragma once
    1817
    1918#include <exception>  // for exception
     
    6261}
    6362
    64 #endif // SEMANTICERROR_H
    65 
    6663// Local Variables: //
    6764// tab-width: 4 //
  • src/Common/UnimplementedError.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:23:08 2015
    13 // Update Count     : 1
     12// Last Modified On : Fri Jul 21 22:18:35 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef _UNIMPLEMENTEDERROR_H
    17 #define _UNIMPLEMENTEDERROR_H
     16#pragma once
    1817
    1918#include <string>
     
    3130};
    3231
    33 #endif // _UNIMPLEMENTEDERROR_H
    34 
    3532// Local Variables: //
    3633// tab-width: 4 //
  • src/Common/UniqueName.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:24:20 2015
    13 // Update Count     : 1
     12// Last Modified On : Fri Jul 21 22:18:45 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef UNIQUENAME_H
    17 #define UNIQUENAME_H
     16#pragma once
    1817
    1918#include <string>
     
    2827};
    2928
    30 #endif // UNIQUENAME_H
    31 
    3229// Local Variables: //
    3330// tab-width: 4 //
  • src/Common/VectorMap.h

    r3d4b23fa r0720e049  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ScopedMap.h --
     7// VectorMap.h --
    88//
    99// Author           : Aaron B. Moss
    1010// Created On       : Wed Feb  1 16:55:00 2017
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Wed Feb  1 16:55:00 2017
    13 // Update Count     : 1
    14 //
    15 
    16 #ifndef _VECTORMAP_H
    17 #define _VECTORMAP_H
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:19:29 2017
     13// Update Count     : 2
     14//
     15
     16#pragma once
    1817
    1918#include <iterator>
     
    245244}
    246245
    247 #endif // _VECTORMAP_H
    248 
    249246// Local Variables: //
    250247// tab-width: 4 //
  • src/Common/utility.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri May 5 11:03:00 2017
    13 // Update Count     : 32
    14 //
    15 
    16 #ifndef _UTILITY_H
    17 #define _UTILITY_H
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:19:13 2017
     13// Update Count     : 33
     14//
     15
     16#pragma once
    1817
    1918#include <cctype>
     
    379378}
    380379
    381 #endif // _UTILITY_H
    382 
    383380// Local Variables: //
    384381// tab-width: 4 //
  • src/Concurrency/Keywords.cc

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CPP -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    1211// Last Modified By :
    1312// Last Modified On :
    14 // Update Count     : 3
     13// Update Count     : 5
    1514//
    1615
     
    549548        }
    550549};
     550
     551// Local Variables: //
     552// mode: c //
     553// tab-width: 4 //
     554// End: //
  • src/Concurrency/Keywords.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CPP -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    1211// Last Modified By :
    1312// Last Modified On :
    14 // Update Count     : 0
     13// Update Count     : 1
    1514//
    1615
    17 #ifndef KEYWORDS_H
    18 #define KEYWORDS_H
     16#pragma once
    1917
    2018#include <list>  // for list
     
    2826};
    2927
    30 #endif //KEYWORDS_H
     28// Local Variables: //
     29// tab-width: 4 //
     30// mode: c++ //
     31// compile-command: "make install" //
     32// End: //
  • src/ControlStruct/ExceptTranslate.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Wed Jun 14 16:49:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jul 12 15:07:00 2017
    13 // Update Count     : 3
     12// Last Modified On : Tus Aug  8 16:54:00 2017
     13// Update Count     : 7
    1414//
    1515
     
    2121#include "SynTree/Type.h"
    2222#include "SynTree/Attribute.h"
     23#include "SynTree/VarExprReplacer.h"
    2324
    2425namespace ControlStruct {
    25 
    26         // This (large) section could probably be moved out of the class
    27         // and be static helpers instead.
    28 
    29         // Type(Qualifiers &, false, std::list<Attribute *> &)
    30 
    31         // void (*function)();
    32         static FunctionType try_func_t(Type::Qualifiers(), false);
    33         // void (*function)(int, exception);
    34         static FunctionType catch_func_t(Type::Qualifiers(), false);
    35         // int (*function)(exception);
    36         static FunctionType match_func_t(Type::Qualifiers(), false);
    37         // bool (*function)(exception);
    38         static FunctionType handle_func_t(Type::Qualifiers(), false);
    39         // void (*function)(__attribute__((unused)) void *);
    40         static FunctionType finally_func_t(Type::Qualifiers(), false);
    41 
    42         static void init_func_types() {
    43                 static bool init_complete = false;
    44                 if (init_complete) {
    45                         return;
    46                 }
    47                 ObjectDecl index_obj(
    48                         "__handler_index",
    49                         Type::StorageClasses(),
    50                         LinkageSpec::Cforall,
    51                         /*bitfieldWidth*/ NULL,
    52                         new BasicType( emptyQualifiers, BasicType::SignedInt ),
    53                         /*init*/ NULL
    54                         );
    55                 ObjectDecl exception_obj(
    56                         "__exception_inst",
    57                         Type::StorageClasses(),
    58                         LinkageSpec::Cforall,
    59                         /*bitfieldWidth*/ NULL,
    60                         new PointerType(
    61                                 emptyQualifiers,
    62                                 new BasicType( emptyQualifiers, BasicType::SignedInt )
    63                                 ),
    64                         /*init*/ NULL
    65                         );
    66                 ObjectDecl bool_obj(
    67                         "__ret_bool",
    68                         Type::StorageClasses(),
    69                         LinkageSpec::Cforall,
    70                         /*bitfieldWidth*/ NULL,
    71                         new BasicType(emptyQualifiers, BasicType::Bool),
    72                         /*init*/ NULL
    73                         );
    74                 ObjectDecl voidptr_obj(
    75                         "__hook",
    76                         Type::StorageClasses(),
    77                         LinkageSpec::Cforall,
    78                         NULL,
    79                         new PointerType(
    80                                 emptyQualifiers,
    81                                 new VoidType(
    82                                         emptyQualifiers
    83                                         ),
    84                                 std::list<Attribute *>{new Attribute("unused")}
    85                                 ),
    86                         NULL
    87                         );
    88 
    89                 catch_func_t.get_parameters().push_back( index_obj.clone() );
    90                 catch_func_t.get_parameters().push_back( exception_obj.clone() );
    91                 match_func_t.get_returnVals().push_back( index_obj.clone() );
    92                 match_func_t.get_parameters().push_back( exception_obj.clone() );
    93                 handle_func_t.get_returnVals().push_back( bool_obj.clone() );
    94                 handle_func_t.get_parameters().push_back( exception_obj.clone() );
    95                 finally_func_t.get_parameters().push_back( voidptr_obj.clone() );
    96 
    97                 init_complete = true;
    98         }
    9926
    10027        // Buricratic Helpers (Not having to do with the paritular operation.)
     
    11542        }
    11643
    117         template<typename T>
    118         void free_all( std::list<T *> &list ) {
    119                 typename std::list<T *>::iterator it;
    120                 for ( it = list.begin() ; it != list.end() ; ++it ) {
    121                         delete *it;
    122                 }
    123                 list.clear();
    124         }
    125 
    12644        void appendDeclStmt( CompoundStmt * block, Declaration * item ) {
    12745                block->push_back(new DeclStmt(noLabels, item));
     
    13250        }
    13351
    134         // ThrowStmt Mutation Helpers
    135 
    136         Statement * create_given_throw(
    137                         const char * throwFunc, ThrowStmt * throwStmt ) {
    138                 // { int NAME = EXPR; throwFunc( &NAME ); }
    139                 CompoundStmt * result = new CompoundStmt( noLabels );
    140                 ObjectDecl * local = new ObjectDecl(
    141                         "__local_exception_copy",
     52        class ExceptionMutatorCore : public WithGuards {
     53                enum Context { NoHandler, TerHandler, ResHandler };
     54
     55                // Also need to handle goto, break & continue.
     56                // They need to be cut off in a ResHandler, until we enter another
     57                // loop, switch or the goto stays within the function.
     58
     59                Context cur_context;
     60
     61                // The current (innermost) termination handler exception declaration.
     62                ObjectDecl * handler_except_decl;
     63
     64                // The built in types used in translation.
     65                StructDecl * except_decl;
     66                StructDecl * node_decl;
     67                StructDecl * hook_decl;
     68
     69                // The many helper functions for code/syntree generation.
     70                Statement * create_given_throw(
     71                        const char * throwFunc, ThrowStmt * throwStmt );
     72                Statement * create_terminate_throw( ThrowStmt * throwStmt );
     73                Statement * create_terminate_rethrow( ThrowStmt * throwStmt );
     74                Statement * create_resume_throw( ThrowStmt * throwStmt );
     75                Statement * create_resume_rethrow( ThrowStmt * throwStmt );
     76                CompoundStmt * take_try_block( TryStmt * tryStmt );
     77                FunctionDecl * create_try_wrapper( CompoundStmt * body );
     78                FunctionDecl * create_terminate_catch( CatchList &handlers );
     79                CompoundStmt * create_single_matcher(
     80                        DeclarationWithType * except_obj, CatchStmt * modded_handler );
     81                FunctionDecl * create_terminate_match( CatchList &handlers );
     82                CompoundStmt * create_terminate_caller( FunctionDecl * try_wrapper,
     83                        FunctionDecl * terminate_catch, FunctionDecl * terminate_match );
     84                FunctionDecl * create_resume_handler( CatchList &handlers );
     85                CompoundStmt * create_resume_wrapper(
     86                        Statement * wraps, FunctionDecl * resume_handler );
     87                FunctionDecl * create_finally_wrapper( TryStmt * tryStmt );
     88                ObjectDecl * create_finally_hook( FunctionDecl * finally_wrapper );
     89
     90                // Types used in translation, make sure to use clone.
     91                // void (*function)();
     92                FunctionType try_func_t;
     93                // void (*function)(int, exception);
     94                FunctionType catch_func_t;
     95                // int (*function)(exception);
     96                FunctionType match_func_t;
     97                // bool (*function)(exception);
     98                FunctionType handle_func_t;
     99                // void (*function)(__attribute__((unused)) void *);
     100                FunctionType finally_func_t;
     101
     102                StructInstType * create_except_type() {
     103                        assert( except_decl );
     104                        return new StructInstType( noQualifiers, except_decl );
     105                }
     106                void init_func_types();
     107
     108        public:
     109                ExceptionMutatorCore() :
     110                        cur_context( NoHandler ),
     111                        handler_except_decl( nullptr ),
     112                        except_decl( nullptr ), node_decl( nullptr ), hook_decl( nullptr ),
     113                        try_func_t( noQualifiers, false ),
     114                        catch_func_t( noQualifiers, false ),
     115                        match_func_t( noQualifiers, false ),
     116                        handle_func_t( noQualifiers, false ),
     117                        finally_func_t( noQualifiers, false )
     118                {}
     119
     120                void premutate( CatchStmt *catchStmt );
     121                void premutate( StructDecl *structDecl );
     122                Statement * postmutate( ThrowStmt *throwStmt );
     123                Statement * postmutate( TryStmt *tryStmt );
     124        };
     125
     126        void ExceptionMutatorCore::init_func_types() {
     127                assert( except_decl );
     128
     129                ObjectDecl index_obj(
     130                        "__handler_index",
     131                        Type::StorageClasses(),
     132                        LinkageSpec::Cforall,
     133                        /*bitfieldWidth*/ NULL,
     134                        new BasicType( noQualifiers, BasicType::SignedInt ),
     135                        /*init*/ NULL
     136                        );
     137                ObjectDecl exception_obj(
     138                        "__exception_inst",
     139                        Type::StorageClasses(),
     140                        LinkageSpec::Cforall,
     141                        /*bitfieldWidth*/ NULL,
     142                        new PointerType(
     143                                noQualifiers,
     144                                new StructInstType( noQualifiers, except_decl )
     145                                ),
     146                        /*init*/ NULL
     147                        );
     148                ObjectDecl bool_obj(
     149                        "__ret_bool",
     150                        Type::StorageClasses(),
     151                        LinkageSpec::Cforall,
     152                        /*bitfieldWidth*/ NULL,
     153                        new BasicType( noQualifiers, BasicType::Bool ),
     154                        /*init*/ NULL
     155                        );
     156                ObjectDecl voidptr_obj(
     157                        "__hook",
    142158                        Type::StorageClasses(),
    143159                        LinkageSpec::Cforall,
    144160                        NULL,
    145                         new BasicType( emptyQualifiers, BasicType::SignedInt ),
    146                         new SingleInit( throwStmt->get_expr() )
    147                         );
    148                 appendDeclStmt( result, local );
     161                        new PointerType(
     162                                noQualifiers,
     163                                new VoidType(
     164                                        noQualifiers
     165                                        ),
     166                                std::list<Attribute *>{ new Attribute( "unused" ) }
     167                                ),
     168                        NULL
     169                        );
     170
     171                catch_func_t.get_parameters().push_back( index_obj.clone() );
     172                catch_func_t.get_parameters().push_back( exception_obj.clone() );
     173                match_func_t.get_returnVals().push_back( index_obj.clone() );
     174                match_func_t.get_parameters().push_back( exception_obj.clone() );
     175                handle_func_t.get_returnVals().push_back( bool_obj.clone() );
     176                handle_func_t.get_parameters().push_back( exception_obj.clone() );
     177                finally_func_t.get_parameters().push_back( voidptr_obj.clone() );
     178        }
     179
     180        // ThrowStmt Mutation Helpers
     181
     182        Statement * ExceptionMutatorCore::create_given_throw(
     183                        const char * throwFunc, ThrowStmt * throwStmt ) {
     184                // `throwFunc`( `throwStmt->get_name` );
    149185                UntypedExpr * call = new UntypedExpr( new NameExpr( throwFunc ) );
    150                 call->get_args().push_back( new AddressExpr( nameOf( local ) ) );
    151                 result->push_back( new ExprStmt( throwStmt->get_labels(), call ) );
     186                call->get_args().push_back( throwStmt->get_expr() );
    152187                throwStmt->set_expr( nullptr );
    153188                delete throwStmt;
    154                 return result;
    155         }
    156 
    157         Statement * create_terminate_throw( ThrowStmt *throwStmt ) {
    158                 // { int NAME = EXPR; __throw_terminate( &NAME ); }
     189                return new ExprStmt( noLabels, call );
     190        }
     191
     192        Statement * ExceptionMutatorCore::create_terminate_throw(
     193                        ThrowStmt *throwStmt ) {
     194                // __throw_terminate( `throwStmt->get_name()` ); }
    159195                return create_given_throw( "__cfaehm__throw_terminate", throwStmt );
    160196        }
    161         Statement * create_terminate_rethrow( ThrowStmt *throwStmt ) {
    162                 // __rethrow_terminate();
     197
     198        Statement * ExceptionMutatorCore::create_terminate_rethrow(
     199                        ThrowStmt *throwStmt ) {
     200                // { `handler_except_decl` = NULL; __rethrow_terminate(); }
    163201                assert( nullptr == throwStmt->get_expr() );
    164                 Statement * result = new ExprStmt(
    165                         throwStmt->get_labels(),
     202                assert( handler_except_decl );
     203
     204                CompoundStmt * result = new CompoundStmt( throwStmt->get_labels() );
     205                result->push_back( new ExprStmt( noLabels, UntypedExpr::createAssign(
     206                        nameOf( handler_except_decl ),
     207                        new ConstantExpr( Constant::null(
     208                                new PointerType(
     209                                        noQualifiers,
     210                                        handler_except_decl->get_type()->clone()
     211                                        )
     212                                ) )
     213                        ) ) );
     214                result->push_back( new ExprStmt(
     215                        noLabels,
    166216                        new UntypedExpr( new NameExpr( "__cfaehm__rethrow_terminate" ) )
    167                         );
     217                        ) );
    168218                delete throwStmt;
    169219                return result;
    170220        }
    171         Statement * create_resume_throw( ThrowStmt *throwStmt ) {
    172                 // __throw_resume( EXPR );
     221
     222        Statement * ExceptionMutatorCore::create_resume_throw(
     223                        ThrowStmt *throwStmt ) {
     224                // __throw_resume( `throwStmt->get_name` );
    173225                return create_given_throw( "__cfaehm__throw_resume", throwStmt );
    174226        }
    175         Statement * create_resume_rethrow( ThrowStmt *throwStmt ) {
     227
     228        Statement * ExceptionMutatorCore::create_resume_rethrow(
     229                        ThrowStmt *throwStmt ) {
    176230                // return false;
    177231                Statement * result = new ReturnStmt(
     
    185239        // TryStmt Mutation Helpers
    186240
    187         CompoundStmt * take_try_block( TryStmt *tryStmt ) {
     241        CompoundStmt * ExceptionMutatorCore::take_try_block( TryStmt *tryStmt ) {
    188242                CompoundStmt * block = tryStmt->get_block();
    189243                tryStmt->set_block( nullptr );
    190244                return block;
    191245        }
    192         FunctionDecl * create_try_wrapper( CompoundStmt *body ) {
     246
     247        FunctionDecl * ExceptionMutatorCore::create_try_wrapper(
     248                        CompoundStmt *body ) {
    193249
    194250                return new FunctionDecl( "try", Type::StorageClasses(),
     
    196252        }
    197253
    198         FunctionDecl * create_terminate_catch( CatchList &handlers ) {
     254        FunctionDecl * ExceptionMutatorCore::create_terminate_catch(
     255                        CatchList &handlers ) {
    199256                std::list<CaseStmt *> handler_wrappers;
    200257
    201258                FunctionType *func_type = catch_func_t.clone();
    202259                DeclarationWithType * index_obj = func_type->get_parameters().front();
    203         //      DeclarationWithType * except_obj = func_type->get_parameters().back();
     260                DeclarationWithType * except_obj = func_type->get_parameters().back();
    204261
    205262                // Index 1..{number of handlers}
     
    210267                        CatchStmt * handler = *it;
    211268
    212                         // INTEGERconstant Version
    213269                        // case `index`:
    214270                        // {
    215                         //     `handler.body`
     271                        //     `handler.decl` = { (virtual `decl.type`)`except` };
     272                        //     `handler.body`;
    216273                        // }
    217274                        // return;
    218                         std::list<Statement *> caseBody;
    219                         caseBody.push_back( handler->get_body() );
     275                        CompoundStmt * block = new CompoundStmt( noLabels );
     276
     277                        // Just copy the exception value. (Post Validation)
     278                        ObjectDecl * handler_decl =
     279                                static_cast<ObjectDecl *>( handler->get_decl() );
     280                        ObjectDecl * local_except = handler_decl->clone();
     281                        local_except->set_init(
     282                                new ListInit({ new SingleInit(
     283                                        new VirtualCastExpr( nameOf( except_obj ),
     284                                                local_except->get_type()
     285                                                )
     286                                        ) })
     287                                );
     288                        block->push_back( new DeclStmt( noLabels, local_except ) );
     289
     290                        // Add the cleanup attribute.
     291                        local_except->get_attributes().push_back( new Attribute(
     292                                "cleanup",
     293                                { new NameExpr( "__cfaehm__cleanup_terminate" ) }
     294                                ) );
     295
     296                        // Update variables in the body to point to this local copy.
     297                        {
     298                                VarExprReplacer::DeclMap mapping;
     299                                mapping[ handler_decl ] = local_except;
     300                                VarExprReplacer mapper( mapping );
     301                                handler->get_body()->accept( mapper );
     302                        }
     303
     304                        block->push_back( handler->get_body() );
    220305                        handler->set_body( nullptr );
    221                         caseBody.push_back( new ReturnStmt( noLabels, nullptr ) );
    222 
     306
     307                        std::list<Statement *> caseBody
     308                                        { block, new ReturnStmt( noLabels, nullptr ) };
    223309                        handler_wrappers.push_back( new CaseStmt(
    224310                                noLabels,
     
    249335        // Create a single check from a moddified handler.
    250336        // except_obj is referenced, modded_handler will be freed.
    251         CompoundStmt *create_single_matcher(
     337        CompoundStmt * ExceptionMutatorCore::create_single_matcher(
    252338                        DeclarationWithType * except_obj, CatchStmt * modded_handler ) {
     339                // {
     340                //     `modded_handler.decl`
     341                //     if ( `decl.name = (virtual `decl.type`)`except`
     342                //             [&& `modded_handler.cond`] ) {
     343                //         `modded_handler.body`
     344                //     }
     345                // }
     346
    253347                CompoundStmt * block = new CompoundStmt( noLabels );
    254348
    255                 // INTEGERconstant Version
    256                 assert( nullptr == modded_handler->get_decl() );
    257                 ConstantExpr * number =
    258                         dynamic_cast<ConstantExpr*>( modded_handler->get_cond() );
    259                 assert( number );
    260                 modded_handler->set_cond( nullptr );
    261 
    262                 Expression * cond;
    263                 {
    264                         std::list<Expression *> args;
    265                         args.push_back( number );
    266 
    267                         std::list<Expression *> rhs_args;
    268                         rhs_args.push_back( nameOf( except_obj ) );
    269                         Expression * rhs = new UntypedExpr(
    270                                 new NameExpr( "*?" ), rhs_args );
    271                         args.push_back( rhs );
    272 
    273                         cond = new UntypedExpr( new NameExpr( "?==?" /*???*/), args );
    274                 }
    275 
     349                // Local Declaration
     350                ObjectDecl * local_except =
     351                        dynamic_cast<ObjectDecl *>( modded_handler->get_decl() );
     352                assert( local_except );
     353                block->push_back( new DeclStmt( noLabels, local_except ) );
     354
     355                // Check for type match.
     356                Expression * cond = UntypedExpr::createAssign( nameOf( local_except ),
     357                        new VirtualCastExpr( nameOf( except_obj ),
     358                                local_except->get_type()->clone() ) );
     359
     360                // Add the check on the conditional if it is provided.
    276361                if ( modded_handler->get_cond() ) {
    277362                        cond = new LogicalExpr( cond, modded_handler->get_cond() );
    278363                }
     364                // Construct the match condition.
    279365                block->push_back( new IfStmt( noLabels,
    280366                        cond, modded_handler->get_body(), nullptr ) );
     
    287373        }
    288374
    289         FunctionDecl * create_terminate_match( CatchList &handlers ) {
     375        FunctionDecl * ExceptionMutatorCore::create_terminate_match(
     376                        CatchList &handlers ) {
     377                // int match(exception * except) {
     378                //     HANDLER WRAPPERS { return `index`; }
     379                // }
     380
    290381                CompoundStmt * body = new CompoundStmt( noLabels );
    291382
     
    319410        }
    320411
    321         CompoundStmt * create_terminate_caller(
     412        CompoundStmt * ExceptionMutatorCore::create_terminate_caller(
    322413                        FunctionDecl * try_wrapper,
    323414                        FunctionDecl * terminate_catch,
    324                         FunctionDecl * terminate_match) {
     415                        FunctionDecl * terminate_match ) {
     416                // { __cfaehm__try_terminate(`try`, `catch`, `match`); }
    325417
    326418                UntypedExpr * caller = new UntypedExpr( new NameExpr(
     
    336428        }
    337429
    338         FunctionDecl * create_resume_handler( CatchList &handlers ) {
     430        FunctionDecl * ExceptionMutatorCore::create_resume_handler(
     431                        CatchList &handlers ) {
     432                // bool handle(exception * except) {
     433                //     HANDLER WRAPPERS { `hander->body`; return true; }
     434                // }
    339435                CompoundStmt * body = new CompoundStmt( noLabels );
    340436
     
    369465        }
    370466
    371         CompoundStmt * create_resume_wrapper(
    372                         StructDecl * node_decl,
     467        CompoundStmt * ExceptionMutatorCore::create_resume_wrapper(
    373468                        Statement * wraps,
    374469                        FunctionDecl * resume_handler ) {
     
    414509        }
    415510
    416         FunctionDecl * create_finally_wrapper( TryStmt * tryStmt ) {
     511        FunctionDecl * ExceptionMutatorCore::create_finally_wrapper(
     512                        TryStmt * tryStmt ) {
     513                // void finally() { <finally code> }
    417514                FinallyStmt * finally = tryStmt->get_finally();
    418515                CompoundStmt * body = finally->get_block();
     
    425522        }
    426523
    427         ObjectDecl * create_finally_hook(
    428                         StructDecl * hook_decl, FunctionDecl * finally_wrapper ) {
     524        ObjectDecl * ExceptionMutatorCore::create_finally_hook(
     525                        FunctionDecl * finally_wrapper ) {
    429526                // struct __cfaehm__cleanup_hook __finally_hook
    430527                //      __attribute__((cleanup( finally_wrapper )));
     
    444541                        nullptr,
    445542                        new StructInstType(
    446                                 emptyQualifiers,
     543                                noQualifiers,
    447544                                hook_decl
    448545                                ),
     
    452549        }
    453550
    454 
    455         class ExceptionMutatorCore : public WithGuards {
    456                 enum Context { NoHandler, TerHandler, ResHandler };
    457 
    458                 // Also need to handle goto, break & continue.
    459                 // They need to be cut off in a ResHandler, until we enter another
    460                 // loop, switch or the goto stays within the function.
    461 
    462                 Context cur_context;
    463 
    464                 // We might not need this, but a unique base for each try block's
    465                 // generated functions might be nice.
    466                 //std::string curFunctionName;
    467                 //unsigned int try_count = 0;
    468 
    469                 StructDecl *node_decl;
    470                 StructDecl *hook_decl;
    471 
    472         public:
    473                 ExceptionMutatorCore() :
    474                         cur_context(NoHandler),
    475                         node_decl(nullptr), hook_decl(nullptr)
    476                 {}
    477 
    478                 void premutate( CatchStmt *catchStmt );
    479                 void premutate( StructDecl *structDecl );
    480                 Statement * postmutate( ThrowStmt *throwStmt );
    481                 Statement * postmutate( TryStmt *tryStmt );
    482         };
     551        // Visiting/Mutating Functions
     552        void ExceptionMutatorCore::premutate( CatchStmt *catchStmt ) {
     553                // Validate the Statement's form.
     554                ObjectDecl * decl =
     555                        dynamic_cast<ObjectDecl *>( catchStmt->get_decl() );
     556                if ( decl && true /* check decl->get_type() */ ) {
     557                        // Pass.
     558                } else if ( CatchStmt::Terminate == catchStmt->get_kind() ) {
     559                        throw SemanticError("catch must have exception type");
     560                } else {
     561                        throw SemanticError("catchResume must have exception type");
     562                }
     563
     564                // Track the handler context.
     565                GuardValue( cur_context );
     566                if ( CatchStmt::Terminate == catchStmt->get_kind() ) {
     567                        cur_context = TerHandler;
     568
     569                        GuardValue( handler_except_decl );
     570                        handler_except_decl = decl;
     571                } else {
     572                        cur_context = ResHandler;
     573                }
     574        }
     575
     576        void ExceptionMutatorCore::premutate( StructDecl *structDecl ) {
     577                if ( !structDecl->has_body() ) {
     578                        // Skip children?
     579                        return;
     580                } else if ( structDecl->get_name() == "__cfaehm__base_exception_t" ) {
     581                        assert( nullptr == except_decl );
     582                        except_decl = structDecl;
     583                        init_func_types();
     584                } else if ( structDecl->get_name() == "__cfaehm__try_resume_node" ) {
     585                        assert( nullptr == node_decl );
     586                        node_decl = structDecl;
     587                } else if ( structDecl->get_name() == "__cfaehm__cleanup_hook" ) {
     588                        assert( nullptr == hook_decl );
     589                        hook_decl = structDecl;
     590                }
     591                // Later we might get the exception type as well.
     592        }
    483593
    484594        Statement * ExceptionMutatorCore::postmutate( ThrowStmt *throwStmt ) {
     595                assert( except_decl );
     596
    485597                // Ignoring throwStmt->get_target() for now.
    486598                if ( ThrowStmt::Terminate == throwStmt->get_kind() ) {
     
    510622
    511623        Statement * ExceptionMutatorCore::postmutate( TryStmt *tryStmt ) {
     624                assert( except_decl );
    512625                assert( node_decl );
    513626                assert( hook_decl );
     
    524637                        appendDeclStmt( block, finally_block );
    525638                        // Create and add the finally cleanup hook.
    526                         appendDeclStmt( block,
    527                                 create_finally_hook( hook_decl, finally_block ) );
     639                        appendDeclStmt( block, create_finally_hook( finally_block ) );
    528640                }
    529641
     
    539651                        appendDeclStmt( block, resume_handler );
    540652                        // Prepare hooks
    541                         inner = create_resume_wrapper( node_decl, inner, resume_handler );
     653                        inner = create_resume_wrapper( inner, resume_handler );
    542654                }
    543655
     
    560672                block->push_back( inner );
    561673
    562                 //free_all( termination_handlers );
    563                 //free_all( resumption_handlers );
    564 
    565674                return block;
    566675        }
    567676
    568         void ExceptionMutatorCore::premutate( CatchStmt *catchStmt ) {
    569                 GuardValue( cur_context );
    570                 if ( CatchStmt::Terminate == catchStmt->get_kind() ) {
    571                         cur_context = TerHandler;
    572                 } else {
    573                         cur_context = ResHandler;
    574                 }
    575         }
    576 
    577         void ExceptionMutatorCore::premutate( StructDecl *structDecl ) {
    578                 if ( !structDecl->has_body() ) {
    579                         // Skip children?
    580                         return;
    581                 } else if ( structDecl->get_name() == "__cfaehm__try_resume_node" ) {
    582                         assert( nullptr == node_decl );
    583                         node_decl = structDecl;
    584                 } else if ( structDecl->get_name() == "__cfaehm__cleanup_hook" ) {
    585                         assert( nullptr == hook_decl );
    586                         hook_decl = structDecl;
    587                 }
    588                 // Later we might get the exception type as well.
    589         }
    590 
    591677        void translateEHM( std::list< Declaration *> & translationUnit ) {
    592                 init_func_types();
    593 
    594678                PassVisitor<ExceptionMutatorCore> translator;
    595679                mutateAll( translationUnit, translator );
  • src/ControlStruct/ExceptTranslate.h

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Tus Jun 06 10:13:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jun 30 10:20:00 2017
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:19:23 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef EXCEPT_TRANSLATE_H
    17 #define EXCEPT_TRANSLATE_H
     16#pragma once
    1817
    1918#include <list>
     
    2221namespace ControlStruct {
    2322        void translateEHM( std::list< Declaration *> & translationUnit );
    24         /* Converts exception handling structures into their underlying C code.
    25          * Translation does use the exception handling header, make sure it is
    26          * visible wherever translation occurs.
    27          */
     23        // Converts exception handling structures into their underlying C code.  Translation does use the exception
     24        // handling header, make sure it is visible wherever translation occurs.
    2825}
    2926
    30 #endif // EXCEPT_TRANSLATE_H
     27// Local Variables: //
     28// tab-width: 4 //
     29// mode: c++ //
     30// compile-command: "make install" //
     31// End: //
  • src/ControlStruct/ForExprMutator.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan 25 21:22:13 2016
    13 // Update Count     : 3
     12// Last Modified On : Sat Jul 22 09:17:08 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef FOR_MUTATOR_H
    17 #define FOR_MUTATOR_H
     16#pragma once
    1817
    1918#include "SynTree/Mutator.h"
     
    2726} // namespace ControlStruct
    2827
    29 #endif // CHOOSE_MUTATOR_H
    30 
    3128// Local Variables: //
    3229// tab-width: 4 //
  • src/ControlStruct/LabelFixer.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:36:16 2016
    13 // Update Count     : 33
     12// Last Modified On : Sat Jul 22 09:17:24 2017
     13// Update Count     : 34
    1414//
    1515
    16 #ifndef LABEL_FIXER_H
    17 #define LABEL_FIXER_H
     16#pragma once
    1817
    1918#include "Common/utility.h"
     
    8382} // namespace ControlStruct
    8483
    85 #endif // LABEL_FIXER_H
    86 
    8784// Local Variables: //
    8885// tab-width: 4 //
  • src/ControlStruct/LabelGenerator.h

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jun 03 14:16:26 2015
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:20:14 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef LABEL_GENERATOR_H
    17 #define LABEL_GENERATOR_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
     
    3534} // namespace ControlStruct
    3635
    37 #endif // LABEL_GENERATOR_H
    38 
    3936// Local Variables: //
    4037// tab-width: 4 //
  • src/ControlStruct/MLEMutator.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:37:01 2016
    13 // Update Count     : 34
     12// Last Modified On : Sat Jul 22 09:19:59 2017
     13// Update Count     : 35
    1414//
    1515
    16 #ifndef MLE_MUTATOR_H
    17 #define MLE_MUTATOR_H
     16#pragma once
    1817
    1918#include <map>
     
    8988} // namespace ControlStruct
    9089
    91 #endif // MLE_MUTATOR_H
    92 
    9390// Local Variables: //
    9491// tab-width: 4 //
  • src/ControlStruct/Mutate.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 15:31:20 2015
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:17:59 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef CTRLS_MUTATE_H
    17 #define CTRLS_MUTATE_H
     16#pragma once
    1817
    1918#include <list>
     
    2726} // namespace ControlStruct
    2827
    29 #endif // CTRLS_MUTATE_H
    30 
    3128// Local Variables: //
    3229// tab-width: 4 //
  • src/GenPoly/Box.cc

    r3d4b23fa r0720e049  
    2727#include "Box.h"
    2828#include "DeclMutator.h"
     29#include "Lvalue.h"
     30#include "FindFunction.h"
    2931#include "PolyMutator.h"
    30 #include "FindFunction.h"
    3132#include "ScopedSet.h"
    3233#include "ScrubTyVars.h"
     
    202203                };
    203204
    204                 /// Replaces initialization of polymorphic values with alloca, declaration of dtype/ftype with appropriate void expression, and sizeof expressions of polymorphic types with the proper variable
     205                /// Replaces initialization of polymorphic values with alloca, declaration of dtype/ftype with appropriate void expression, sizeof expressions of polymorphic types with the proper variable, and strips fields from generic struct declarations.
    205206                class Pass3 final : public PolyMutator {
    206207                  public:
     
    210211                        using PolyMutator::mutate;
    211212                        virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
     213                        virtual Declaration *mutate( StructDecl *structDecl ) override;
     214                        virtual Declaration *mutate( UnionDecl *unionDecl ) override;
    212215                        virtual ObjectDecl *mutate( ObjectDecl *objectDecl ) override;
    213216                        virtual TypedefDecl *mutate( TypedefDecl *objectDecl ) override;
     
    753756
    754757                void Pass1::boxParam( Type *param, Expression *&arg, const TyVarMap &exprTyVars ) {
    755                         assert( arg->has_result() );
     758                        assertf( arg->has_result(), "arg does not have result: %s", toString( arg ).c_str() );
    756759                        if ( isPolyType( param, exprTyVars ) ) {
    757                                 if ( isPolyType( arg->get_result() ) ) {
     760                                Type * newType = arg->get_result()->clone();
     761                                if ( env ) env->apply( newType );
     762                                std::auto_ptr<Type> manager( newType );
     763                                if ( isPolyType( newType ) ) {
    758764                                        // if the argument's type is polymorphic, we don't need to box again!
    759765                                        return;
    760766                                } else if ( arg->get_result()->get_lvalue() ) {
    761                                         // VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue)
    762                                         // xxx - need to test that this code is still reachable
    763                                         if ( CommaExpr *commaArg = dynamic_cast< CommaExpr* >( arg ) ) {
    764                                                 commaArg->set_arg2( new AddressExpr( commaArg->get_arg2() ) );
    765                                         } else {
    766                                                 arg = new AddressExpr( arg );
    767                                         }
     767                                        // argument expression may be CFA lvalue, but not C lvalue -- apply generalizedLvalue transformations.
     768                                        arg =  generalizedLvalue( new AddressExpr( arg ) );
    768769                                        if ( ! ResolvExpr::typesCompatible( param, arg->get_result(), SymTab::Indexer() ) ) {
    769770                                                // silence warnings by casting boxed parameters when the actual type does not match up with the formal type.
     
    17481749
    17491750                Expression *PolyGenericCalculator::mutate( SizeofExpr *sizeofExpr ) {
    1750                         Type *ty = sizeofExpr->get_type();
     1751                        Type *ty = sizeofExpr->get_isType() ? sizeofExpr->get_type() : sizeofExpr->get_expr()->get_result();
    17511752                        if ( findGeneric( ty ) ) {
    17521753                                Expression *ret = new NameExpr( sizeofName( mangleType( ty ) ) );
     
    17581759
    17591760                Expression *PolyGenericCalculator::mutate( AlignofExpr *alignofExpr ) {
    1760                         Type *ty = alignofExpr->get_type();
     1761                        Type *ty = alignofExpr->get_isType() ? alignofExpr->get_type() : alignofExpr->get_expr()->get_result();
    17611762                        if ( findGeneric( ty ) ) {
    17621763                                Expression *ret = new NameExpr( alignofName( mangleType( ty ) ) );
     
    18681869                }
    18691870
     1871                /// Strips the members from a generic aggregate
     1872                void stripGenericMembers(AggregateDecl* decl) {
     1873                        if ( ! decl->get_parameters().empty() ) decl->get_members().clear();
     1874                }
     1875
     1876                Declaration *Pass3::mutate( StructDecl *structDecl ) {
     1877                        stripGenericMembers( structDecl );
     1878                        return structDecl;
     1879                }
     1880
     1881                Declaration *Pass3::mutate( UnionDecl *unionDecl ) {
     1882                        stripGenericMembers( unionDecl );
     1883                        return unionDecl;
     1884                }
     1885
    18701886                TypeDecl * Pass3::mutate( TypeDecl *typeDecl ) {
    18711887//   Initializer *init = 0;
  • src/GenPoly/Box.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 17:24:01 2015
    13 // Update Count     : 5
     12// Last Modified On : Sat Jul 22 09:23:52 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef _BOX_H
    17 #define _BOX_H
     16#pragma once
    1817
    1918#include <list>
     
    2524} // namespace GenPoly
    2625
    27 #endif // _BOX_H
    28 
    2926// Local Variables: //
    3027// tab-width: 4 //
  • src/GenPoly/CopyParams.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:34:25 2015
    13 // Update Count     : 1
     12// Last Modified On : Sat Jul 22 09:23:09 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef _COPYPARAMS_H
    17 #define _COPYPARAMS_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
     
    2423} // namespace GenPoly
    2524
    26 #endif // _COPYPARAMS_H
    27 
    2825// Local Variables: //
    2926// tab-width: 4 //
  • src/GenPoly/DeclMutator.h

    r3d4b23fa r0720e049  
    1010// Created On       : Fri Nov 27 14:44:00 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:39:01 2016
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:21:12 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef _DECLMUTATOR_H
    17 #define _DECLMUTATOR_H
     16#pragma once
    1817
    1918#include <list>
     
    2726        /// Mutates a list of declarations, providing a means of adding new declarations into the list
    2827        class DeclMutator : public Mutator {
    29         public:
     28          public:
    3029                typedef Mutator Parent;
    3130
     
    5049                /// Called on exit from a scope; overriders should call this as a super-class call
    5150                virtual void doEndScope();
    52         protected:
     51          protected:
    5352                /// Mutate a statement that forms its own scope
    5453                Statement* mutateStatement( Statement *stmt );
     
    5958                /// Add a declaration to the list to be added after the current position
    6059                void addDeclarationAfter( Declaration* decl );
    61         private:
     60          private:
    6261                /// A stack of declarations to add before the current declaration or statement
    6362                std::vector< std::list< Declaration* > > declsToAdd;
     
    6766} // namespace
    6867
    69 #endif // _DECLMUTATOR_H
    70 
    7168// Local Variables: //
    7269// tab-width: 4 //
  • src/GenPoly/ErasableScopedMap.h

    r3d4b23fa r0720e049  
    99// Author           : Aaron B. Moss
    1010// Created On       : Wed Dec 2 11:37:00 2015
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Wed Dec 2 11:37:00 2015
    13 // Update Count     : 1
    14 //
    15 
    16 #ifndef _ERASABLESCOPEDMAP_H
    17 #define _ERASABLESCOPEDMAP_H
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:23:24 2017
     13// Update Count     : 2
     14//
     15
     16#pragma once
    1817
    1918#include <cassert>
     
    278277} // namespace GenPoly
    279278
    280 #endif // _ERASABLESCOPEDMAP_H
    281 
    282279// Local Variables: //
    283280// tab-width: 4 //
  • src/GenPoly/FindFunction.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:36:35 2015
    13 // Update Count     : 1
     12// Last Modified On : Sat Jul 22 09:23:36 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef FINDFUNCTION_H
    17 #define FINDFUNCTION_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
     
    2928} // namespace GenPoly
    3029
    31 #endif // FINDFUNCTION_H
    32 
    3330// Local Variables: //
    3431// tab-width: 4 //
  • src/GenPoly/GenPoly.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Nov 24 15:24:38 2015
    13 // Update Count     : 6
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:22:57 2017
     13// Update Count     : 7
    1414//
    1515
    16 #ifndef GENPOLY_H
    17 #define GENPOLY_H
     16#pragma once
    1817
    1918#include <string>
     
    111110} // namespace GenPoly
    112111
    113 #endif // GENPOLY_H
    114 
    115112// Local Variables: //
    116113// tab-width: 4 //
  • src/GenPoly/InstantiateGeneric.h

    r3d4b23fa r0720e049  
    99// Author           : Aaron B. Moss
    1010// Created On       : Thu Aug 04 18:33:00 2016
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Thu Aug 04 18:33:00 2016
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:22:42 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef _INSTANTIATEGENERIC_H
    17 #define _INSTANTIATEGENERIC_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
     
    2625} // namespace GenPoly
    2726
    28 #endif // _INSTANTIATEGENERIC_H
    29 
    3027// Local Variables: //
    3128// tab-width: 4 //
  • src/GenPoly/Lvalue.cc

    r3d4b23fa r0720e049  
    2727#include "SynTree/Mutator.h"
    2828#include "SymTab/Indexer.h"
     29
    2930#include "ResolvExpr/Resolver.h"
     31#include "ResolvExpr/TypeEnvironment.h"
    3032#include "ResolvExpr/typeops.h"
     33#include "ResolvExpr/Unify.h"
    3134
    3235#include "Common/UniqueName.h"
     
    6063                        typedef Mutator Parent;
    6164
     65                        virtual Expression * mutate( MemberExpr * memExpr );
    6266                        virtual Expression * mutate( AddressExpr * addressExpr );
     67
     68                        template<typename Func>
     69                        Expression * applyTransformation( Expression * expr, Expression * arg, Func mkExpr );
    6370                };
    6471        } // namespace
     
    7178                acceptAll( translationUnit, p2 );
    7279                mutateAll( translationUnit, genLval );
     80        }
     81
     82        Expression * generalizedLvalue( Expression * expr ) {
     83                GeneralizedLvalue genLval;
     84                return expr->acceptMutator( genLval );
    7385        }
    7486
     
    163175                }
    164176
    165                 Expression * GeneralizedLvalue::mutate( AddressExpr * addrExpr ) {
    166                         addrExpr = safe_dynamic_cast< AddressExpr * >( Parent::mutate( addrExpr ) );
    167                         if ( CommaExpr * commaExpr = dynamic_cast< CommaExpr * >( addrExpr->get_arg() ) ) {
     177                template<typename Func>
     178                Expression * GeneralizedLvalue::applyTransformation( Expression * expr, Expression * arg, Func mkExpr ) {
     179                        if ( CommaExpr * commaExpr = dynamic_cast< CommaExpr * >( arg ) ) {
    168180                                Expression * arg1 = commaExpr->get_arg1()->clone();
    169181                                Expression * arg2 = commaExpr->get_arg2()->clone();
    170                                 delete addrExpr;
    171                                 return new CommaExpr( arg1, new AddressExpr( arg2 ) );
    172                         } else if ( ConditionalExpr * condExpr = dynamic_cast< ConditionalExpr * >( addrExpr->get_arg() ) ) {
     182                                Expression * ret = new CommaExpr( arg1, mkExpr( arg2 ) );
     183                                ret->set_env( expr->get_env() );
     184                                expr->set_env( nullptr );
     185                                delete expr;
     186                                return ret->acceptMutator( *this );
     187                        } else if ( ConditionalExpr * condExpr = dynamic_cast< ConditionalExpr * >( arg ) ) {
    173188                                Expression * arg1 = condExpr->get_arg1()->clone();
    174189                                Expression * arg2 = condExpr->get_arg2()->clone();
    175190                                Expression * arg3 = condExpr->get_arg3()->clone();
    176                                 delete addrExpr;
    177                                 return new ConditionalExpr( arg1, new AddressExpr( arg2 ), new AddressExpr( arg3 ) );
     191                                ConditionalExpr * ret = new ConditionalExpr( arg1, mkExpr( arg2 ), mkExpr( arg3 ) );
     192                                ret->set_env( expr->get_env() );
     193                                expr->set_env( nullptr );
     194                                delete expr;
     195
     196                                // conditional expr type may not be either of the argument types, need to unify
     197                                using namespace ResolvExpr;
     198                                Type* commonType = nullptr;
     199                                TypeEnvironment newEnv;
     200                                AssertionSet needAssertions, haveAssertions;
     201                                OpenVarSet openVars;
     202                                unify( ret->get_arg2()->get_result(), ret->get_arg3()->get_result(), newEnv, needAssertions, haveAssertions, openVars, SymTab::Indexer(), commonType );
     203                                ret->set_result( commonType ? commonType : ret->get_arg2()->get_result()->clone() );
     204                                return ret->acceptMutator( *this );
    178205                        }
    179                         return addrExpr;
     206                        return expr;
     207                }
     208
     209                Expression * GeneralizedLvalue::mutate( MemberExpr * memExpr ) {
     210                        Parent::mutate( memExpr );
     211                        return applyTransformation( memExpr, memExpr->get_aggregate(), [=]( Expression * aggr ) { return new MemberExpr( memExpr->get_member(), aggr ); } );
     212                }
     213
     214                Expression * GeneralizedLvalue::mutate( AddressExpr * addrExpr ) {
     215                        addrExpr = safe_dynamic_cast< AddressExpr * >( Parent::mutate( addrExpr ) );
     216                        return applyTransformation( addrExpr, addrExpr->get_arg(), []( Expression * arg ) { return new AddressExpr( arg ); } );
    180217                }
    181218        } // namespace
  • src/GenPoly/Lvalue.h

    r3d4b23fa r0720e049  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Lvalue.h -- 
     7// Lvalue.h --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:42:09 2015
    13 // Update Count     : 1
     12// Last Modified On : Sat Jul 22 09:21:59 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef _LVALUE_H
    17 #define _LVALUE_H
     16#pragma once
    1817
    1918#include <list>
     
    2423        /// replaces return type of `lvalue T` with `T*`, along with appropriate address-of and dereference operators
    2524        void convertLvalue( std::list< Declaration* >& translationUnit );
     25
     26        /// applies transformations that allow GCC to accept more complicated lvalue expressions, e.g. &(a, b)
     27        Expression * generalizedLvalue( Expression * expr );
    2628} // namespace GenPoly
    27 
    28 #endif // _LVALUE_H
    2929
    3030// Local Variables: //
  • src/GenPoly/PolyMutator.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:39:41 2016
    13 // Update Count     : 6
     12// Last Modified On : Sat Jul 22 09:20:31 2017
     13// Update Count     : 7
    1414//
    1515
    16 #ifndef _POLYMUTATOR_H
    17 #define _POLYMUTATOR_H
     16#pragma once
    1817
    1918#include <map>
     
    6665} // namespace
    6766
    68 #endif // _POLYMUTATOR_H
    69 
    7067// Local Variables: //
    7168// tab-width: 4 //
  • src/GenPoly/ScopedSet.h

    r3d4b23fa r0720e049  
    99// Author           : Aaron B. Moss
    1010// Created On       : Thu Dec 3 11:51:00 2015
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Thu Dec 3 11:51:00 2015
    13 // Update Count     : 1
    14 //
    15 
    16 #ifndef _SCOPEDSET_H
    17 #define _SCOPEDSET_H
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:22:17 2017
     13// Update Count     : 2
     14//
     15
     16#pragma once
    1817
    1918#include <iterator>
     
    247246} // namespace GenPoly
    248247
    249 #endif // _SCOPEDSET_H
    250 
    251248// Local Variables: //
    252249// tab-width: 4 //
  • src/GenPoly/ScrubTyVars.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:48:14 2015
    13 // Update Count     : 1
     12// Last Modified On : Sat Jul 22 09:21:47 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef _SCRUBTYVARS_H
    17 #define _SCRUBTYVARS_H
     16#pragma once
    1817
    1918#include <string>
     
    9594} // namespace GenPoly
    9695
    97 #endif // _SCRUBTYVARS_H
    98 
    9996// Local Variables: //
    10097// tab-width: 4 //
  • src/GenPoly/Specialize.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 07:53:58 2015
    13 // Update Count     : 1
     12// Last Modified On : Sat Jul 22 09:22:31 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef _SPECIALIZE_H
    17 #define _SPECIALIZE_H
     16#pragma once
    1817
    1918#include <list>
     
    2625} // namespace GenPoly
    2726
    28 #endif // _SPECIALIZE_H
    29 
    3027// Local Variables: //
    3128// tab-width: 4 //
  • src/InitTweak/FixGlobalInit.h

    r3d4b23fa r0720e049  
    99// Author           : Rob Schluntz
    1010// Created On       : Mon May 04 15:14:56 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 06 16:07:47 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:30:54 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef FIX_GLOBAL_INIT_H
    17 #define FIX_GLOBAL_INIT_H
     16#pragma once
    1817
    1918#include <string>
     
    3433} // namespace
    3534
    36 #endif // GENPOLY_POLYMUTATOR_H
    37 
    3835// Local Variables: //
    3936// tab-width: 4 //
  • src/InitTweak/FixInit.h

    r3d4b23fa r0720e049  
    99// Author           : Rob Schluntz
    1010// Created On       : Wed Jan 13 16:29:30 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 13 11:27:52 2016
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:31:06 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef FIX_INIT_H
    17 #define FIX_INIT_H
     16#pragma once
    1817
    1918#include <string>
     
    3029} // namespace
    3130
    32 #endif // GENPOLY_POLYMUTATOR_H
    33 
    3431// Local Variables: //
    3532// tab-width: 4 //
  • src/InitTweak/GenInit.h

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 13 11:27:19 2016
    13 // Update Count     : 3
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:31:19 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef GEN_INIT_H
    17 #define GEN_INIT_H
     16#pragma once
    1817
    1918#include <string>
     
    3534} // namespace
    3635
    37 #endif // INITTWEAK_GENINIT_H
    38 
    3936// Local Variables: //
    4037// tab-width: 4 //
  • src/InitTweak/InitTweak.h

    r3d4b23fa r0720e049  
    99// Author           : Rob Schluntz
    1010// Created On       : Fri May 13 11:26:36 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 13 11:35:36 2016
    13 // Update Count     : 3
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:30:33 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef INIT_TWEAK_H
    17 #define INIT_TWEAK_H
     16#pragma once
    1817
    1918#include <string>
     
    116115} // namespace
    117116
    118 #endif // INITTWEAK_GENINIT_H
    119 
    120117// Local Variables: //
    121118// tab-width: 4 //
  • src/MakeLibCfa.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sat May 16 10:42:14 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat May 16 10:43:29 2015
    13 // Update Count     : 1
     12// Last Modified On : Sat Jul 22 09:31:35 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef LIBCFA_MAKELIBCFA_H
    17 #define LIBCFA_MAKELIBCFA_H
     16#pragma once
    1817
    1918#include <list>  // for list
     
    2524} // namespace LibCfa
    2625
    27 #endif // LIBCFA_MAKELIBCFA_H
    28 
    2926// Local Variables: //
    3027// tab-width: 4 //
  • src/Makefile.am

    r3d4b23fa r0720e049  
    1010## Author           : Peter A. Buhr
    1111## Created On       : Sun May 31 08:51:46 2015
    12 ## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Thu Oct 27 20:41:25 2016
    14 ## Update Count     : 75
     12## Last Modified By : Andrew Beach
     13## Last Modified On : Tus Jul 25 10:34:00 2017
     14## Update Count     : 76
    1515###############################################################################
    1616
     
    3737include SynTree/module.mk
    3838include Tuples/module.mk
     39include Virtual/module.mk
    3940
    4041# put into lib for now
     
    4243cfa_cpplib_PROGRAMS = driver/cfa-cpp
    4344driver_cfa_cpp_SOURCES = ${SRC}
    44 driver_cfa_cpp_LDADD = ${LEXLIB} -ldl                   # yywrap
     45driver_cfa_cpp_LDADD = -ldl                     # yywrap
    4546driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14
    4647driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
  • src/Makefile.in

    r3d4b23fa r0720e049  
    2323#SRC +=  ArgTweak/Rewriter.cc \
    2424#       ArgTweak/Mutate.cc
     25
     26######################### -*- Mode: Makefile-Gmake -*- ########################
     27###############################################################################
    2528
    2629######################### -*- Mode: Makefile-Gmake -*- ########################
     
    254257        Tuples/driver_cfa_cpp-TupleAssignment.$(OBJEXT) \
    255258        Tuples/driver_cfa_cpp-TupleExpansion.$(OBJEXT) \
    256         Tuples/driver_cfa_cpp-Explode.$(OBJEXT)
     259        Tuples/driver_cfa_cpp-Explode.$(OBJEXT) \
     260        Virtual/driver_cfa_cpp-ExpandCasts.$(OBJEXT)
    257261am_driver_cfa_cpp_OBJECTS = $(am__objects_1)
    258262driver_cfa_cpp_OBJECTS = $(am_driver_cfa_cpp_OBJECTS)
    259 am__DEPENDENCIES_1 =
    260 driver_cfa_cpp_DEPENDENCIES = $(am__DEPENDENCIES_1)
     263driver_cfa_cpp_DEPENDENCIES =
    261264driver_cfa_cpp_LINK = $(CXXLD) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) \
    262265        $(driver_cfa_cpp_LDFLAGS) $(LDFLAGS) -o $@
     
    354357        $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk \
    355358        $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk \
    356         $(srcdir)/Tuples/module.mk $(top_srcdir)/automake/depcomp \
    357         $(top_srcdir)/automake/ylwrap Parser/lex.cc Parser/parser.cc \
    358         Parser/parser.hh
     359        $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk \
     360        $(top_srcdir)/automake/depcomp $(top_srcdir)/automake/ylwrap \
     361        Parser/lex.cc Parser/parser.cc Parser/parser.hh
    359362DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    360363ACLOCAL = @ACLOCAL@
     
    532535        SynTree/Attribute.cc SynTree/VarExprReplacer.cc \
    533536        Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \
    534         Tuples/Explode.cc
     537        Tuples/Explode.cc Virtual/ExpandCasts.cc
    535538MAINTAINERCLEANFILES = Parser/parser.output ${libdir}/${notdir \
    536539        ${cfa_cpplib_PROGRAMS}}
     
    543546cfa_cpplibdir = ${CFA_LIBDIR}
    544547driver_cfa_cpp_SOURCES = ${SRC}
    545 driver_cfa_cpp_LDADD = ${LEXLIB} -ldl                   # yywrap
     548driver_cfa_cpp_LDADD = -ldl                     # yywrap
    546549driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14
    547550driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
     
    551554.SUFFIXES:
    552555.SUFFIXES: .cc .ll .o .obj .yy
    553 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(am__configure_deps)
     556$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps)
    554557        @for dep in $?; do \
    555558          case '$(am__configure_deps)' in \
     
    571574            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    572575        esac;
    573 $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(am__empty):
     576$(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Virtual/module.mk $(am__empty):
    574577
    575578$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     
    938941Tuples/driver_cfa_cpp-Explode.$(OBJEXT): Tuples/$(am__dirstamp) \
    939942        Tuples/$(DEPDIR)/$(am__dirstamp)
     943Virtual/$(am__dirstamp):
     944        @$(MKDIR_P) Virtual
     945        @: > Virtual/$(am__dirstamp)
     946Virtual/$(DEPDIR)/$(am__dirstamp):
     947        @$(MKDIR_P) Virtual/$(DEPDIR)
     948        @: > Virtual/$(DEPDIR)/$(am__dirstamp)
     949Virtual/driver_cfa_cpp-ExpandCasts.$(OBJEXT): Virtual/$(am__dirstamp) \
     950        Virtual/$(DEPDIR)/$(am__dirstamp)
    940951driver/$(am__dirstamp):
    941952        @$(MKDIR_P) driver
     
    960971        -rm -f SynTree/*.$(OBJEXT)
    961972        -rm -f Tuples/*.$(OBJEXT)
     973        -rm -f Virtual/*.$(OBJEXT)
    962974
    963975distclean-compile:
     
    10741086@AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleAssignment.Po@am__quote@
    10751087@AMDEP_TRUE@@am__include@ @am__quote@Tuples/$(DEPDIR)/driver_cfa_cpp-TupleExpansion.Po@am__quote@
     1088@AMDEP_TRUE@@am__include@ @am__quote@Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po@am__quote@
    10761089
    10771090.cc.o:
     
    26302643@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    26312644@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Tuples/driver_cfa_cpp-Explode.obj `if test -f 'Tuples/Explode.cc'; then $(CYGPATH_W) 'Tuples/Explode.cc'; else $(CYGPATH_W) '$(srcdir)/Tuples/Explode.cc'; fi`
     2645
     2646Virtual/driver_cfa_cpp-ExpandCasts.o: Virtual/ExpandCasts.cc
     2647@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Virtual/driver_cfa_cpp-ExpandCasts.o -MD -MP -MF Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo -c -o Virtual/driver_cfa_cpp-ExpandCasts.o `test -f 'Virtual/ExpandCasts.cc' || echo '$(srcdir)/'`Virtual/ExpandCasts.cc
     2648@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po
     2649@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Virtual/ExpandCasts.cc' object='Virtual/driver_cfa_cpp-ExpandCasts.o' libtool=no @AMDEPBACKSLASH@
     2650@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     2651@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Virtual/driver_cfa_cpp-ExpandCasts.o `test -f 'Virtual/ExpandCasts.cc' || echo '$(srcdir)/'`Virtual/ExpandCasts.cc
     2652
     2653Virtual/driver_cfa_cpp-ExpandCasts.obj: Virtual/ExpandCasts.cc
     2654@am__fastdepCXX_TRUE@   $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Virtual/driver_cfa_cpp-ExpandCasts.obj -MD -MP -MF Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo -c -o Virtual/driver_cfa_cpp-ExpandCasts.obj `if test -f 'Virtual/ExpandCasts.cc'; then $(CYGPATH_W) 'Virtual/ExpandCasts.cc'; else $(CYGPATH_W) '$(srcdir)/Virtual/ExpandCasts.cc'; fi`
     2655@am__fastdepCXX_TRUE@   $(AM_V_at)$(am__mv) Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Tpo Virtual/$(DEPDIR)/driver_cfa_cpp-ExpandCasts.Po
     2656@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(AM_V_CXX)source='Virtual/ExpandCasts.cc' object='Virtual/driver_cfa_cpp-ExpandCasts.obj' libtool=no @AMDEPBACKSLASH@
     2657@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     2658@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o Virtual/driver_cfa_cpp-ExpandCasts.obj `if test -f 'Virtual/ExpandCasts.cc'; then $(CYGPATH_W) 'Virtual/ExpandCasts.cc'; else $(CYGPATH_W) '$(srcdir)/Virtual/ExpandCasts.cc'; fi`
    26322659
    26332660.ll.cc:
     
    27782805        -rm -f Tuples/$(DEPDIR)/$(am__dirstamp)
    27792806        -rm -f Tuples/$(am__dirstamp)
     2807        -rm -f Virtual/$(DEPDIR)/$(am__dirstamp)
     2808        -rm -f Virtual/$(am__dirstamp)
    27802809        -rm -f driver/$(am__dirstamp)
    27812810
     
    27932822
    27942823distclean: distclean-am
    2795         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
     2824        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR)
    27962825        -rm -f Makefile
    27972826distclean-am: clean-am distclean-compile distclean-generic \
     
    28392868
    28402869maintainer-clean: maintainer-clean-am
    2841         -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR)
     2870        -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Virtual/$(DEPDIR)
    28422871        -rm -f Makefile
    28432872maintainer-clean-am: distclean-am maintainer-clean-generic
  • src/Parser/DeclarationNode.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jun 28 15:27:00 2017
    13 // Update Count     : 1019
     12// Last Modified On : Fri Jul 14 16:55:00 2017
     13// Update Count     : 1020
    1414//
    1515
     
    253253        newnode->type->aggregate.fields = fields;
    254254        newnode->type->aggregate.body = body;
     255        newnode->type->aggregate.tagged = false;
     256        newnode->type->aggregate.parent = nullptr;
    255257        return newnode;
    256258} // DeclarationNode::newAggregate
     
    273275        return newnode;
    274276} // DeclarationNode::newEnumConstant
     277
     278DeclarationNode * DeclarationNode::newTreeStruct( Aggregate kind, const string * name, const string * parent, ExpressionNode * actuals, DeclarationNode * fields, bool body ) {
     279        assert( name );
     280        DeclarationNode * newnode = new DeclarationNode;
     281        newnode->type = new TypeData( TypeData::Aggregate );
     282        newnode->type->aggregate.kind = kind;
     283        newnode->type->aggregate.name = name;
     284        newnode->type->aggregate.actuals = actuals;
     285        newnode->type->aggregate.fields = fields;
     286        newnode->type->aggregate.body = body;
     287        newnode->type->aggregate.tagged = true;
     288        newnode->type->aggregate.parent = parent;
     289        return newnode;
     290} // DeclarationNode::newTreeStruct
    275291
    276292DeclarationNode * DeclarationNode::newName( string * name ) {
  • src/Parser/ExpressionNode.cc

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:17:07 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 28 21:08:15 2017
    13 // Update Count     : 542
    14 //
    15 
    16 #include <cassert>
    17 #include <cctype>
    18 #include <climits>
    19 #include <cstdio>
    20 #include <algorithm>
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  2 11:12:00 2017
     13// Update Count     : 568
     14//
     15
     16#include <climits>                                                                              // access INT_MAX, UINT_MAX, LONG_MAX, ULONG_MAX, LLONG_MAX
    2117#include <sstream>
    2218
     
    2622#include "SynTree/Expression.h"
    2723#include "SynTree/Declaration.h"
    28 #include "Common/UnimplementedError.h"
    2924#include "parserutility.h"
    30 #include "Common/utility.h"
    3125
    3226using namespace std;
     
    4640// type.
    4741
    48 Type::Qualifiers emptyQualifiers;                               // no qualifiers on constants
     42extern const Type::Qualifiers noQualifiers;             // no qualifiers on constants
    4943
    5044static inline bool checkU( char c ) { return c == 'u' || c == 'U'; }
     
    5549static inline bool checkX( char c ) { return c == 'x' || c == 'X'; }
    5650
    57 Expression *build_constantInteger( const std::string & str ) {
     51Expression * build_constantInteger( const std::string & str ) {
    5852        static const BasicType::Kind kind[2][3] = {
    5953                { BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt },
     
    6256        bool dec = true, Unsigned = false;                                      // decimal, unsigned constant
    6357        int size;                                                                                       // 0 => int, 1 => long, 2 => long long
    64         unsigned long long int v;                                                               // converted integral value
     58        unsigned long long int v;                                                       // converted integral value
    6559        size_t last = str.length() - 1;                                         // last character of constant
    66 
     60        Expression * ret;
     61
     62        // special constants
     63        if ( str == "0" ) {
     64                ret = new ConstantExpr( Constant( (Type *)new ZeroType( noQualifiers ), str, (unsigned long long int)0 ) );
     65                goto CLEANUP;
     66        } // if
     67        if ( str == "1" ) {
     68                ret = new ConstantExpr( Constant( (Type *)new OneType( noQualifiers ), str, (unsigned long long int)1 ) );
     69                goto CLEANUP;
     70        } // if
     71       
    6772        if ( str[0] == '0' ) {                                                          // octal/hex constant ?
    6873                dec = false;
     
    118123        } // if
    119124
    120         Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[Unsigned][size] ), str, v ) );
     125        ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) );
     126  CLEANUP:
    121127        delete &str;                                                                            // created by lex
    122128        return ret;
    123129} // build_constantInteger
    124130
    125 Expression *build_constantFloat( const std::string & str ) {
     131Expression * build_constantFloat( const std::string & str ) {
    126132        static const BasicType::Kind kind[2][3] = {
    127133                { BasicType::Float, BasicType::Double, BasicType::LongDouble },
     
    153159        } // if
    154160
    155         Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, kind[complx][size] ), str, v ) );
     161        Expression * ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[complx][size] ), str, v ) );
    156162        delete &str;                                                                            // created by lex
    157163        return ret;
    158164} // build_constantFloat
    159165
    160 Expression *build_constantChar( const std::string & str ) {
    161         Expression * ret = new ConstantExpr( Constant( new BasicType( emptyQualifiers, BasicType::Char ), str, (unsigned long long int)(unsigned char)str[1] ) );
     166Expression * build_constantChar( const std::string & str ) {
     167        Expression * ret = new ConstantExpr( Constant( new BasicType( noQualifiers, BasicType::Char ), str, (unsigned long long int)(unsigned char)str[1] ) );
    162168        delete &str;                                                                            // created by lex
    163169        return ret;
    164170} // build_constantChar
    165171
    166 ConstantExpr *build_constantStr( const std::string & str ) {
     172ConstantExpr * build_constantStr( const std::string & str ) {
    167173        // string should probably be a primitive type
    168         ArrayType *at = new ArrayType( emptyQualifiers, new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ),
    169                                                                    new ConstantExpr( Constant::from_ulong( str.size() + 1 - 2 ) ),  // +1 for '\0' and -2 for '"'
     174        ArrayType * at = new ArrayType( noQualifiers, new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ),
     175                                                                   new ConstantExpr( Constant::from_ulong( str.size() + 1 - 2 ) ), // +1 for '\0' and -2 for '"'
    170176                                                                   false, false );
    171         // constant 0 is ignored for pure string value
    172         ConstantExpr * ret = new ConstantExpr( Constant( at, str, (unsigned long long int)0 ) );
     177        ConstantExpr * ret = new ConstantExpr( Constant( at, str, (unsigned long long int)0 ) ); // constant 0 is ignored for pure string value
    173178        delete &str;                                                                            // created by lex
    174179        return ret;
    175180} // build_constantStr
    176 
    177 Expression *build_constantZeroOne( const std::string & str ) {
    178         Expression * ret = new ConstantExpr( Constant( str == "0" ? (Type *)new ZeroType( emptyQualifiers ) : (Type*)new OneType( emptyQualifiers ), str,
    179                                                                                                    str == "0" ? (unsigned long long int)0 : (unsigned long long int)1 ) );
    180         delete &str;                                                                            // created by lex
    181         return ret;
    182 } // build_constantChar
    183181
    184182Expression * build_field_name_FLOATINGconstant( const std::string & str ) {
     
    209207} // build_field_name_fraction_constants
    210208
    211 
    212 
    213209Expression * build_field_name_REALFRACTIONconstant( const std::string & str ) {
    214210        if ( str.find_first_not_of( "0123456789", 1 ) != string::npos ) throw SemanticError( "invalid tuple index " + str );
     
    225221} // build_field_name_REALDECIMALconstant
    226222
    227 NameExpr * build_varref( const string *name ) {
    228         NameExpr *expr = new NameExpr( *name, nullptr );
     223NameExpr * build_varref( const string * name ) {
     224        NameExpr * expr = new NameExpr( *name, nullptr );
    229225        delete name;
    230226        return expr;
    231 }
    232 
    233 static const char *OperName[] = {
     227} // build_varref
     228
     229
     230static const char * OperName[] = {                                              // must harmonize with OperKinds
    234231        // diadic
    235         "SizeOf", "AlignOf", "OffsetOf", "?+?", "?-?", "?*?", "?/?", "?%?", "||", "&&",
     232        "SizeOf", "AlignOf", "OffsetOf", "?+?", "?-?", "?\\?", "?*?", "?/?", "?%?", "||", "&&",
    236233        "?|?", "?&?", "?^?", "Cast", "?<<?", "?>>?", "?<?", "?>?", "?<=?", "?>=?", "?==?", "?!=?",
    237         "?=?", "?@=?", "?*=?", "?/=?", "?%=?", "?+=?", "?-=?", "?<<=?", "?>>=?", "?&=?", "?^=?", "?|=?",
     234        "?=?", "?@=?", "?\\=?", "?*=?", "?/=?", "?%=?", "?+=?", "?-=?", "?<<=?", "?>>=?", "?&=?", "?^=?", "?|=?",
    238235        "?[?]", "...",
    239236        // monadic
    240237        "+?", "-?", "AddressOf", "*?", "!?", "~?", "++?", "?++", "--?", "?--", "&&"
    241 };
    242 
    243 Expression *build_cast( DeclarationNode *decl_node, ExpressionNode *expr_node ) {
    244         Type *targetType = maybeMoveBuildType( decl_node );
     238}; // OperName
     239
     240Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ) {
     241        Type * targetType = maybeMoveBuildType( decl_node );
    245242        if ( dynamic_cast< VoidType * >( targetType ) ) {
    246243                delete targetType;
     
    249246                return new CastExpr( maybeMoveBuild< Expression >(expr_node), targetType );
    250247        } // if
    251 }
    252 
    253 Expression *build_fieldSel( ExpressionNode *expr_node, Expression *member ) {
    254         UntypedMemberExpr *ret = new UntypedMemberExpr( member, maybeMoveBuild< Expression >(expr_node) );
    255         return ret;
    256 }
    257 
    258 Expression *build_pfieldSel( ExpressionNode *expr_node, Expression *member ) {
    259         UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
     248} // build_cast
     249
     250Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ) {
     251        Type * targetType = maybeMoveBuildType( decl_node );
     252        Expression * castArg = maybeMoveBuild< Expression >( expr_node );
     253        return new VirtualCastExpr( castArg, targetType );
     254} // build_virtual_cast
     255
     256Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member ) {
     257        UntypedMemberExpr * ret = new UntypedMemberExpr( member, maybeMoveBuild< Expression >(expr_node) );
     258        return ret;
     259} // build_fieldSel
     260
     261Expression * build_pfieldSel( ExpressionNode * expr_node, Expression * member ) {
     262        UntypedExpr * deref = new UntypedExpr( new NameExpr( "*?" ) );
    260263        deref->location = expr_node->location;
    261264        deref->get_args().push_back( maybeMoveBuild< Expression >(expr_node) );
    262         UntypedMemberExpr *ret = new UntypedMemberExpr( member, deref );
    263         return ret;
    264 }
    265 
    266 Expression *build_addressOf( ExpressionNode *expr_node ) {
     265        UntypedMemberExpr * ret = new UntypedMemberExpr( member, deref );
     266        return ret;
     267} // build_pfieldSel
     268
     269Expression * build_addressOf( ExpressionNode * expr_node ) {
    267270                return new AddressExpr( maybeMoveBuild< Expression >(expr_node) );
    268 }
    269 Expression *build_sizeOfexpr( ExpressionNode *expr_node ) {
     271} // build_addressOf
     272
     273Expression * build_sizeOfexpr( ExpressionNode * expr_node ) {
    270274        return new SizeofExpr( maybeMoveBuild< Expression >(expr_node) );
    271 }
    272 Expression *build_sizeOftype( DeclarationNode *decl_node ) {
     275} // build_sizeOfexpr
     276
     277Expression * build_sizeOftype( DeclarationNode * decl_node ) {
    273278        return new SizeofExpr( maybeMoveBuildType( decl_node ) );
    274 }
    275 Expression *build_alignOfexpr( ExpressionNode *expr_node ) {
     279} // build_sizeOftype
     280
     281Expression * build_alignOfexpr( ExpressionNode * expr_node ) {
    276282        return new AlignofExpr( maybeMoveBuild< Expression >(expr_node) );
    277 }
    278 Expression *build_alignOftype( DeclarationNode *decl_node ) {
     283} // build_alignOfexpr
     284
     285Expression * build_alignOftype( DeclarationNode * decl_node ) {
    279286        return new AlignofExpr( maybeMoveBuildType( decl_node) );
    280 }
    281 Expression *build_offsetOf( DeclarationNode *decl_node, NameExpr *member ) {
     287} // build_alignOftype
     288
     289Expression * build_offsetOf( DeclarationNode * decl_node, NameExpr * member ) {
    282290        Expression * ret = new UntypedOffsetofExpr( maybeMoveBuildType( decl_node ), member->get_name() );
    283291        delete member;
    284292        return ret;
    285 }
    286 
    287 Expression *build_and_or( ExpressionNode *expr_node1, ExpressionNode *expr_node2, bool kind ) {
     293} // build_offsetOf
     294
     295Expression * build_and_or( ExpressionNode * expr_node1, ExpressionNode * expr_node2, bool kind ) {
    288296        return new LogicalExpr( notZeroExpr( maybeMoveBuild< Expression >(expr_node1) ), notZeroExpr( maybeMoveBuild< Expression >(expr_node2) ), kind );
    289 }
    290 
    291 Expression *build_unary_val( OperKinds op, ExpressionNode *expr_node ) {
     297} // build_and_or
     298
     299Expression * build_unary_val( OperKinds op, ExpressionNode * expr_node ) {
    292300        std::list< Expression * > args;
    293301        args.push_back( maybeMoveBuild< Expression >(expr_node) );
    294302        return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
    295 }
    296 Expression *build_unary_ptr( OperKinds op, ExpressionNode *expr_node ) {
     303} // build_unary_val
     304
     305Expression * build_unary_ptr( OperKinds op, ExpressionNode * expr_node ) {
    297306        std::list< Expression * > args;
    298307        args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node) ) );
    299308        return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
    300 }
    301 Expression *build_binary_val( OperKinds op, ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
     309} // build_unary_ptr
     310
     311Expression * build_binary_val( OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
    302312        std::list< Expression * > args;
    303313        args.push_back( maybeMoveBuild< Expression >(expr_node1) );
    304314        args.push_back( maybeMoveBuild< Expression >(expr_node2) );
    305315        return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
    306 }
    307 Expression *build_binary_ptr( OperKinds op, ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
     316} // build_binary_val
     317
     318Expression * build_binary_ptr( OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
    308319        std::list< Expression * > args;
    309320        args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node1) ) );
    310321        args.push_back( maybeMoveBuild< Expression >(expr_node2) );
    311322        return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
    312 }
    313 
    314 Expression *build_cond( ExpressionNode *expr_node1, ExpressionNode *expr_node2, ExpressionNode *expr_node3 ) {
     323} // build_binary_ptr
     324
     325Expression * build_cond( ExpressionNode * expr_node1, ExpressionNode * expr_node2, ExpressionNode * expr_node3 ) {
    315326        return new ConditionalExpr( notZeroExpr( maybeMoveBuild< Expression >(expr_node1) ), maybeMoveBuild< Expression >(expr_node2), maybeMoveBuild< Expression >(expr_node3) );
    316 }
    317 
    318 Expression *build_comma( ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
     327} // build_cond
     328
     329Expression * build_comma( ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
    319330        return new CommaExpr( maybeMoveBuild< Expression >(expr_node1), maybeMoveBuild< Expression >(expr_node2) );
    320 }
    321 
    322 Expression *build_attrexpr( NameExpr *var, ExpressionNode * expr_node ) {
     331} // build_comma
     332
     333Expression * build_attrexpr( NameExpr * var, ExpressionNode * expr_node ) {
    323334        return new AttrExpr( var, maybeMoveBuild< Expression >(expr_node) );
    324 }
    325 Expression *build_attrtype( NameExpr *var, DeclarationNode * decl_node ) {
     335} // build_attrexpr
     336
     337Expression * build_attrtype( NameExpr * var, DeclarationNode * decl_node ) {
    326338        return new AttrExpr( var, maybeMoveBuildType( decl_node ) );
    327 }
    328 
    329 Expression *build_tuple( ExpressionNode * expr_node ) {
     339} // build_attrtype
     340
     341Expression * build_tuple( ExpressionNode * expr_node ) {
    330342        std::list< Expression * > exprs;
    331343        buildMoveList( expr_node, exprs );
    332344        return new UntypedTupleExpr( exprs );;
    333 }
    334 
    335 Expression *build_func( ExpressionNode * function, ExpressionNode * expr_node ) {
     345} // build_tuple
     346
     347Expression * build_func( ExpressionNode * function, ExpressionNode * expr_node ) {
    336348        std::list< Expression * > args;
    337349        buildMoveList( expr_node, args );
    338350        return new UntypedExpr( maybeMoveBuild< Expression >(function), args, nullptr );
    339 }
    340 
    341 Expression *build_range( ExpressionNode * low, ExpressionNode *high ) {
     351} // build_func
     352
     353Expression * build_range( ExpressionNode * low, ExpressionNode * high ) {
    342354        return new RangeExpr( maybeMoveBuild< Expression >( low ), maybeMoveBuild< Expression >( high ) );
    343 }
    344 
    345 Expression *build_asmexpr( ExpressionNode *inout, ConstantExpr *constraint, ExpressionNode *operand ) {
     355} // build_range
     356
     357Expression * build_asmexpr( ExpressionNode * inout, ConstantExpr * constraint, ExpressionNode * operand ) {
    346358        return new AsmExpr( maybeMoveBuild< Expression >( inout ), constraint, maybeMoveBuild< Expression >(operand) );
    347 }
    348 
    349 Expression *build_valexpr( StatementNode *s ) {
     359} // build_asmexpr
     360
     361Expression * build_valexpr( StatementNode * s ) {
    350362        return new StmtExpr( dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(s) ) );
    351 }
    352 Expression *build_typevalue( DeclarationNode *decl ) {
     363} // build_valexpr
     364
     365Expression * build_typevalue( DeclarationNode * decl ) {
    353366        return new TypeExpr( maybeMoveBuildType( decl ) );
    354 }
    355 
    356 Expression *build_compoundLiteral( DeclarationNode *decl_node, InitializerNode *kids ) {
     367} // build_typevalue
     368
     369Expression * build_compoundLiteral( DeclarationNode * decl_node, InitializerNode * kids ) {
    357370        Declaration * newDecl = maybeBuild< Declaration >(decl_node); // compound literal type
    358371        if ( DeclarationWithType * newDeclWithType = dynamic_cast< DeclarationWithType * >( newDecl ) ) { // non-sue compound-literal type
     
    380393                assert( false );
    381394        } // if
    382 }
     395} // build_compoundLiteral
    383396
    384397// Local Variables: //
  • src/Parser/InitializerNode.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Sat May 16 13:20:24 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Oct  1 23:09:51 2016
    13 // Update Count     : 21
     12// Last Modified On : Fri Jul 28 23:27:20 2017
     13// Update Count     : 26
    1414//
    1515
     
    2222#include "SynTree/Initializer.h"
    2323
    24 InitializerNode::InitializerNode( ExpressionNode *_expr, bool aggrp, ExpressionNode *des )
    25                 : expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
     24InitializerNode::InitializerNode( ExpressionNode * _expr, bool aggrp, ExpressionNode * des )
     25                : expr( _expr ), aggregate( aggrp ), designator( des ), kids( nullptr ), maybeConstructed( true ) {
    2626        if ( aggrp )
    2727                kids = dynamic_cast< InitializerNode * >( get_next() );
    2828
    29         if ( kids != 0 )
    30                 set_last( 0 );
    31 }
     29        if ( kids )
     30                set_last( nullptr );
     31} // InitializerNode::InitializerNode
    3232
    33 InitializerNode::InitializerNode( InitializerNode *init, bool aggrp, ExpressionNode *des )
    34                 : expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
    35         if ( init != 0 )
     33InitializerNode::InitializerNode( InitializerNode * init, bool aggrp, ExpressionNode * des )
     34                : expr( nullptr ), aggregate( aggrp ), designator( des ), kids( nullptr ), maybeConstructed( true ) {
     35        if ( init )
    3636                set_last( init );
    3737
     
    3939                kids = dynamic_cast< InitializerNode * >( get_next() );
    4040
    41         if ( kids != 0 )
    42                 set_next( 0 );
    43 }
     41        if ( kids )
     42                set_next( nullptr );
     43} // InitializerNode::InitializerNode
    4444
    4545InitializerNode::~InitializerNode() {
     
    4747        delete designator;
    4848        delete kids;
    49 }
     49} // InitializerNode::~InitializerNode
    5050
    5151void InitializerNode::print( std::ostream &os, int indent ) const {
    5252        os << std::string( indent, ' ' ) << "Initializer expression" << std::endl;
    53 }
     53} // InitializerNode::print
    5454
    5555void InitializerNode::printOneLine( std::ostream &os ) const {
    5656        if ( ! aggregate ) {
    57                 if ( designator != 0 ) {
     57                if ( designator ) {
    5858                        os << "designated by: (";
    5959                        ExpressionNode *curdes = designator;
    60                         while ( curdes != 0) {
     60                        while ( curdes != nullptr) {
    6161                                curdes->printOneLine(os);
    6262                                curdes = (ExpressionNode *)(curdes->get_next());
     
    6565                        os << ")";
    6666                } // if
    67                 if ( expr ) expr->printOneLine(os);
     67                if ( expr ) expr->printOneLine( os );
    6868        } else {  // It's an aggregate
    6969                os << "[--";
    70                 if ( next_init() != 0 )
    71                         next_init()->printOneLine(os);
     70                if ( next_init() != nullptr )
     71                        next_init()->printOneLine( os );
    7272                if (aggregate) os << "--]";
    7373        } // if
     
    7676        if ( (moreInit = dynamic_cast< InitializerNode * >( get_next() ) ) ) {
    7777                moreInit->printOneLine( os );
    78         }
    79 }
     78        } // if
     79} // InitializerNode::printOneLine
    8080
    81 Initializer *InitializerNode::build() const {
     81Initializer * InitializerNode::build() const {
    8282        if ( aggregate ) {
    8383                // steal designators from children
     
    9393                return new ListInit( initlist, designlist, maybeConstructed );
    9494        } else {
    95                 if ( get_expression() != 0) {
     95                if ( get_expression() ) {
    9696                        return new SingleInit( maybeBuild< Expression >( get_expression() ), maybeConstructed );
    97                 }
     97                } // if
    9898        } // if
    99         return 0;
    100 }
     99        return nullptr;
     100} // InitializerNode::build
    101101
    102102// Local Variables: //
  • src/Parser/LinkageSpec.h

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:24:28 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jul  7 11:03:00 2017
    13 // Update Count     : 13
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:32:16 2017
     13// Update Count     : 14
    1414//
    1515
    16 #ifndef LINKAGESPEC_H
    17 #define LINKAGESPEC_H
     16#pragma once
    1817
    1918#include <string>
     
    7877};
    7978
    80 #endif // LINKAGESPEC_H
    81 
    8279// Local Variables: //
    8380// tab-width: 4 //
  • src/Parser/ParseNode.h

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:28:16 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Jun 12 13:00:00 2017
    13 // Update Count     : 779
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 27 12:08:08 2017
     13// Update Count     : 788
    1414//
    1515
    16 #ifndef PARSENODE_H
    17 #define PARSENODE_H
     16#pragma once
    1817
    1918#include <string>
     
    141140};
    142141
     142// Must harmonize with OperName.
    143143enum class OperKinds {
    144144        // diadic
    145         SizeOf, AlignOf, OffsetOf, Plus, Minus, Mul, Div, Mod, Or, And,
     145        SizeOf, AlignOf, OffsetOf, Plus, Minus, Exp, Mul, Div, Mod, Or, And,
    146146        BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq,
    147         Assign, AtAssn, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn,
     147        Assign, AtAssn, ExpAssn, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, ERAssn, OrAssn,
    148148        Index, Range,
    149149        // monadic
     
    159159Expression * build_constantFloat( const std::string &str );
    160160Expression * build_constantChar( const std::string &str );
    161 Expression * build_constantZeroOne( const std::string &str );
    162161ConstantExpr * build_constantStr( const std::string &str );
    163162Expression * build_field_name_FLOATINGconstant( const std::string & str );
     
    170169
    171170Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
     171Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
    172172Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member );
    173173Expression * build_pfieldSel( ExpressionNode * expr_node, Expression * member );
     
    248248        static DeclarationNode * newAsmStmt( StatementNode * stmt ); // gcc external asm statement
    249249
     250        // Perhaps this would best fold into newAggragate.
     251        static DeclarationNode * newTreeStruct( Aggregate kind, const std::string * name, const std::string * parent, ExpressionNode * actuals, DeclarationNode * fields, bool body );
     252
    250253        DeclarationNode();
    251254        ~DeclarationNode();
     
    332335
    333336        static UniqueName anonymous;
     337
     338        // Temp to test TreeStruct
     339        const std::string * parent_name;
    334340}; // DeclarationNode
    335341
     
    443449std::ostream & operator<<( std::ostream & out, const ParseNode * node );
    444450
    445 #endif // PARSENODE_H
    446 
    447451// Local Variables: //
    448452// tab-width: 4 //
  • src/Parser/ParserTypes.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sat Sep 22 08:58:10 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 28 22:10:17 2017
    13 // Update Count     : 349
     12// Last Modified On : Sat Jul 22 09:33:28 2017
     13// Update Count     : 350
    1414//
    1515
    16 #ifndef PARSER_HH
    17 #define PARSER_HH
     16#pragma once
    1817
    1918int yylex();
     
    4241}; // Token
    4342
    44 #endif // PARSER_HH
    45 
    4643// Local Variables: //
    4744// tab-width: 4 //
  • src/Parser/TypeData.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jun 28 15:28:00 2017
    13 // Update Count     : 564
     12// Last Modified On : Wed Aug  9 13:50:00 2017
     13// Update Count     : 567
    1414//
    1515
     
    6363                aggregate.fields = nullptr;
    6464                aggregate.body = false;
     65                aggregate.tagged = false;
     66                aggregate.parent = nullptr;
    6567                break;
    6668          case AggregateInst:
     
    121123                delete aggregate.actuals;
    122124                delete aggregate.fields;
     125                delete aggregate.parent;
    123126                // delete aggregate;
    124127                break;
     
    192195                newtype->aggregate.kind = aggregate.kind;
    193196                newtype->aggregate.body = aggregate.body;
     197                newtype->aggregate.tagged = aggregate.tagged;
     198                newtype->aggregate.parent = aggregate.parent ? new string( *aggregate.parent ) : nullptr;
    194199                break;
    195200          case AggregateInst:
     
    449454          case TypeData::Builtin:
    450455                if(td->builtintype == DeclarationNode::Zero) {
    451                         return new ZeroType( emptyQualifiers );
     456                        return new ZeroType( noQualifiers );
    452457                }
    453458                else if(td->builtintype == DeclarationNode::One) {
    454                         return new OneType( emptyQualifiers );
     459                        return new OneType( noQualifiers );
    455460                }
    456461                else {
     
    619624        switch ( td->aggregate.kind ) {
    620625          case DeclarationNode::Struct:
     626                if ( td->aggregate.tagged ) {
     627                        at = new StructDecl( *td->aggregate.name, td->aggregate.parent, attributes, linkage );
     628                        buildForall( td->aggregate.params, at->get_parameters() );
     629                        break;
     630                }
    621631          case DeclarationNode::Coroutine:
    622632          case DeclarationNode::Monitor:
     
    738748} // buildAggInst
    739749
    740 NamedTypeDecl * buildSymbolic( const TypeData * td, const string & name, Type::StorageClasses scs ) {
     750NamedTypeDecl * buildSymbolic( const TypeData * td, const string & name, Type::StorageClasses scs, LinkageSpec::Spec linkage ) {
    741751        assert( td->kind == TypeData::Symbolic );
    742752        NamedTypeDecl * ret;
    743753        assert( td->base );
    744754        if ( td->symbolic.isTypedef ) {
    745                 ret = new TypedefDecl( name, scs, typebuild( td->base ) );
     755                ret = new TypedefDecl( name, scs, typebuild( td->base ), linkage );
    746756        } else {
    747757                ret = new TypeDecl( name, scs, typebuild( td->base ), TypeDecl::Any );
     
    807817                return buildEnum( td, attributes );
    808818        } else if ( td->kind == TypeData::Symbolic ) {
    809                 return buildSymbolic( td, name, scs );
     819                return buildSymbolic( td, name, scs, linkage );
    810820        } else {
    811821                return (new ObjectDecl( name, scs, linkage, bitfieldWidth, typebuild( td ), init, attributes ))->set_asmName( asmName );
  • src/Parser/TypeData.h

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 15:18:36 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jun 28 15:29:00 2017
    13 // Update Count     : 186
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:32:47 2017
     13// Update Count     : 188
    1414//
    1515
    16 #ifndef TYPEDATA_H
    17 #define TYPEDATA_H
     16#pragma once
    1817
    1918#include "ParseNode.h"
     
    3130                DeclarationNode * fields;
    3231                bool body;
     32
     33                bool tagged;
     34                const std::string * parent;
    3335        };
    3436
     
    113115void buildKRFunction( const TypeData::Function_t & function );
    114116
    115 #endif // TYPEDATA_H
    116 
    117117// Local Variables: //
    118118// tab-width: 4 //
  • src/Parser/TypedefTable.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sat May 16 15:24:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 28 21:56:34 2017
    13 // Update Count     : 33
     12// Last Modified On : Sat Jul 22 09:33:14 2017
     13// Update Count     : 34
    1414//
    1515
    16 #ifndef TYPEDEFTABLE_H
    17 #define TYPEDEFTABLE_H
     16#pragma once
    1817
    1918#include <map>
     
    9190};
    9291
    93 #endif // TYPEDEFTABLE_H
    94 
    9592// Local Variables: //
    9693// tab-width: 4 //
  • src/Parser/lex.ll

    r3d4b23fa r0720e049  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Wed Jul 12 18:04:44 2017
    13  * Update Count     : 535
     12 * Last Modified On : Thu Jul 27 21:46:06 2017
     13 * Update Count     : 550
    1414 */
    1515
    1616%option yylineno
     17%option noyywrap
    1718%option nounput
    1819
     
    125126op_unary {op_unary_only}|{op_unary_binary}|{op_unary_pre_post}
    126127
    127 op_binary_only "/"|"%"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"&="|"|="|"^="|"<<="|">>="
     128op_binary_only "/"|"%"|"\\"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"\\="|"&="|"|="|"^="|"<<="|">>="
    128129op_binary_over {op_unary_binary}|{op_binary_only}
    129130                                // op_binary_not_over "?"|"->"|"."|"&&"|"||"|"@="
     
    136137
    137138%%
    138                                    /* line directives */
     139                                /* line directives */
    139140^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["].*"\n" {
    140141        /* " stop highlighting */
     
    232233int                             { KEYWORD_RETURN(INT); }
    233234__int128                { KEYWORD_RETURN(INT); }                                // GCC
     235__int128_t              { KEYWORD_RETURN(INT); }                                // GCC
    234236__label__               { KEYWORD_RETURN(LABEL); }                              // GCC
    235237long                    { KEYWORD_RETURN(LONG); }
     
    266268__typeof                { KEYWORD_RETURN(TYPEOF); }                             // GCC
    267269__typeof__              { KEYWORD_RETURN(TYPEOF); }                             // GCC
     270__uint128_t             { KEYWORD_RETURN(INT); }                                // GCC
    268271union                   { KEYWORD_RETURN(UNION); }
    269272unsigned                { KEYWORD_RETURN(UNSIGNED); }
    270273__builtin_va_list { KEYWORD_RETURN(VALIST); }                   // GCC
     274virtual                 { KEYWORD_RETURN(VIRTUAL); }                    // CFA
    271275void                    { KEYWORD_RETURN(VOID); }
    272276volatile                { KEYWORD_RETURN(VOLATILE); }
     
    285289
    286290                                /* numeric constants */
    287 "0"                             { NUMERIC_RETURN(ZERO); }                               // CFA
    288 "1"                             { NUMERIC_RETURN(ONE); }                                // CFA
    289291{decimal_constant} { NUMERIC_RETURN(INTEGERconstant); }
    290292{octal_constant} { NUMERIC_RETURN(INTEGERconstant); }
     
    337339"-"                             { ASCIIOP_RETURN(); }
    338340"*"                             { ASCIIOP_RETURN(); }
     341"\\"                    { ASCIIOP_RETURN(); }                                   // CFA, exponentiation
    339342"/"                             { ASCIIOP_RETURN(); }
    340343"%"                             { ASCIIOP_RETURN(); }
     
    361364"+="                    { NAMEDOP_RETURN(PLUSassign); }
    362365"-="                    { NAMEDOP_RETURN(MINUSassign); }
     366"\\="                   { NAMEDOP_RETURN(EXPassign); }                  // CFA, exponentiation
    363367"*="                    { NAMEDOP_RETURN(MULTassign); }
    364368"/="                    { NAMEDOP_RETURN(DIVassign); }
     
    415419
    416420                                /* unknown characters */
    417 .                       { printf("unknown character(s):\"%s\" on line %d\n", yytext, yylineno); }
     421.                               { printf("unknown character(s):\"%s\" on line %d\n", yytext, yylineno); }
    418422
    419423%%
  • src/Parser/parser.yy

    r3d4b23fa r0720e049  
    99// Author           : Peter A. Buhr
    1010// Created On       : Sat Sep  1 20:22:55 2001
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jul 12 18:23:36 2017
    13 // Update Count     : 2426
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  4 13:33:00 2017
     13// Update Count     : 2475
    1414//
    1515
     
    118118%token RESTRICT                                                                                 // C99
    119119%token ATOMIC                                                                                   // C11
    120 %token FORALL LVALUE MUTEX                                                              // CFA
    121 %token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED ZERO_T ONE_T
     120%token FORALL LVALUE MUTEX VIRTUAL                                              // CFA
     121%token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED
     122%token BOOL COMPLEX IMAGINARY                                                   // C99
     123%token ZERO_T ONE_T                                                                             // CFA
    122124%token VALIST                                                                                   // GCC
    123 %token BOOL COMPLEX IMAGINARY                                                   // C99
    124125%token TYPEOF LABEL                                                                             // GCC
    125126%token ENUM STRUCT UNION
     
    141142// converted into the tuple index (.)(1). e.g., 3.x
    142143%token<tok>     REALDECIMALconstant     REALFRACTIONconstant    FLOATINGconstant
    143 %token<tok> ZERO                                ONE                                             // CFA
    144144
    145145// multi-character operators
     
    151151%token ELLIPSIS                                                                                 // ...
    152152
    153 %token MULTassign       DIVassign       MODassign                               // *=   /=      %=/
     153%token EXPassign        MULTassign      DIVassign       MODassign       // \=   *=      /=      %=
    154154%token PLUSassign       MINUSassign                                                     // +=   -=
    155155%token LSassign         RSassign                                                        // <<=  >>=
     
    158158%token ATassign                                                                                 // @=
    159159
    160 %type<tok> identifier  no_attr_identifier  zero_one
     160%type<tok> identifier  no_attr_identifier
    161161%type<tok> identifier_or_type_name  no_attr_identifier_or_type_name  attr_name
    162162%type<constant> string_literal
     
    168168%type<op> ptrref_operator                               unary_operator                          assignment_operator
    169169%type<en> primary_expression                    postfix_expression                      unary_expression
    170 %type<en> cast_expression                               multiplicative_expression       additive_expression                     shift_expression
    171 %type<en> relational_expression                 equality_expression                     AND_expression                          exclusive_OR_expression
    172 %type<en> inclusive_OR_expression               logical_AND_expression          logical_OR_expression           conditional_expression
    173 %type<en> constant_expression                   assignment_expression           assignment_expression_opt
     170%type<en> cast_expression                               exponential_expression          multiplicative_expression       additive_expression
     171%type<en> shift_expression                              relational_expression           equality_expression
     172%type<en> AND_expression                                exclusive_OR_expression         inclusive_OR_expression
     173%type<en> logical_AND_expression                logical_OR_expression
     174%type<en> conditional_expression                constant_expression                     assignment_expression           assignment_expression_opt
    174175%type<en> comma_expression                              comma_expression_opt
    175 %type<en> argument_expression_list              argument_expression                     assignment_opt
     176%type<en> argument_expression_list              argument_expression                     default_initialize_opt
    176177%type<fctl> for_control_expression
    177178%type<en> subrange
     
    181182%type<en> asm_clobbers_list_opt
    182183%type<flag> asm_volatile_opt
     184%type<en> handler_predicate_opt
    183185
    184186// statements
     
    358360        ;
    359361
    360 zero_one:                                                                                               // CFA
    361         ZERO
    362         | ONE
    363         ;
    364 
    365362string_literal:
    366363        string_literal_list                                                     { $$ = build_constantStr( *$1 ); }
     
    382379        IDENTIFIER                                                                                      // typedef name cannot be used as a variable name
    383380                { $$ = new ExpressionNode( build_varref( $1 ) ); }
    384         | zero_one
    385                 { $$ = new ExpressionNode( build_constantZeroOne( *$1 ) ); }
    386381        | tuple
    387382        | '(' comma_expression ')'
     
    483478                        $$ = new ExpressionNode( build_field_name_fraction_constants( build_varref( $1 ), $2 ) );
    484479                }
    485         | zero_one fraction_constants
    486                 {
    487                         $$ = new ExpressionNode( build_field_name_fraction_constants( build_constantZeroOne( *$1 ), $2 ) );
    488                 }
    489480        ;
    490481
     
    537528        | ALIGNOF unary_expression                                                      // GCC, variable alignment
    538529                { $$ = new ExpressionNode( build_alignOfexpr( $2 ) ); }
    539         | ALIGNOF '(' type_no_function ')'                              // GCC, type alignment
     530        | ALIGNOF '(' type_no_function ')'                                      // GCC, type alignment
    540531                { $$ = new ExpressionNode( build_alignOftype( $3 ) ); }
    541532        | OFFSETOF '(' type_no_function ',' no_attr_identifier ')'
     
    569560        | '(' type_no_function ')' cast_expression
    570561                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
     562                // VIRTUAL cannot be opt because of look ahead issues
     563        | '(' VIRTUAL ')' cast_expression
     564                { $$ = new ExpressionNode( build_virtual_cast( nullptr, $4 ) ); }
     565        | '(' VIRTUAL type_no_function ')' cast_expression
     566                { $$ = new ExpressionNode( build_virtual_cast( $3, $5 ) ); }
    571567//      | '(' type_no_function ')' tuple
    572568//              { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
    573569        ;
    574570
     571exponential_expression:
     572        cast_expression
     573        | exponential_expression '\\' cast_expression
     574                { $$ = new ExpressionNode( build_binary_val( OperKinds::Exp, $1, $3 ) ); }
     575        ;
     576
    575577multiplicative_expression:
    576         cast_expression
    577         | multiplicative_expression '*' cast_expression
     578        exponential_expression
     579        | multiplicative_expression '*' exponential_expression
    578580                { $$ = new ExpressionNode( build_binary_val( OperKinds::Mul, $1, $3 ) ); }
    579         | multiplicative_expression '/' cast_expression
     581        | multiplicative_expression '/' exponential_expression
    580582                { $$ = new ExpressionNode( build_binary_val( OperKinds::Div, $1, $3 ) ); }
    581         | multiplicative_expression '%' cast_expression
     583        | multiplicative_expression '%' exponential_expression
    582584                { $$ = new ExpressionNode( build_binary_val( OperKinds::Mod, $1, $3 ) ); }
    583585        ;
     
    678680        '='                                                                                     { $$ = OperKinds::Assign; }
    679681        | ATassign                                                                      { $$ = OperKinds::AtAssn; }
     682        | EXPassign                                                                     { $$ = OperKinds::ExpAssn; }
    680683        | MULTassign                                                            { $$ = OperKinds::MulAssn; }
    681684        | DIVassign                                                                     { $$ = OperKinds::DivAssn; }
     
    939942
    940943with_statement:
    941         WITH identifier_list compound_statement
     944        WITH '(' tuple_expression_list ')' compound_statement
    942945                { $$ = (StatementNode *)0; }                                    // FIX ME
    943946        ;
     
    966969
    967970handler_clause:
    968         // TEMPORARY, TEST EXCEPTIONS
    969         handler_key '(' push push INTEGERconstant pop ')' compound_statement pop
    970                 { $$ = new StatementNode( build_catch( $1, nullptr, new ExpressionNode( build_constantInteger( *$5 ) ), $8 ) ); }
    971         | handler_clause handler_key '(' push push INTEGERconstant pop ')' compound_statement pop
    972                 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, nullptr, new ExpressionNode( build_constantInteger( *$6 ) ), $9 ) ) ); }
    973 
    974         | handler_key '(' push push exception_declaration pop ')' compound_statement pop
    975                 { $$ = new StatementNode( build_catch( $1, $5, nullptr, $8 ) ); }
    976         | handler_clause handler_key '(' push push exception_declaration pop ')' compound_statement pop
    977                 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, $6, nullptr, $9 ) ) ); }
     971        handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop
     972                { $$ = new StatementNode( build_catch( $1, $5, $7, $9 ) ); }
     973        | handler_clause handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop
     974                { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, $6, $8, $10 ) ) ); }
     975        ;
     976
     977handler_predicate_opt:
     978        //empty
     979                { $$ = nullptr; }
     980        | ';' conditional_expression
     981                { $$ = $2; }
    978982        ;
    979983
     
    15021506        | IMAGINARY                                                                                     // C99
    15031507                { $$ = DeclarationNode::newComplexType( DeclarationNode::Imaginary ); }
    1504         | VALIST                                                                                        // GCC, __builtin_va_list
    1505                 { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); }
    15061508        | ZERO_T
    15071509                { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Zero ); }
    15081510        | ONE_T
    15091511                { $$ = DeclarationNode::newBuiltinType( DeclarationNode::One ); }
     1512        | VALIST                                                                                        // GCC, __builtin_va_list
     1513                { $$ = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); }
    15101514        ;
    15111515
     
    18451849cfa_parameter_declaration:                                                              // CFA, new & old style parameter declaration
    18461850        parameter_declaration
    1847         | cfa_identifier_parameter_declarator_no_tuple identifier_or_type_name assignment_opt
     1851        | cfa_identifier_parameter_declarator_no_tuple identifier_or_type_name default_initialize_opt
    18481852                { $$ = $1->addName( $2 ); }
    1849         | cfa_abstract_tuple identifier_or_type_name assignment_opt
     1853        | cfa_abstract_tuple identifier_or_type_name default_initialize_opt
    18501854                // To obtain LR(1), these rules must be duplicated here (see cfa_abstract_declarator).
    18511855                { $$ = $1->addName( $2 ); }
    1852         | type_qualifier_list cfa_abstract_tuple identifier_or_type_name assignment_opt
     1856        | type_qualifier_list cfa_abstract_tuple identifier_or_type_name default_initialize_opt
    18531857                { $$ = $2->addName( $3 )->addQualifiers( $1 ); }
    18541858        | cfa_function_specifier
     
    18671871parameter_declaration:
    18681872                // No SUE declaration in parameter list.
    1869         declaration_specifier_nobody identifier_parameter_declarator assignment_opt
     1873        declaration_specifier_nobody identifier_parameter_declarator default_initialize_opt
    18701874                {
    18711875                        typedefTable.addToEnclosingScope( TypedefTable::ID );
    18721876                        $$ = $2->addType( $1 )->addInitializer( $3 ? new InitializerNode( $3 ) : nullptr );
    18731877                }
    1874         | declaration_specifier_nobody type_parameter_redeclarator assignment_opt
     1878        | declaration_specifier_nobody type_parameter_redeclarator default_initialize_opt
    18751879                {
    18761880                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    18801884
    18811885abstract_parameter_declaration:
    1882         declaration_specifier_nobody assignment_opt
     1886        declaration_specifier_nobody default_initialize_opt
    18831887                { $$ = $1->addInitializer( $2 ? new InitializerNode( $2 ) : nullptr ); }
    1884         | declaration_specifier_nobody abstract_parameter_declarator assignment_opt
     1888        | declaration_specifier_nobody abstract_parameter_declarator default_initialize_opt
    18851889                { $$ = $2->addType( $1 )->addInitializer( $3 ? new InitializerNode( $3 ) : nullptr ); }
    18861890        ;
     
    19261930        | '=' initializer
    19271931                { $$ = $2; }
     1932        | '=' VOID
     1933                { $$ = nullptr; }
    19281934        | ATassign initializer
    19291935                { $$ = $2->set_maybeConstructed( false ); }
     
    22222228        // empty
    22232229                { $$ = (StatementNode *)0; }                                    // FIX ME
    2224         | WITH identifier_list
     2230        | WITH '(' tuple_expression_list ')'
    22252231                { $$ = (StatementNode *)0; }                                    // FIX ME
    22262232        ;
     
    30453051        ;
    30463052
    3047 assignment_opt:
     3053default_initialize_opt:
    30483054        // empty
    30493055                { $$ = nullptr; }
  • src/Parser/parserutility.cc

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 15:30:39 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 28 22:11:32 2017
    13 // Update Count     : 7
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tus Jul 18 10:12:00 2017
     13// Update Count     : 8
    1414//
    1515
     
    2626        UntypedExpr *comparison = new UntypedExpr( new NameExpr( "?!=?" ) );
    2727        comparison->get_args().push_back( orig );
    28         comparison->get_args().push_back( new ConstantExpr( Constant( new ZeroType( emptyQualifiers ), "0", (unsigned long long int)0 ) ) );
     28        comparison->get_args().push_back( new ConstantExpr( Constant( new ZeroType( noQualifiers ), "0", (unsigned long long int)0 ) ) );
    2929        return new CastExpr( comparison, new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
    3030}
  • src/Parser/parserutility.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sat May 16 15:31:46 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 28 22:11:40 2017
    13 // Update Count     : 3
     12// Last Modified On : Sat Jul 22 09:32:58 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef PARSEUTILITY_H
    17 #define PARSEUTILITY_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
    2019
    2120Expression *notZeroExpr( Expression *orig );
    22 
    23 #endif // PARSEUTILITY_H
    2421
    2522// Local Variables: //
  • src/ResolvExpr/Alternative.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sat May 16 23:45:43 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat May 16 23:54:39 2015
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:36:36 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef ALTERNATIVE_H
    17 #define ALTERNATIVE_H
     16#pragma once
    1817
    1918#include <list>
     
    4746} // namespace ResolvExpr
    4847
    49 #endif // ALTERNATIVE_H
    50 
    5148// Local Variables: //
    5249// tab-width: 4 //
  • src/ResolvExpr/AlternativeFinder.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sat May 16 23:52:08 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 09:14:17 2017
    13 // Update Count     : 30
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Jul 26 11:33:00 2017
     13// Update Count     : 31
    1414//
    1515
     
    878878        }
    879879
     880        void AlternativeFinder::visit( VirtualCastExpr * castExpr ) {
     881                assertf( castExpr->get_result(), "Implicate virtual cast targets not yet supported." );
     882                AlternativeFinder finder( indexer, env );
     883                // don't prune here, since it's guaranteed all alternatives will have the same type
     884                // (giving the alternatives different types is half of the point of ConstructorExpr nodes)
     885                finder.findWithAdjustment( castExpr->get_arg(), false );
     886                for ( Alternative & alt : finder.alternatives ) {
     887                        alternatives.push_back( Alternative(
     888                                new VirtualCastExpr( alt.expr->clone(), castExpr->get_result()->clone() ),
     889                                alt.env, alt.cost ) );
     890                }
     891        }
     892
    880893        void AlternativeFinder::visit( UntypedMemberExpr *memberExpr ) {
    881894                AlternativeFinder funcFinder( indexer, env );
  • src/ResolvExpr/AlternativeFinder.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sat May 16 23:56:12 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Apr 19 11:44:53 2016
    13 // Update Count     : 2
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Jul 26 11:24:00 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef ALTERNATIVEFINDER_H
    17 #define ALTERNATIVEFINDER_H
     16#pragma once
    1817
    1918#include <set>
     
    5049                virtual void visit( AddressExpr *addressExpr );
    5150                virtual void visit( CastExpr *castExpr );
     51                virtual void visit( VirtualCastExpr *castExpr );
    5252                virtual void visit( UntypedMemberExpr *memberExpr );
    5353                virtual void visit( MemberExpr *memberExpr );
     
    132132} // namespace ResolvExpr
    133133
    134 #endif // ALTERNATIVEFINDER_H
    135 
    136134// Local Variables: //
    137135// tab-width: 4 //
  • src/ResolvExpr/AlternativePrinter.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 06:55:43 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 06:57:12 2015
    13 // Update Count     : 3
     12// Last Modified On : Sat Jul 22 09:37:09 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef ALTERNATIVEPRINTER_H
    17 #define ALTERNATIVEPRINTER_H
     16#pragma once
    1817
    1918#include <iostream>
     
    3433} // namespace ResolvExpr
    3534
    36 #endif // ALTERNATIVEPRINTER_H
    37 
    3835// Local Variables: //
    3936// tab-width: 4 //
  • src/ResolvExpr/ConversionCost.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 09:37:28 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:35:56 2016
    13 // Update Count     : 3
     12// Last Modified On : Sat Jul 22 09:38:24 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef CONVERSIONCOST_H
    17 #define CONVERSIONCOST_H
     16#pragma once
    1817
    1918#include "SynTree/Visitor.h"
     
    5150} // namespace ResolvExpr
    5251
    53 #endif // CONVERSIONCOST_H */
    54 
    5552// Local Variables: //
    5653// tab-width: 4 //
  • src/ResolvExpr/Cost.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 09:39:50 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jul 22 16:43:10 2015
    13 // Update Count     : 4
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:35:55 2017
     13// Update Count     : 5
    1414//
    1515
    16 #ifndef COST_H
    17 #define COST_H
     16#pragma once
    1817
    1918#include <iostream>
     
    114113} // namespace ResolvExpr
    115114
    116 #endif // COST_H
    117 
    118115// Local Variables: //
    119116// tab-width: 4 //
  • src/ResolvExpr/CurrentObject.cc

    r3d4b23fa r0720e049  
    3838                                return constExpr->get_constant()->get_ival();
    3939                        } else {
    40                                 assertf( false, "Non-integer constant expression in getConstValue", toString( constExpr ).c_str() ); // xxx - might be semantic error
     40                                assertf( false, "Non-integer constant expression in getConstValue %s", toString( constExpr ).c_str() ); // xxx - might be semantic error
    4141                        }
    4242                } else if ( dynamic_cast< OneType * >( constExpr->get_result() ) ) {
     
    163163                                setPosition( castExpr->get_arg() );
    164164                        } else if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( expr ) ) {
    165                                 assertf( dynamic_cast<EnumInstType *> ( varExpr->get_result() ), "ArrayIterator given variable that isn't an enum constant", toString( expr ).c_str() );
     165                                assertf( dynamic_cast<EnumInstType *> ( varExpr->get_result() ), "ArrayIterator given variable that isn't an enum constant : %s", toString( expr ).c_str() );
    166166                                index = 0; // xxx - get actual value of enum constant
    167167                        } else if ( dynamic_cast< SizeofExpr * >( expr ) || dynamic_cast< AlignofExpr * >( expr ) ) {
     
    505505                        curTypes = newTypes;
    506506                        newTypes.clear();
    507                         assertf( desigAlts.size() == curTypes.size(), "Designator alternatives (%d) and current types (%d) out of sync", desigAlts.size(), curTypes.size() );
     507                        assertf( desigAlts.size() == curTypes.size(), "Designator alternatives (%zu) and current types (%zu) out of sync", desigAlts.size(), curTypes.size() );
    508508                } // for
    509509                if ( desigAlts.size() > 1 ) {
  • src/ResolvExpr/CurrentObject.h

    r3d4b23fa r0720e049  
    99// Author           : Rob Schluntz
    1010// Created On       : Thu Jun  8 11:07:25 2017
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Jun  8 11:07:41 2017
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:36:48 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef CURRENT_OBJECT_H
    17 #define CURRENT_OBJECT_H
     16#pragma once
    1817
    1918#include <stack>
     
    5150} // namespace ResolvExpr
    5251
    53 #endif // CURRENT_OBJECT_H
    54 
    5552// Local Variables: //
    5653// tab-width: 4 //
  • src/ResolvExpr/FindOpenVars.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 09:46:04 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 09:47:20 2015
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:35:18 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef FINDOPENVARS_H
    17 #define FINDOPENVARS_H
     16#pragma once
    1817
    1918#include "Unify.h"
     
    2524} // namespace ResolvExpr
    2625
    27 #endif // FINDOPENVARS_H
    28 
    2926// Local Variables: //
    3027// tab-width: 4 //
  • src/ResolvExpr/RenameVars.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 12:10:28 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:36:39 2016
    13 // Update Count     : 3
     12// Last Modified On : Sat Jul 22 09:33:54 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef RESOLVEXPR_RENAMEVARS_H
    17 #define RESOLVEXPR_RENAMEVARS_H
     16#pragma once
    1817
    1918#include <list>
     
    5655} // namespace ResolvExpr
    5756
    58 #endif // RENAMEVARS_H
    59 
    6057// Local Variables: //
    6158// tab-width: 4 //
  • src/ResolvExpr/ResolveTypeof.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 12:14:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 12:16:29 2015
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:38:35 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef RESOLVETYPEOF_H
    17 #define RESOLVETYPEOF_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
     
    2423} // namespace ResolvExpr
    2524
    26 #endif // RESOLVETYPEOF_H
    27 
    2825// Local Variables: //
    2926// tab-width: 4 //
  • src/ResolvExpr/Resolver.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 12:17:01 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 23 17:23:14 2017
    13 // Update Count     : 211
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tus Aug  8 16:06:00 2017
     13// Update Count     : 212
    1414//
    1515
     
    7171                virtual void visit( ReturnStmt *returnStmt ) override;
    7272                virtual void visit( ThrowStmt *throwStmt ) override;
     73                virtual void visit( CatchStmt *catchStmt ) override;
    7374
    7475                virtual void visit( SingleInit *singleInit ) override;
     
    368369
    369370        void Resolver::visit( ThrowStmt *throwStmt ) {
     371                // TODO: Replace *exception type with &exception type.
    370372                if ( throwStmt->get_expr() ) {
    371                         Expression * wrapped = new CastExpr( throwStmt->get_expr(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
     373                        StructDecl * exception_decl =
     374                                lookupStruct( "__cfaehm__base_exception_t" );
     375                        assert( exception_decl );
     376                        Expression * wrapped = new CastExpr(
     377                                throwStmt->get_expr(),
     378                                new PointerType(
     379                                        noQualifiers,
     380                                        new StructInstType(
     381                                                noQualifiers,
     382                                                exception_decl
     383                                                )
     384                                        )
     385                                );
    372386                        Expression * newExpr = findSingleExpression( wrapped, *this );
    373387                        throwStmt->set_expr( newExpr );
     388                }
     389        }
     390
     391        void Resolver::visit( CatchStmt *catchStmt ) {
     392                if ( catchStmt->get_cond() ) {
     393                        Expression * wrapped = new CastExpr(
     394                                catchStmt->get_cond(),
     395                                new BasicType( noQualifiers, BasicType::Bool )
     396                                );
     397                        catchStmt->set_cond( findSingleExpression( wrapped, *this ) );
    374398                }
    375399        }
  • src/ResolvExpr/Resolver.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 12:18:34 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 14 15:06:53 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:36:57 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef RESOLVER_H
    17 #define RESOLVER_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
     
    2928} // namespace ResolvExpr
    3029
    31 #endif // RESOLVER_H
    32 
    3330// Local Variables: //
    3431// tab-width: 4 //
  • src/ResolvExpr/TypeEnvironment.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 12:24:58 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 12:26:52 2015
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:35:45 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef TYPEENVIRONMENT_H
    17 #define TYPEENVIRONMENT_H
     16#pragma once
    1817
    1918#include <string>
     
    9998} // namespace ResolvExpr
    10099
    101 #endif // TYPEENVIRONMENT_H */
    102 
    103100// Local Variables: //
    104101// tab-width: 4 //
  • src/ResolvExpr/TypeMap.h

    r3d4b23fa r0720e049  
    99// Author           : Aaron B. Moss
    1010// Created On       : Fri Feb 19 13:55:00 2016
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Fri Feb 19 13:55:00 2016
    13 // Update Count     : 1
    14 //
    15 
    16 #ifndef _TYPEMAP_H
    17 #define _TYPEMAP_H
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:37:19 2017
     13// Update Count     : 2
     14//
     15
     16#pragma once
    1817
    1918#include <map>
     
    204203}  // namespace ResolvExpr
    205204
    206 #endif // _TYPEMAP_H
    207 
    208205// Local Variables: //
    209206// tab-width: 4 //
  • src/ResolvExpr/Unify.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 13:09:04 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 13:10:34 2015
    13 // Update Count     : 2
     12// Last Modified On : Fri Jul 21 23:09:34 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef UNIFY_H
    17 #define UNIFY_H
     16#pragma once
    1817
    1918#include <map>
     
    7271} // namespace ResolvExpr
    7372
    74 #endif // UNIFY_H
    75 
    7673// Local Variables: //
    7774// tab-width: 4 //
  • src/ResolvExpr/typeops.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 07:28:22 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 07:33:11 2015
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:36:18 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef TYPEOPS_H
    17 #define TYPEOPS_H
     16#pragma once
    1817
    1918#include "SynTree/SynTree.h"
     
    157156} // namespace ResolvExpr
    158157
    159 #endif // TYPEOPS_H
    160 
    161158// Local Variables: //
    162159// tab-width: 4 //
  • src/SymTab/AddVisit.h

    r3d4b23fa r0720e049  
    1414//
    1515
     16#include "SynTree/Statement.h"
     17
    1618namespace SymTab {
    1719        void addDecls( std::list< Declaration* > &declsToAdd, std::list< Statement* > &statements, std::list< Statement* >::iterator i );
     
    2830
    2931                        if ( stmt == stmts.end() ) break;
    30                        
     32
    3133                        // run mutator on statement
    3234                        maybeAccept( *stmt, visitor );
     
    5961
    6062                        if ( decl == translationUnit.end() ) break;
    61                        
     63
    6264                        // run mutator on declaration
    6365                        maybeAccept( *decl, visitor );
  • src/SymTab/Autogen.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Thu Mar 03 15:45:56 2016
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jun 28 15:30:00 2017
    13 // Update Count     : 61
     12// Last Modified On : Fri Jul 14 16:41:00 2017
     13// Update Count     : 62
    1414//
    15 
    16 #include <list>
    17 #include <iterator>
    18 #include "SynTree/Visitor.h"
    19 #include "SynTree/Type.h"
    20 #include "SynTree/Statement.h"
    21 #include "SynTree/TypeSubstitution.h"
    22 #include "Common/utility.h"
    23 #include "AddVisit.h"
    24 #include "MakeLibCfa.h"
    2515#include "Autogen.h"
    26 #include "GenPoly/ScopedSet.h"
    27 #include "Common/ScopedMap.h"
    28 #include "SymTab/Mangler.h"
    29 #include "GenPoly/DeclMutator.h"
     16
     17#include <algorithm>               // for count_if
     18#include <cassert>                 // for safe_dynamic_cast, assert, assertf
     19#include <iterator>                // for back_insert_iterator, back_inserter
     20#include <list>                    // for list, _List_iterator, list<>::iter...
     21#include <set>                     // for set, _Rb_tree_const_iterator
     22#include <vector>                  // for vector
     23
     24#include "AddVisit.h"              // for addVisit
     25#include "Common/ScopedMap.h"      // for ScopedMap<>::const_iterator, Scope...
     26#include "Common/utility.h"        // for cloneAll, operator+
     27#include "GenPoly/DeclMutator.h"   // for DeclMutator
     28#include "GenPoly/ScopedSet.h"     // for ScopedSet, ScopedSet<>::iterator
     29#include "SymTab/Mangler.h"        // for Mangler
     30#include "SynTree/Mutator.h"       // for maybeMutate
     31#include "SynTree/Statement.h"     // for CompoundStmt, ReturnStmt, ExprStmt
     32#include "SynTree/Type.h"          // for FunctionType, Type, TypeInstType
     33#include "SynTree/Visitor.h"       // for maybeAccept, Visitor, acceptAll
     34
     35class Attribute;
    3036
    3137namespace SymTab {
     
    401407        void makeStructFunctions( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd, const std::vector< FuncData > & data ) {
    402408                // Builtins do not use autogeneration.
    403                 if ( aggregateDecl->get_linkage() == LinkageSpec::Builtin ||
     409                if ( aggregateDecl->get_linkage() == LinkageSpec::BuiltinCFA ||
    404410                         aggregateDecl->get_linkage() == LinkageSpec::BuiltinC ) {
    405411                        return;
     
    512518                // Make function polymorphic in same parameters as generic union, if applicable
    513519                const std::list< TypeDecl* > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions
    514                
     520
    515521                // default ctor/dtor need only first parameter
    516522                // void ?{}(T *); void ^?{}(T *);
  • src/SymTab/Autogen.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 21:53:34 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 21 17:25:26 2017
    13 // Update Count     : 14
     12// Last Modified On : Sat Jul 22 09:50:25 2017
     13// Update Count     : 15
    1414//
    1515
    16 #ifndef AUTOGEN_H
    17 #define AUTOGEN_H
     16#pragma once
    1817
    19 #include <string>
    20 #include "SynTree/Statement.h"
    21 #include "SynTree/Expression.h"
    22 #include "SynTree/Declaration.h"
    23 #include "SynTree/Initializer.h"
    24 #include "InitTweak/InitTweak.h"
     18#include <cassert>                // for assert
     19#include <iterator>               // for back_insert_iterator, back_inserter
     20#include <list>                   // for list
     21#include <string>                 // for string, operator==
     22
     23#include "Common/UniqueName.h"    // for UniqueName
     24#include "InitTweak/InitTweak.h"  // for InitExpander
     25#include "Parser/LinkageSpec.h"   // for C
     26#include "SynTree/Constant.h"     // for Constant
     27#include "SynTree/Declaration.h"  // for ObjectDecl, Declaration (ptr only)
     28#include "SynTree/Expression.h"   // for UntypedExpr, NameExpr, VariableExpr
     29#include "SynTree/Initializer.h"  // for SingleInit
     30#include "SynTree/Label.h"        // for Label, noLabels
     31#include "SynTree/Statement.h"    // for Statement (ptr only), CompoundStmt
     32#include "SynTree/Type.h"         // for Type, ArrayType, Type::Qualifiers
    2533
    2634namespace SymTab {
     
    155163                if ( isUnnamedBitfield( obj ) ) return;
    156164
    157                 bool addCast = (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && obj->get_bitfieldWidth() == NULL ) );
     165                bool addCast = (fname == "?{}" || fname == "^?{}") && ( !obj || ( obj && ! obj->get_bitfieldWidth() ) );
    158166                std::list< Statement * > stmts;
    159167                genCall( srcParam, dstParam, fname, back_inserter( stmts ), obj->get_type(), addCast, forward );
     
    174182        }
    175183} // namespace SymTab
    176 #endif // AUTOGEN_H
     184
     185// Local Variables: //
     186// tab-width: 4 //
     187// mode: c++ //
     188// compile-command: "make install" //
     189// End: //
     190
  • src/SymTab/FixFunction.cc

    r3d4b23fa r0720e049  
    1515
    1616#include "FixFunction.h"
    17 #include "SynTree/Declaration.h"
    18 #include "SynTree/Type.h"
    19 #include "SynTree/Expression.h"
    20 #include "Common/utility.h"
     17
     18#include <list>                   // for list
     19
     20#include "Common/utility.h"       // for maybeClone
     21#include "SynTree/Declaration.h"  // for FunctionDecl, ObjectDecl, Declarati...
     22#include "SynTree/Type.h"         // for ArrayType, PointerType, Type, Basic...
    2123
    2224namespace SymTab {
  • src/SymTab/FixFunction.h

    r3d4b23fa r0720e049  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // FixFunction.h -- 
     7// FixFunction.h --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 17:02:08 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:34:06 2016
    13 // Update Count     : 3
     12// Last Modified On : Sat Jul 22 09:45:55 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef FIXFUNCTION_H
    17 #define FIXFUNCTION_H
     16#pragma once
    1817
    19 #include "SynTree/Mutator.h"
     18#include "SynTree/Mutator.h"  // for Mutator
     19#include "SynTree/SynTree.h"  // for Types
    2020
    2121namespace SymTab {
     
    4444                virtual Type* mutate(ZeroType *zeroType);
    4545                virtual Type* mutate(OneType *oneType);
    46  
     46
    4747                bool isVoid;
    4848        };
    4949} // namespace SymTab
    50 
    51 #endif // FIXFUNCTION_H
    5250
    5351// Local Variables: //
  • src/SymTab/ImplementationType.cc

    r3d4b23fa r0720e049  
    1515
    1616#include "ImplementationType.h"
    17 #include "SynTree/Type.h"
    18 #include "SynTree/Declaration.h"
    19 #include "SynTree/Visitor.h"
    20 #include "SymTab/Indexer.h"
    21 #include "Common/utility.h"
     17
     18#include <list>                   // for list, _List_iterator, list<>::iterator
     19
     20#include "SymTab/Indexer.h"       // for Indexer
     21#include "SynTree/Declaration.h"  // for NamedTypeDecl
     22#include "SynTree/Type.h"         // for TupleType, Type, ArrayType, Pointer...
     23#include "SynTree/Visitor.h"      // for Visitor
    2224
    2325
  • src/SymTab/ImplementationType.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 21:35:41 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 21:37:15 2015
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:46:19 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef IMPLEMENTATIONTYPE_H
    17 #define IMPLEMENTATIONTYPE_H
     16#pragma once
    1817
    19 #include "SynTree/SynTree.h"
    20 #include "SymTab/Indexer.h"
     18class Type;
    2119
    2220namespace SymTab {
     21class Indexer;
     22
    2323        Type *implementationType( Type *, const SymTab::Indexer &indexer );
    2424
     
    3131} // namespace SymTab
    3232
    33 #endif // IMPLEMENTATIONTYPE_H
    34 
    3533// Local Variables: //
    3634// tab-width: 4 //
  • src/SymTab/Indexer.cc

    r3d4b23fa r0720e049  
    1616#include "Indexer.h"
    1717
    18 #include <string>
    19 #include <typeinfo>
    20 #include <unordered_map>
    21 #include <unordered_set>
    22 #include <utility>
    23 #include <algorithm>
    24 
    25 #include "Mangler.h"
    26 
    27 #include "Common/utility.h"
    28 
    29 #include "ResolvExpr/typeops.h"
    30 
    31 #include "SynTree/Declaration.h"
    32 #include "SynTree/Type.h"
    33 #include "SynTree/Expression.h"
    34 #include "SynTree/Initializer.h"
    35 #include "SynTree/Statement.h"
    36 
    37 #include "InitTweak/InitTweak.h"
     18#include <cassert>                 // for assert, safe_dynamic_cast
     19#include <iostream>                // for operator<<, basic_ostream, ostream
     20#include <string>                  // for string, operator<<, operator!=
     21#include <unordered_map>           // for operator!=, unordered_map<>::const...
     22#include <unordered_set>           // for unordered_set
     23#include <utility>                 // for pair, make_pair, move
     24
     25#include "Common/SemanticError.h"  // for SemanticError
     26#include "Common/utility.h"        // for cloneAll
     27#include "InitTweak/InitTweak.h"   // for isConstructor, isCopyFunction, isC...
     28#include "Mangler.h"               // for Mangler
     29#include "Parser/LinkageSpec.h"    // for isMangled, isOverridable, Spec
     30#include "ResolvExpr/typeops.h"    // for typesCompatible
     31#include "SynTree/Constant.h"      // for Constant
     32#include "SynTree/Declaration.h"   // for DeclarationWithType, FunctionDecl
     33#include "SynTree/Expression.h"    // for Expression, ImplicitCopyCtorExpr
     34#include "SynTree/Initializer.h"   // for Initializer
     35#include "SynTree/Statement.h"     // for CompoundStmt, Statement, ForStmt (...
     36#include "SynTree/Type.h"          // for Type, StructInstType, UnionInstType
    3837
    3938#define debugPrint(x) if ( doDebug ) { std::cout << x; }
  • src/SymTab/Indexer.h

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 21:38:55 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:34:14 2016
    13 // Update Count     : 6
     12// Last Modified On : Sat Jul 22 09:46:34 2017
     13// Update Count     : 7
    1414//
    1515
    16 #ifndef INDEXER_H
    17 #define INDEXER_H
     16#pragma once
    1817
    19 #include <list>
    20 #include <string>
     18#include <iosfwd>             // for ostream
     19#include <list>               // for list
     20#include <string>             // for string
    2121
    22 #include "SynTree/Visitor.h"
     22#include "SynTree/Visitor.h"  // for Visitor
     23#include "SynTree/SynTree.h"  // for AST nodes
    2324
    2425namespace SymTab {
     
    126127
    127128                struct Impl;
     129
    128130                Impl *tables;         ///< Copy-on-write instance of table data structure
    129131                unsigned long scope;  ///< Scope index of this pointer
     
    145147} // namespace SymTab
    146148
    147 #endif // INDEXER_H
    148 
    149149// Local Variables: //
    150150// tab-width: 4 //
  • src/SymTab/Mangler.cc

    r3d4b23fa r0720e049  
    1313// Update Count     : 21
    1414//
    15 
    16 #include <cassert>
    17 #include <string>
    18 #include <algorithm>
    19 #include <iterator>
    20 #include <functional>
    21 #include <set>
    22 
    23 #include "SynTree/Declaration.h"
    24 #include "SynTree/Type.h"
    25 #include "SynTree/Expression.h"
    26 #include "SynTree/Initializer.h"
    27 #include "SynTree/Statement.h"
    2815#include "Mangler.h"
    29 #include "CodeGen/OperatorTable.h"
     16
     17#include <algorithm>                // for copy, transform
     18#include <cassert>                  // for assert, assertf
     19#include <functional>               // for const_mem_fun_t, mem_fun
     20#include <iterator>                 // for ostream_iterator, back_insert_ite...
     21#include <list>                     // for _List_iterator, list, _List_const...
     22#include <string>                   // for string, operator<<, basic_string
     23
     24#include "CodeGen/OperatorTable.h"  // for OperatorInfo, operatorLookup
     25#include "Common/utility.h"         // for toString
     26#include "Parser/LinkageSpec.h"     // for Spec, isOverridable, AutoGen, Int...
     27#include "SynTree/Declaration.h"    // for TypeDecl, DeclarationWithType
     28#include "SynTree/Expression.h"     // for TypeExpr, Expression, operator<<
     29#include "SynTree/Type.h"           // for Type, ReferenceToType, Type::Fora...
    3030
    3131namespace SymTab {
  • src/SymTab/Mangler.h

    r3d4b23fa r0720e049  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Mangler.h -- 
     7// Mangler.h --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:44:03 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Aug 19 15:48:46 2015
    13 // Update Count     : 14
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:45:30 2017
     13// Update Count     : 15
    1414//
    1515
    16 #ifndef MANGLER_H
    17 #define MANGLER_H
     16#pragma once
    1817
    19 #include <sstream>
    20 #include "SynTree/SynTree.h"
    21 #include "SynTree/Visitor.h"
     18#include <map>                // for map, map<>::value_compare
     19#include <sstream>            // for ostringstream
     20#include <string>             // for string
     21#include <utility>            // for pair
     22
     23#include "SynTree/SynTree.h"  // for Types
     24#include "SynTree/Visitor.h"  // for Visitor, maybeAccept
    2225
    2326namespace SymTab {
     
    4851                virtual void visit( ZeroType *zeroType );
    4952                virtual void visit( OneType *oneType );
    50  
     53
    5154                std::string get_mangleName() { return mangleName.str(); }
    5255          private:
     
    5861                bool mangleOverridable;         ///< Specially mangle overridable built-in methods
    5962                bool typeMode;                  ///< Produce a unique mangled name for a type
    60  
     63
    6164                Mangler( bool mangleOverridable, bool typeMode );
    6265                Mangler( const Mangler & );
    63  
     66
    6467                void mangleDecl( DeclarationWithType *declaration );
    6568                void mangleRef( ReferenceToType *refType, std::string prefix );
    6669                void mangleGenericRef( ReferenceToType *refType, std::string prefix );
    67  
     70
    6871                void printQualifiers( Type *type );
    6972        }; // Mangler
     
    7780} // SymTab
    7881
    79 #endif // MANGLER_H
    80 
    8182// Local Variables: //
    8283// tab-width: 4 //
  • src/SymTab/TypeEquality.cc

    r3d4b23fa r0720e049  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeEquality.cc -- 
     7// TypeEquality.cc --
    88//
    99// Author           : Rob Schluntz
     
    1313// Update Count     : 37
    1414//
    15 
    16 #include <list>
    17 #include <iterator>
    18 #include "Validate.h"
    19 #include "SynTree/Visitor.h"
    20 #include "SynTree/Type.h"
    21 #include "SynTree/Statement.h"
    22 #include "SynTree/TypeSubstitution.h"
    23 #include "Indexer.h"
    2415#include "TypeEquality.h"
     16
     17#include <cassert>                // for assert
     18#include <list>                   // for list, list<>::iterator, _List_iterator
     19#include <string>                 // for operator==, string, basic_string
     20
     21#include "SynTree/Constant.h"     // for Constant
     22#include "SynTree/Declaration.h"  // for DeclarationWithType
     23#include "SynTree/Expression.h"   // for ConstantExpr, Expression
     24#include "SynTree/Type.h"         // for Type, ArrayType, FunctionType, Enum...
     25#include "SynTree/Visitor.h"      // for Visitor
    2526
    2627namespace SymTab {
    2728        class TypeEquality : public Visitor {
    2829  public:
    29                 TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ), 
     30                TypeEquality( Type * other, bool vlaErr ) : result( true ), other( other ),
    3031                        vlaErr( vlaErr ) {}
    3132                bool result;
     
    7172                handleQualifiers( basicType );
    7273                if ( BasicType * bt = dynamic_cast< BasicType * >( other ) ) {
    73                         result = result && basicType->get_kind() == bt->get_kind(); 
     74                        result = result && basicType->get_kind() == bt->get_kind();
    7475                } else {
    7576                        result = false;
     
    9899
    99100                        if ( vlaErr ) {
    100                                 // useful for comparing typedef types - in this case, we 
     101                                // useful for comparing typedef types - in this case, we
    101102                                // want types to appear distinct if either is a VLA type
    102103                                if ( arrayType->get_isVarLen() || at->get_isVarLen() ) {
     
    146147
    147148                        // parameter types must be equivalent
    148                         it1 = funcType->get_parameters().begin(); 
     149                        it1 = funcType->get_parameters().begin();
    149150                        it2 = ft->get_parameters().begin();
    150151                        for ( ; it1 != funcType->get_parameters().end(); ++it1, ++it2 ) {
  • src/SymTab/TypeEquality.h

    r3d4b23fa r0720e049  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // TypeEquality.h -- 
     7// TypeEquality.h --
    88//
    99// Author           : Rob Schluntz
     
    1414//
    1515
     16class Type;
     17
    1618namespace SymTab {
    1719  // compare types t1 and t2 for equality
    18   // if vlaErr is true, then if at least one of the types is a 
    19   // variable-length array type, then the result will be false 
     20  // if vlaErr is true, then if at least one of the types is a
     21  // variable-length array type, then the result will be false
    2022  bool typeEquals( Type * t1, Type * t2, bool vlaErr = false );
    2123} // namespace SymTab
  • src/SymTab/Validate.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:50:04 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 16:50:13 2017
    13 // Update Count     : 357
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tus Aug  8 13:27:00 2017
     13// Update Count     : 358
    1414//
    1515
     
    3838//   definition occurs later in the input.
    3939
    40 #include <algorithm>
    41 #include <iterator>
    42 #include <list>
    43 
    44 #include "CodeGen/CodeGenerator.h"
    45 
    46 #include "Common/PassVisitor.h"
    47 #include "Common/ScopedMap.h"
    48 #include "Common/UniqueName.h"
    49 #include "Common/utility.h"
    50 
    51 #include "Concurrency/Keywords.h"
    52 
    53 #include "GenPoly/DeclMutator.h"
    54 
    55 #include "InitTweak/InitTweak.h"
    56 
    57 #include "AddVisit.h"
    58 #include "Autogen.h"
    59 #include "FixFunction.h"
    60 // #include "ImplementationType.h"
    61 #include "Indexer.h"
    62 #include "MakeLibCfa.h"
    63 #include "TypeEquality.h"
    6440#include "Validate.h"
    6541
    66 #include "ResolvExpr/typeops.h"
    67 
    68 #include "SynTree/Attribute.h"
    69 #include "SynTree/Expression.h"
    70 #include "SynTree/Mutator.h"
    71 #include "SynTree/Statement.h"
    72 #include "SynTree/Type.h"
    73 #include "SynTree/TypeSubstitution.h"
    74 #include "SynTree/Visitor.h"
     42#include <cstddef>                     // for size_t
     43#include <algorithm>                   // for move, transform
     44#include <cassert>                     // for safe_dynamic_cast, assertf
     45#include <iterator>                    // for back_inserter, inserter, back_...
     46#include <list>                        // for list, _List_iterator, list<>::...
     47#include <map>                         // for _Rb_tree_iterator, map, map<>:...
     48#include <memory>                      // for unique_ptr, allocator
     49#include <string>                      // for string, operator+, operator==
     50#include <tuple>                       // for get
     51#include <utility>                     // for pair, make_pair
     52
     53#include "AddVisit.h"                  // for addVisit
     54#include "Autogen.h"                   // for SizeType, autogenerateRoutines
     55#include "CodeGen/CodeGenerator.h"     // for genName
     56#include "Common/PassVisitor.h"        // for PassVisitor, WithDeclsToAdd
     57#include "Common/ScopedMap.h"          // for ScopedMap<>::const_iterator
     58#include "Common/SemanticError.h"      // for SemanticError
     59#include "Common/UniqueName.h"         // for UniqueName
     60#include "Common/utility.h"            // for operator+, cloneAll, deleteAll
     61#include "Concurrency/Keywords.h"      // for applyKeywords, implementMutexF...
     62#include "FixFunction.h"               // for FixFunction
     63#include "Indexer.h"                   // for Indexer
     64#include "InitTweak/InitTweak.h"       // for isCtorDtor, isCtorDtorAssign
     65#include "Parser/LinkageSpec.h"        // for C, Cforall
     66#include "ResolvExpr/typeops.h"        // for extractResultType, typesCompat...
     67#include "SynTree/Attribute.h"         // for Attribute
     68#include "SynTree/Constant.h"          // for Constant
     69#include "SynTree/Declaration.h"       // for EnumDecl, StructDecl, UnionDecl
     70#include "SynTree/Expression.h"        // for TypeExpr, CompoundLiteralExpr
     71#include "SynTree/Initializer.h"       // for ListInit, Initializer, noDesig...
     72#include "SynTree/Mutator.h"           // for mutateAll, Mutator
     73#include "SynTree/Statement.h"         // for CompoundStmt, DeclStmt, Return...
     74#include "SynTree/Type.h"              // for Type, TypeInstType, TraitInstType
     75#include "SynTree/TypeSubstitution.h"  // for TypeSubstitution, applySubstit...
     76#include "SynTree/Visitor.h"           // for acceptAll, Visitor
    7577
    7678#define debugPrint( x ) if ( doDebug ) { std::cout << x; }
     
    605607                // a return statement in a void-returning function in C. The expression is treated as if it
    606608                // were cast to void.
    607                 if ( returnStmt->get_expr() == NULL && returnVals.size() != 0 ) {
     609                if ( ! returnStmt->get_expr() && returnVals.size() != 0 ) {
    608610                        throw SemanticError( "Non-void function returns no values: " , returnStmt );
    609611                }
     
    684686                Type *designatorType = tyDecl->get_base()->stripDeclarator();
    685687                if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( designatorType ) ) {
    686                         return new StructDecl( aggDecl->get_name() );
     688                        return new StructDecl( aggDecl->get_name(), DeclarationNode::Struct, noAttributes, tyDecl->get_linkage() );
    687689                } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) {
    688                         return new UnionDecl( aggDecl->get_name() );
     690                        return new UnionDecl( aggDecl->get_name(), noAttributes, tyDecl->get_linkage() );
    689691                } else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( designatorType ) ) {
    690                         return new EnumDecl( enumDecl->get_name() );
     692                        return new EnumDecl( enumDecl->get_name(), noAttributes, tyDecl->get_linkage() );
    691693                } else {
    692694                        return ret->clone();
     
    781783                                type = new EnumInstType( Type::Qualifiers(), newDeclEnumDecl->get_name() );
    782784                        } // if
    783                         TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type ) );
     785                        TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type, aggDecl->get_linkage() ) );
    784786                        typedefNames[ aggDecl->get_name() ] = std::make_pair( std::move( tyDecl ), scopeLevel );
    785787                } // if
     
    836838        void validateGeneric( Aggr * inst ) {
    837839                std::list< TypeDecl * > * params = inst->get_baseParameters();
    838                 if ( params != NULL ) {
     840                if ( params ) {
    839841                        std::list< Expression * > & args = inst->get_parameters();
    840842
     
    901903                FunctionType * ftype = functionDecl->get_functionType();
    902904                std::list< DeclarationWithType * > & retVals = ftype->get_returnVals();
    903                 assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %d", functionDecl->get_name().c_str(), retVals.size() );
     905                assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %zu", functionDecl->get_name().c_str(), retVals.size() );
    904906                if ( retVals.size() == 1 ) {
    905907                        // ensure all function return values have a name - use the name of the function to disambiguate (this also provides a nice bit of help for debugging).
     
    937939        void ArrayLength::previsit( ObjectDecl * objDecl ) {
    938940                if ( ArrayType * at = dynamic_cast< ArrayType * >( objDecl->get_type() ) ) {
    939                         if ( at->get_dimension() != nullptr ) return;
     941                        if ( at->get_dimension() ) return;
    940942                        if ( ListInit * init = dynamic_cast< ListInit * >( objDecl->get_init() ) ) {
    941943                                at->set_dimension( new ConstantExpr( Constant::from_ulong( init->get_initializers().size() ) ) );
  • src/SymTab/Validate.h

    r3d4b23fa r0720e049  
    1111// Created On       : Sun May 17 21:53:34 2015
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Tue May 19 16:49:43 2015
    14 // Update Count     : 3
     13// Last Modified On : Sat Jul 22 09:46:07 2017
     14// Update Count     : 4
    1515//
    1616
    17 #ifndef VALIDATE_H
    18 #define VALIDATE_H
     17#pragma once
    1918
    20 #include "SynTree/SynTree.h"
     19#include <list>  // for list
     20
     21class Declaration;
     22class Type;
    2123
    2224namespace SymTab {
     
    2830} // namespace SymTab
    2931
    30 #endif // VALIDATE_H
    31 
    3232// Local Variables: //
    3333// tab-width: 4 //
  • src/SymTab/module.mk

    r3d4b23fa r0720e049  
    1010## Author           : Richard C. Bilson
    1111## Created On       : Mon Jun  1 17:49:17 2015
    12 ## Last Modified By : Rob Schluntz
    13 ## Last Modified On : Tue Jul 07 16:22:23 2015
    14 ## Update Count     : 2
     12## Last Modified By : Andrew Beach
     13## Last Modified On : Thr Aug 10 16:08:00 2017
     14## Update Count     : 4
    1515###############################################################################
    1616
  • src/SynTree/AddStmtVisitor.h

    r3d4b23fa r0720e049  
    1010// Created On       : Wed Jun 22 12:05:48 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:50:32 2016
    13 // Update Count     : 8
     12// Last Modified On : Sat Jul 22 09:51:08 2017
     13// Update Count     : 9
    1414//
    1515
    16 #ifndef ADD_STATEMENT_VISITOR_H
    17 #define ADD_STATEMENT_VISITOR_H
     16#pragma once
    1817
    1918#include <list>
     
    4241};
    4342
    44 #endif // ADD_STATEMENT_VISITOR_H
     43// Local Variables: //
     44// tab-width: 4 //
     45// mode: c++ //
     46// compile-command: "make install" //
     47// End: //
  • src/SynTree/AggregateDecl.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Sun May 17 23:56:39 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tus Jun 27 15:30:00 2017
    13 // Update Count     : 21
     12// Last Modified On : Fri Aug  4 14:22:00 2017
     13// Update Count     : 22
    1414//
    1515
     
    4040        using std::endl;
    4141
    42         os << typeString() << " " << get_name();
    43         os << string( indent+2, ' ' ) << "with body " << has_body() << endl;
     42        os << typeString() << " " << get_name() << ":";
     43        if ( get_linkage() != LinkageSpec::Cforall ) {
     44                os << " " << LinkageSpec::linkageName( get_linkage() );
     45        } // if
     46        os << " with body " << has_body() << endl;
    4447
    4548        if ( ! parameters.empty() ) {
  • src/SynTree/ApplicationExpr.cc

    r3d4b23fa r0720e049  
    4444}
    4545
    46 ApplicationExpr::ApplicationExpr( Expression *funcExpr ) : function( funcExpr ) {
     46ApplicationExpr::ApplicationExpr( Expression *funcExpr, const std::list< Expression * > & argList ) : function( funcExpr ), args( argList ) {
    4747        PointerType *pointer = safe_dynamic_cast< PointerType* >( funcExpr->get_result() );
    4848        FunctionType *function = safe_dynamic_cast< FunctionType* >( pointer->get_base() );
  • src/SynTree/Attribute.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 18 16:27:11 2017
    13 // Update Count     : 38
     12// Last Modified On : Sat Jul 22 09:54:14 2017
     13// Update Count     : 39
    1414//
    1515
    16 #ifndef GCC_ATTRIBUTE_H
    17 #define GCC_ATTRIBUTE_H
     16#pragma once
    1817
    1918#include "SynTree.h"
     
    4241const std::list< Attribute * > noAttributes;
    4342
    44 #endif
    45 
    4643// Local Variables: //
    4744// tab-width: 4 //
  • src/SynTree/BaseSyntaxNode.h

    r3d4b23fa r0720e049  
    1414//
    1515
    16 #ifndef BASE_SYNTAX_NODE_H
    17 #define BASE_SYNTAX_NODE_H
     16#pragma once
    1817
    1918#include "Common/utility.h"
     
    2928};
    3029
    31 #endif // BASE_SYNTAX_NODE_H
    32 
    3330// Local Variables: //
    3431// tab-width: 4 //
  • src/SynTree/Constant.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Jun 22 10:11:00 2017
    13 // Update Count     : 28
     12// Last Modified On : Fri Jul 14 14:50:00 2017
     13// Update Count     : 29
    1414//
    1515
     
    4646}
    4747
     48Constant Constant::null( Type * ptrtype ) {
     49        if ( nullptr == ptrtype ) {
     50                ptrtype = new PointerType(
     51                        Type::Qualifiers(),
     52                        new VoidType( Type::Qualifiers() )
     53                        );
     54        }
     55
     56        return Constant( ptrtype, "0", (unsigned long long int)0 );
     57}
     58
    4859unsigned long long Constant::get_ival() const {
    4960        assertf( safe_dynamic_cast<BasicType*>(type)->isInteger(), "Attempt to retrieve ival from non-integer constant." );
  • src/SynTree/Constant.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Jun 22 10:13:00 2017
    13 // Update Count     : 15
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:54:46 2017
     13// Update Count     : 17
    1414//
    1515
    16 #ifndef CONSTANT_H
    17 #define CONSTANT_H
     16#pragma once
    1817
    1918#include "SynTree.h"
     
    4443        static Constant from_double( double d );
    4544
     45        /// generates a null pointer value for the given type. void * if omitted.
     46        static Constant null( Type * ptrtype = nullptr );
     47
    4648        virtual void accept( Visitor & v ) { v.visit( this ); }
    4749        virtual Constant * acceptMutator( Mutator & m ) { return m.mutate( this ); }
     
    5860};
    5961
    60 #endif // CONSTANT_H
    61 
    6262// Local Variables: //
    6363// tab-width: 4 //
  • src/SynTree/Declaration.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 07:49:18 2017
    13 // Update Count     : 24
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  9 14:38:00 2017
     13// Update Count     : 25
    1414//
    1515
     
    2828
    2929Declaration::Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage )
    30                 : name( name ), storageClasses( scs ), linkage( linkage ), uniqueId( 0 ) {
     30                : name( name ), linkage( linkage ), storageClasses( scs ), uniqueId( 0 ) {
    3131}
    3232
    3333Declaration::Declaration( const Declaration &other )
    34         : BaseSyntaxNode( other ), name( other.name ), storageClasses( other.storageClasses ), linkage( other.linkage ), uniqueId( other.uniqueId ) {
     34        : BaseSyntaxNode( other ), name( other.name ), linkage( other.linkage ), extension( other.extension ), storageClasses( other.storageClasses ), uniqueId( other.uniqueId ) {
    3535}
    3636
  • src/SynTree/Declaration.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tus Jun 27 15:31:00 2017
    13 // Update Count     : 122
    14 //
    15 
    16 #ifndef DECLARATION_H
    17 #define DECLARATION_H
     12// Last Modified On : Wed Aug  9 14:45:00 2017
     13// Update Count     : 126
     14//
     15
     16#pragma once
    1817
    1918#include <string>
     
    2827class Declaration : public BaseSyntaxNode {
    2928  public:
     29        std::string name;
     30        LinkageSpec::Spec linkage;
     31        bool extension = false;
     32
    3033        Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage );
    3134        Declaration( const Declaration &other );
     
    5457        static void dumpIds( std::ostream &os );
    5558        static Declaration *declFromId( UniqueId id );
    56   private:
    57         std::string name;
     59
     60  private:
    5861        Type::StorageClasses storageClasses;
    59         LinkageSpec::Spec linkage;
    6062        UniqueId uniqueId;
    61         bool extension = false;
    6263};
    6364
    6465class DeclarationWithType : public Declaration {
    6566  public:
    66         DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs );
    67         DeclarationWithType( const DeclarationWithType &other );
    68         virtual ~DeclarationWithType();
    69 
    70         std::string get_mangleName() const { return mangleName; }
    71         DeclarationWithType * set_mangleName( std::string newValue ) { mangleName = newValue; return this; }
    72 
    73         std::string get_scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }
    74 
    75         int get_scopeLevel() const { return scopeLevel; }
    76         DeclarationWithType * set_scopeLevel( int newValue ) { scopeLevel = newValue; return this; }
    77 
    78         ConstantExpr *get_asmName() const { return asmName; }
    79         DeclarationWithType * set_asmName( ConstantExpr *newValue ) { asmName = newValue; return this; }
    80 
    81         std::list< Attribute * >& get_attributes() { return attributes; }
    82         const std::list< Attribute * >& get_attributes() const { return attributes; }
    83 
    84         Type::FuncSpecifiers get_funcSpec() const { return fs; }
    85         //void set_functionSpecifiers( Type::FuncSpecifiers newValue ) { fs = newValue; }
    86 
    87         virtual DeclarationWithType *clone() const = 0;
    88         virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
    89 
    90         virtual Type *get_type() const = 0;
    91         virtual void set_type(Type *) = 0;
    92   private:
    9367        // this represents the type with all types and typedefs expanded it is generated by SymTab::Validate::Pass2
    9468        std::string mangleName;
     
    9872        ConstantExpr *asmName;
    9973        std::list< Attribute * > attributes;
     74
     75        DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs );
     76        DeclarationWithType( const DeclarationWithType &other );
     77        virtual ~DeclarationWithType();
     78
     79        std::string get_mangleName() const { return mangleName; }
     80        DeclarationWithType * set_mangleName( std::string newValue ) { mangleName = newValue; return this; }
     81
     82        std::string get_scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }
     83
     84        int get_scopeLevel() const { return scopeLevel; }
     85        DeclarationWithType * set_scopeLevel( int newValue ) { scopeLevel = newValue; return this; }
     86
     87        ConstantExpr *get_asmName() const { return asmName; }
     88        DeclarationWithType * set_asmName( ConstantExpr *newValue ) { asmName = newValue; return this; }
     89
     90        std::list< Attribute * >& get_attributes() { return attributes; }
     91        const std::list< Attribute * >& get_attributes() const { return attributes; }
     92
     93        Type::FuncSpecifiers get_funcSpec() const { return fs; }
     94        //void set_functionSpecifiers( Type::FuncSpecifiers newValue ) { fs = newValue; }
     95
     96        virtual DeclarationWithType *clone() const = 0;
     97        virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
     98
     99        virtual Type *get_type() const = 0;
     100        virtual void set_type(Type *) = 0;
     101
     102  private:
    100103        Type::FuncSpecifiers fs;
    101104};
     
    104107        typedef DeclarationWithType Parent;
    105108  public:
     109        Type *type;
     110        Initializer *init;
     111        Expression *bitfieldWidth;
     112
    106113        ObjectDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init,
    107114                                const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
     
    123130        virtual void print( std::ostream &os, int indent = 0 ) const;
    124131        virtual void printShort( std::ostream &os, int indent = 0 ) const;
    125   private:
    126         Type *type;
    127         Initializer *init;
    128         Expression *bitfieldWidth;
    129132};
    130133
     
    132135        typedef DeclarationWithType Parent;
    133136  public:
     137        FunctionType *type;
     138        CompoundStmt *statements;
     139
    134140        FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements,
    135141                                  const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
     
    150156        virtual void print( std::ostream &os, int indent = 0 ) const;
    151157        virtual void printShort( std::ostream &os, int indent = 0 ) const;
    152   private:
    153         FunctionType *type;
    154         CompoundStmt *statements;
    155158};
    156159
     
    158161        typedef Declaration Parent;
    159162  public:
     163        Type *base;
     164        std::list< TypeDecl* > parameters;
     165        std::list< DeclarationWithType* > assertions;
     166
    160167        NamedTypeDecl( const std::string &name, Type::StorageClasses scs, Type *type );
    161168        NamedTypeDecl( const NamedTypeDecl &other );
     
    172179        virtual void print( std::ostream &os, int indent = 0 ) const;
    173180        virtual void printShort( std::ostream &os, int indent = 0 ) const;
    174   protected:
    175   private:
    176         Type *base;
    177         std::list< TypeDecl* > parameters;
    178         std::list< DeclarationWithType* > assertions;
    179181};
    180182
     
    183185  public:
    184186        enum Kind { Any, Dtype, Ftype, Ttype };
     187
     188        Type * init;
     189        bool sized;
     190
    185191        /// Data extracted from a type decl
    186192        struct Data {
     
    217223  private:
    218224        Kind kind;
    219         Type * init;
    220         bool sized;
    221225};
    222226
     
    224228        typedef NamedTypeDecl Parent;
    225229  public:
    226         TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type ) : Parent( name, scs, type ) {}
     230        TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall ) : Parent( name, scs, type ) { set_linkage( spec ); }
    227231        TypedefDecl( const TypedefDecl &other ) : Parent( other ) {}
    228232
     
    238242        typedef Declaration Parent;
    239243  public:
    240         AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );
    241         AggregateDecl( const AggregateDecl &other );
    242         virtual ~AggregateDecl();
    243 
    244         std::list<Declaration*>& get_members() { return members; }
    245         std::list<TypeDecl*>& get_parameters() { return parameters; }
    246 
    247         std::list< Attribute * >& get_attributes() { return attributes; }
    248         const std::list< Attribute * >& get_attributes() const { return attributes; }
    249 
    250         bool has_body() const { return body; }
    251         AggregateDecl * set_body( bool body ) { AggregateDecl::body = body; return this; }
    252 
    253         virtual void print( std::ostream &os, int indent = 0 ) const;
    254         virtual void printShort( std::ostream &os, int indent = 0 ) const;
    255   protected:
    256         virtual std::string typeString() const = 0;
    257 
    258   private:
    259244        std::list<Declaration*> members;
    260245        std::list<TypeDecl*> parameters;
    261246        bool body;
    262247        std::list< Attribute * > attributes;
     248
     249        AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );
     250        AggregateDecl( const AggregateDecl &other );
     251        virtual ~AggregateDecl();
     252
     253        std::list<Declaration*>& get_members() { return members; }
     254        std::list<TypeDecl*>& get_parameters() { return parameters; }
     255
     256        std::list< Attribute * >& get_attributes() { return attributes; }
     257        const std::list< Attribute * >& get_attributes() const { return attributes; }
     258
     259        bool has_body() const { return body; }
     260        AggregateDecl * set_body( bool body ) { AggregateDecl::body = body; return this; }
     261
     262        virtual void print( std::ostream &os, int indent = 0 ) const;
     263        virtual void printShort( std::ostream &os, int indent = 0 ) const;
     264  protected:
     265        virtual std::string typeString() const = 0;
    263266};
    264267
     
    266269        typedef AggregateDecl Parent;
    267270  public:
    268         StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ) {}
     271        StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ), tagged( false ), parent_name( "" ) {}
     272        StructDecl( const std::string &name, const std::string *parent, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( DeclarationNode::Struct ), tagged( true ), parent_name( parent ? *parent : "" ) {}
    269273        StructDecl( const StructDecl &other ) : Parent( other ) {}
    270274
     
    273277        bool is_thread() { return kind == DeclarationNode::Thread; }
    274278
     279        // Tagged/Tree Structure Excetion
     280        bool get_tagged() { return tagged; }
     281        void set_tagged( bool newValue ) { tagged = newValue; }
     282        bool has_parent() { return parent_name != ""; }
     283        std::string get_parentName() { return parent_name; }
     284
    275285        virtual StructDecl *clone() const { return new StructDecl( *this ); }
    276286        virtual void accept( Visitor &v ) { v.visit( this ); }
     
    279289        DeclarationNode::Aggregate kind;
    280290        virtual std::string typeString() const;
     291
     292        bool tagged;
     293        std::string parent_name;
    281294};
    282295
     
    324337class AsmDecl : public Declaration {
    325338  public:
     339        AsmStmt *stmt;
     340
    326341        AsmDecl( AsmStmt *stmt );
    327342        AsmDecl( const AsmDecl &other );
     
    336351        virtual void print( std::ostream &os, int indent = 0 ) const;
    337352        virtual void printShort( std::ostream &os, int indent = 0 ) const;
    338   private:
    339         AsmStmt *stmt;
    340353};
    341354
    342355std::ostream & operator<<( std::ostream & out, const Declaration * decl );
    343356std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data );
    344 
    345 #endif // DECLARATION_H
    346357
    347358// Local Variables: //
  • src/SynTree/Expression.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 16:41:13 2017
    13 // Update Count     : 52
     12// Last Modified On : Tue Jul 25 14:15:47 2017
     13// Update Count     : 54
    1414//
    1515
     
    298298        if ( result->isVoid() ) {
    299299                os << "nothing";
     300        } else {
     301                result->print( os, indent+2 );
     302        } // if
     303        os << std::endl;
     304        Expression::print( os, indent );
     305}
     306
     307VirtualCastExpr::VirtualCastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) {
     308        set_result(toType);
     309}
     310
     311VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) {
     312}
     313
     314VirtualCastExpr::~VirtualCastExpr() {
     315        delete arg;
     316}
     317
     318void VirtualCastExpr::print( std::ostream &os, int indent ) const {
     319        os << "Virtual Cast of:" << std::endl << std::string( indent+2, ' ' );
     320        arg->print(os, indent+2);
     321        os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl;
     322        os << std::string( indent+2, ' ' );
     323        if ( ! result ) {
     324                os << "unknown";
    300325        } else {
    301326                result->print( os, indent+2 );
     
    503528}
    504529
    505 AsmExpr::AsmExpr( const AsmExpr & other ) : inout( maybeClone( other.inout ) ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {}
     530AsmExpr::AsmExpr( const AsmExpr & other ) : Expression( other ), inout( maybeClone( other.inout ) ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {}
    506531
    507532
  • src/SynTree/Expression.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 16:44:00 2017
    13 // Update Count     : 41
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Fri Aug  8 11:54:00 2017
     13// Update Count     : 44
    1414//
    1515
    16 #ifndef EXPRESSION_H
    17 #define EXPRESSION_H
     16#pragma once
    1817
    1918#include <map>
     
    3029class Expression : public BaseSyntaxNode{
    3130  public:
     31        Type * result;
     32        TypeSubstitution * env;
     33        Expression * argName; // if expression is used as an argument, it can be "designated" by this name
     34        bool extension = false;
     35
    3236        Expression( Expression * _aname = nullptr );
    3337        Expression( const Expression & other );
     
    5054        virtual Expression * acceptMutator( Mutator & m ) = 0;
    5155        virtual void print( std::ostream & os, int indent = 0 ) const;
    52   protected:
    53         Type * result;
    54         TypeSubstitution * env;
    55         Expression * argName; // if expression is used as an argument, it can be "designated" by this name
    56         bool extension = false;
    5756};
    5857
     
    8079class ApplicationExpr : public Expression {
    8180  public:
    82         ApplicationExpr( Expression * function );
     81        Expression * function;
     82
     83        ApplicationExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() );
    8384        ApplicationExpr( const ApplicationExpr & other );
    8485        virtual ~ApplicationExpr();
     
    9394        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    9495        virtual void print( std::ostream & os, int indent = 0 ) const;
     96
    9597  private:
    96         Expression * function;
    9798        std::list<Expression *> args;
    9899        InferredParams inferParams;
     
    104105class UntypedExpr : public Expression {
    105106  public:
     107        Expression * function;
     108        std::list<Expression*> args;
     109
    106110        UntypedExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >(), Expression *_aname = nullptr );
    107111        UntypedExpr( const UntypedExpr & other );
     
    124128        virtual void print( std::ostream & os, int indent = 0 ) const;
    125129        virtual void printArgs(std::ostream & os, int indent = 0) const;
    126   private:
    127         Expression * function;
    128         std::list<Expression*> args;
    129130};
    130131
     
    132133class NameExpr : public Expression {
    133134  public:
     135        std::string name;
     136
    134137        NameExpr( std::string name, Expression *_aname = nullptr );
    135138        NameExpr( const NameExpr & other );
     
    143146        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    144147        virtual void print( std::ostream & os, int indent = 0 ) const;
    145   private:
    146         std::string name;
    147148};
    148149
     
    153154class AddressExpr : public Expression {
    154155  public:
     156        Expression * arg;
     157
    155158        AddressExpr( Expression * arg, Expression *_aname = nullptr );
    156159        AddressExpr( const AddressExpr & other );
     
    164167        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    165168        virtual void print( std::ostream & os, int indent = 0 ) const;
    166   private:
    167         Expression * arg;
    168169};
    169170
     
    171172class LabelAddressExpr : public Expression {
    172173  public:
     174        Expression * arg;
     175
    173176        LabelAddressExpr( Expression * arg );
    174177        LabelAddressExpr( const LabelAddressExpr & other );
     
    182185        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    183186        virtual void print( std::ostream & os, int indent = 0 ) const;
    184   private:
    185         Expression * arg;
    186187};
    187188
     
    189190class CastExpr : public Expression {
    190191  public:
     192        Expression * arg;
     193
    191194        CastExpr( Expression * arg, Expression *_aname = nullptr );
    192195        CastExpr( Expression * arg, Type * toType, Expression *_aname = nullptr );
     
    195198
    196199        Expression * get_arg() const { return arg; }
    197         void set_arg(Expression * newValue ) { arg = newValue; }
     200        void set_arg( Expression * newValue ) { arg = newValue; }
    198201
    199202        virtual CastExpr * clone() const { return new CastExpr( * this ); }
     
    201204        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    202205        virtual void print( std::ostream & os, int indent = 0 ) const;
    203   private:
     206};
     207
     208/// VirtualCastExpr repersents a virtual dynamic cast, e.g. (virtual exception)e
     209class VirtualCastExpr : public Expression {
     210  public:
    204211        Expression * arg;
     212
     213        VirtualCastExpr( Expression * arg, Type * toType );
     214        VirtualCastExpr( const VirtualCastExpr & other );
     215        virtual ~VirtualCastExpr();
     216
     217        Expression * get_arg() const { return arg; }
     218        void set_arg( Expression * newValue ) { arg = newValue; }
     219
     220        virtual VirtualCastExpr * clone() const { return new VirtualCastExpr( * this ); }
     221        virtual void accept( Visitor & v ) { v.visit( this ); }
     222        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
     223        virtual void print( std::ostream & os, int indent = 0 ) const;
    205224};
    206225
     
    208227class UntypedMemberExpr : public Expression {
    209228  public:
     229        Expression * member;
     230        Expression * aggregate;
     231
    210232        UntypedMemberExpr( Expression * member, Expression * aggregate, Expression *_aname = nullptr );
    211233        UntypedMemberExpr( const UntypedMemberExpr & other );
     
    221243        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    222244        virtual void print( std::ostream & os, int indent = 0 ) const;
    223   private:
    224         Expression * member;
    225         Expression * aggregate;
    226245};
    227246
     
    230249class MemberExpr : public Expression {
    231250  public:
     251        DeclarationWithType * member;
     252        Expression * aggregate;
     253
    232254        MemberExpr( DeclarationWithType * member, Expression * aggregate, Expression *_aname = nullptr );
    233255        MemberExpr( const MemberExpr & other );
     
    243265        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    244266        virtual void print( std::ostream & os, int indent = 0 ) const;
    245   private:
    246         DeclarationWithType * member;
    247         Expression * aggregate;
    248267};
    249268
     
    252271class VariableExpr : public Expression {
    253272  public:
     273        DeclarationWithType * var;
     274
    254275        VariableExpr( DeclarationWithType * var, Expression *_aname = nullptr );
    255276        VariableExpr( const VariableExpr & other );
     
    263284        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    264285        virtual void print( std::ostream & os, int indent = 0 ) const;
    265   private:
    266         DeclarationWithType * var;
    267286};
    268287
     
    270289class ConstantExpr : public Expression {
    271290  public:
     291        Constant constant;
     292
    272293        ConstantExpr( Constant constant, Expression *_aname = nullptr );
    273294        ConstantExpr( const ConstantExpr & other );
     
    281302        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    282303        virtual void print( std::ostream & os, int indent = 0 ) const;
    283   private:
    284         Constant constant;
    285304};
    286305
     
    288307class SizeofExpr : public Expression {
    289308  public:
     309        Expression * expr;
     310        Type * type;
     311        bool isType;
     312
    290313        SizeofExpr( Expression * expr, Expression *_aname = nullptr );
    291314        SizeofExpr( const SizeofExpr & other );
     
    304327        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    305328        virtual void print( std::ostream & os, int indent = 0 ) const;
    306   private:
     329};
     330
     331/// AlignofExpr represents an alignof expression
     332class AlignofExpr : public Expression {
     333  public:
    307334        Expression * expr;
    308335        Type * type;
    309336        bool isType;
    310 };
    311 
    312 /// AlignofExpr represents an alignof expression
    313 class AlignofExpr : public Expression {
    314   public:
     337
    315338        AlignofExpr( Expression * expr, Expression *_aname = nullptr );
    316339        AlignofExpr( const AlignofExpr & other );
     
    329352        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    330353        virtual void print( std::ostream & os, int indent = 0 ) const;
    331   private:
    332         Expression * expr;
    333         Type * type;
    334         bool isType;
    335354};
    336355
     
    338357class UntypedOffsetofExpr : public Expression {
    339358  public:
     359        Type * type;
     360        std::string member;
     361
    340362        UntypedOffsetofExpr( Type * type, const std::string & member, Expression *_aname = nullptr );
    341363        UntypedOffsetofExpr( const UntypedOffsetofExpr & other );
     
    351373        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    352374        virtual void print( std::ostream & os, int indent = 0 ) const;
    353   private:
    354         Type * type;
    355         std::string member;
    356375};
    357376
     
    359378class OffsetofExpr : public Expression {
    360379  public:
     380        Type * type;
     381        DeclarationWithType * member;
     382
    361383        OffsetofExpr( Type * type, DeclarationWithType * member, Expression *_aname = nullptr );
    362384        OffsetofExpr( const OffsetofExpr & other );
     
    372394        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    373395        virtual void print( std::ostream & os, int indent = 0 ) const;
    374   private:
    375         Type * type;
    376         DeclarationWithType * member;
    377396};
    378397
     
    380399class OffsetPackExpr : public Expression {
    381400public:
     401        StructInstType * type;
     402
    382403        OffsetPackExpr( StructInstType * type_, Expression * aname_ = 0 );
    383404        OffsetPackExpr( const OffsetPackExpr & other );
     
    390411        virtual void accept( Visitor & v ) { v.visit( this ); }
    391412        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    392 
    393         virtual void print( std::ostream & os, int indent = 0 ) const;
    394 
    395 private:
    396         StructInstType * type;
     413        virtual void print( std::ostream & os, int indent = 0 ) const;
    397414};
    398415
     
    400417class AttrExpr : public Expression {
    401418  public:
     419        Expression * attr;
     420        Expression * expr;
     421        Type * type;
     422        bool isType;
     423
    402424        AttrExpr(Expression * attr, Expression * expr, Expression *_aname = nullptr );
    403425        AttrExpr( const AttrExpr & other );
     
    418440        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    419441        virtual void print( std::ostream & os, int indent = 0 ) const;
    420   private:
    421         Expression * attr;
    422         Expression * expr;
    423         Type * type;
    424         bool isType;
    425442};
    426443
     
    428445class LogicalExpr : public Expression {
    429446  public:
     447        Expression * arg1;
     448        Expression * arg2;
     449
    430450        LogicalExpr( Expression * arg1, Expression * arg2, bool andp = true, Expression *_aname = nullptr );
    431451        LogicalExpr( const LogicalExpr & other );
     
    442462        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    443463        virtual void print( std::ostream & os, int indent = 0 ) const;
     464
    444465  private:
     466        bool isAnd;
     467};
     468
     469/// ConditionalExpr represents the three-argument conditional ( p ? a : b )
     470class ConditionalExpr : public Expression {
     471  public:
    445472        Expression * arg1;
    446473        Expression * arg2;
    447         bool isAnd;
    448 };
    449 
    450 /// ConditionalExpr represents the three-argument conditional ( p ? a : b )
    451 class ConditionalExpr : public Expression {
    452   public:
     474        Expression * arg3;
     475
    453476        ConditionalExpr( Expression * arg1, Expression * arg2, Expression * arg3, Expression *_aname = nullptr );
    454477        ConditionalExpr( const ConditionalExpr & other );
     
    466489        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    467490        virtual void print( std::ostream & os, int indent = 0 ) const;
    468   private:
     491};
     492
     493/// CommaExpr represents the sequence operator ( a, b )
     494class CommaExpr : public Expression {
     495  public:
    469496        Expression * arg1;
    470497        Expression * arg2;
    471         Expression * arg3;
    472 };
    473 
    474 /// CommaExpr represents the sequence operator ( a, b )
    475 class CommaExpr : public Expression {
    476   public:
     498
    477499        CommaExpr( Expression * arg1, Expression * arg2, Expression *_aname = nullptr );
    478500        CommaExpr( const CommaExpr & other );
     
    488510        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    489511        virtual void print( std::ostream & os, int indent = 0 ) const;
    490   private:
    491         Expression * arg1;
    492         Expression * arg2;
    493512};
    494513
     
    496515class TypeExpr : public Expression {
    497516  public:
     517        Type * type;
     518
    498519        TypeExpr( Type * type );
    499520        TypeExpr( const TypeExpr & other );
     
    507528        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    508529        virtual void print( std::ostream & os, int indent = 0 ) const;
    509   private:
    510         Type * type;
    511530};
    512531
     
    514533class AsmExpr : public Expression {
    515534  public:
     535        Expression * inout;
     536        ConstantExpr * constraint;
     537        Expression * operand;
     538
    516539        AsmExpr( Expression * inout, ConstantExpr * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
    517540        AsmExpr( const AsmExpr & other );
     
    531554        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    532555        virtual void print( std::ostream & os, int indent = 0 ) const;
    533   private:
     556
    534557        // https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Machine-Constraints.html#Machine-Constraints
    535         Expression * inout;
    536         ConstantExpr * constraint;
    537         Expression * operand;
    538558};
    539559
     
    542562class ImplicitCopyCtorExpr : public Expression {
    543563public:
    544         ImplicitCopyCtorExpr( ApplicationExpr * callExpr );
    545         ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );
    546         virtual ~ImplicitCopyCtorExpr();
    547 
    548         ApplicationExpr * get_callExpr() const { return callExpr; }
    549         void set_callExpr( ApplicationExpr * newValue ) { callExpr = newValue; }
    550 
    551         std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }
    552         std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }
    553         std::list< Expression * > & get_dtors() { return dtors; }
    554 
    555         virtual ImplicitCopyCtorExpr * clone() const { return new ImplicitCopyCtorExpr( * this ); }
    556         virtual void accept( Visitor & v ) { v.visit( this ); }
    557         virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    558         virtual void print( std::ostream & os, int indent = 0 ) const;
    559   private:
    560564        ApplicationExpr * callExpr;
    561565        std::list< ObjectDecl * > tempDecls;
    562566        std::list< ObjectDecl * > returnDecls;
    563567        std::list< Expression * > dtors;
     568
     569        ImplicitCopyCtorExpr( ApplicationExpr * callExpr );
     570        ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );
     571        virtual ~ImplicitCopyCtorExpr();
     572
     573        ApplicationExpr * get_callExpr() const { return callExpr; }
     574        void set_callExpr( ApplicationExpr * newValue ) { callExpr = newValue; }
     575
     576        std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }
     577        std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }
     578        std::list< Expression * > & get_dtors() { return dtors; }
     579
     580        virtual ImplicitCopyCtorExpr * clone() const { return new ImplicitCopyCtorExpr( * this ); }
     581        virtual void accept( Visitor & v ) { v.visit( this ); }
     582        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
     583        virtual void print( std::ostream & os, int indent = 0 ) const;
    564584};
    565585
     
    567587class ConstructorExpr : public Expression {
    568588public:
     589        Expression * callExpr;
     590
    569591        ConstructorExpr( Expression * callExpr );
    570592        ConstructorExpr( const ConstructorExpr & other );
     
    578600        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    579601        virtual void print( std::ostream & os, int indent = 0 ) const;
    580 private:
    581         Expression * callExpr;
    582602};
    583603
     
    585605class CompoundLiteralExpr : public Expression {
    586606  public:
     607        Initializer * initializer;
     608
    587609        CompoundLiteralExpr( Type * type, Initializer * initializer );
    588610        CompoundLiteralExpr( const CompoundLiteralExpr & other );
     
    596618        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    597619        virtual void print( std::ostream & os, int indent = 0 ) const;
    598   private:
    599         Initializer * initializer;
    600620};
    601621
     
    603623class RangeExpr : public Expression {
    604624  public:
     625        Expression * low, * high;
     626
    605627        RangeExpr( Expression * low, Expression * high );
    606628        RangeExpr( const RangeExpr & other );
     
    615637        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    616638        virtual void print( std::ostream & os, int indent = 0 ) const;
    617   private:
    618         Expression * low, * high;
    619639};
    620640
     
    622642class UntypedTupleExpr : public Expression {
    623643  public:
     644        std::list<Expression*> exprs;
     645
    624646        UntypedTupleExpr( const std::list< Expression * > & exprs, Expression *_aname = nullptr );
    625647        UntypedTupleExpr( const UntypedTupleExpr & other );
     
    632654        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    633655        virtual void print( std::ostream & os, int indent = 0 ) const;
    634   private:
    635         std::list<Expression*> exprs;
    636656};
    637657
     
    639659class TupleExpr : public Expression {
    640660  public:
     661        std::list<Expression*> exprs;
     662
    641663        TupleExpr( const std::list< Expression * > & exprs, Expression *_aname = nullptr );
    642664        TupleExpr( const TupleExpr & other );
     
    649671        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    650672        virtual void print( std::ostream & os, int indent = 0 ) const;
    651   private:
    652         std::list<Expression*> exprs;
    653673};
    654674
     
    656676class TupleIndexExpr : public Expression {
    657677  public:
     678        Expression * tuple;
     679        unsigned int index;
     680
    658681        TupleIndexExpr( Expression * tuple, unsigned int index );
    659682        TupleIndexExpr( const TupleIndexExpr & other );
     
    669692        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    670693        virtual void print( std::ostream & os, int indent = 0 ) const;
    671   private:
    672         Expression * tuple;
    673         unsigned int index;
    674694};
    675695
     
    677697class TupleAssignExpr : public Expression {
    678698  public:
     699        StmtExpr * stmtExpr = nullptr;
     700
    679701        TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls, Expression * _aname = nullptr );
    680702        TupleAssignExpr( const TupleAssignExpr & other );
     
    688710        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    689711        virtual void print( std::ostream & os, int indent = 0 ) const;
    690   private:
    691         StmtExpr * stmtExpr = nullptr;
    692712};
    693713
     
    695715class StmtExpr : public Expression {
    696716public:
     717        CompoundStmt * statements;
     718        std::list< ObjectDecl * > returnDecls; // return variable(s) for stmt expression
     719        std::list< Expression * > dtors; // destructor(s) for return variable(s)
     720
    697721        StmtExpr( CompoundStmt * statements );
    698722        StmtExpr( const StmtExpr & other );
     
    709733        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    710734        virtual void print( std::ostream & os, int indent = 0 ) const;
    711 private:
    712         CompoundStmt * statements;
    713         std::list< ObjectDecl * > returnDecls; // return variable(s) for stmt expression
    714         std::list< Expression * > dtors; // destructor(s) for return variable(s)
    715735};
    716736
    717737class UniqueExpr : public Expression {
    718738public:
     739        Expression * expr;
     740        ObjectDecl * object;
     741        VariableExpr * var;
     742
    719743        UniqueExpr( Expression * expr, long long idVal = -1 );
    720744        UniqueExpr( const UniqueExpr & other );
     
    736760        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    737761        virtual void print( std::ostream & os, int indent = 0 ) const;
     762
    738763private:
    739         Expression * expr;
    740         ObjectDecl * object;
    741         VariableExpr * var;
    742764        int id;
    743765        static long long count;
     
    756778class UntypedInitExpr : public Expression {
    757779public:
     780        Expression * expr;
     781        std::list<InitAlternative> initAlts;
     782
    758783        UntypedInitExpr( Expression * expr, const std::list<InitAlternative> & initAlts );
    759784        UntypedInitExpr( const UntypedInitExpr & other );
     
    769794        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    770795        virtual void print( std::ostream & os, int indent = 0 ) const;
    771 private:
    772         Expression * expr;
    773         std::list<InitAlternative> initAlts;
    774796};
    775797
    776798class InitExpr : public Expression {
    777799public:
     800        Expression * expr;
     801        Designation * designation;
     802
    778803        InitExpr( Expression * expr, Designation * designation );
    779804        InitExpr( const InitExpr & other );
     
    790815        virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    791816        virtual void print( std::ostream & os, int indent = 0 ) const;
    792 private:
    793         Expression * expr;
    794         Designation * designation;
    795817};
    796818
    797819
    798820std::ostream & operator<<( std::ostream & out, const Expression * expr );
    799 
    800 #endif // EXPRESSION_H
    801821
    802822// Local Variables: //
  • src/SynTree/Initializer.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 13 13:23:03 2016
    13 // Update Count     : 28
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr Aug  3 11:33:00 2016
     13// Update Count     : 29
    1414//
    1515
     
    7474                        }
    7575                }
    76                 assertf( initializers.size() == designations.size(), "Created ListInit with mismatching initializers (%d) and designations (%d)", initializers.size(), designations.size() );
     76                assertf( initializers.size() == designations.size(), "Created ListInit with mismatching initializers (%lu) and designations (%lu)", initializers.size(), designations.size() );
    7777}
    7878
  • src/SynTree/Initializer.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 23 16:12:42 2017
    13 // Update Count     : 20
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  9 10:19:00 2017
     13// Update Count     : 22
    1414//
    1515
    16 #ifndef INITIALIZER_H
    17 #define INITIALIZER_H
     16#pragma once
    1817
    1918#include <cassert>
     
    2827class Designation : public BaseSyntaxNode {
    2928public:
     29        std::list< Expression * > designators;
     30
    3031        Designation( const std::list< Expression * > & designators );
    3132        Designation( const Designation & other );
     
    3839        virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); }
    3940        virtual void print( std::ostream &os, int indent = 0 ) const;
    40 private:
    41         std::list< Expression * > designators;
    4241};
    4342
     
    6463class SingleInit : public Initializer {
    6564  public:
     65        //Constant *value;
     66        Expression *value;      // has to be a compile-time constant
     67
    6668        SingleInit( Expression *value, bool maybeConstructed = false );
    6769        SingleInit( const SingleInit &other );
     
    7577        virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    7678        virtual void print( std::ostream &os, int indent = 0 ) const;
    77   private:
    78         //Constant *value;
    79         Expression *value;      // has to be a compile-time constant
    8079};
    8180
     
    8483class ListInit : public Initializer {
    8584  public:
     85        std::list<Initializer *> initializers;  // order *is* important
     86        std::list<Designation *> designations;  // order/length is consistent with initializers
     87
    8688        ListInit( const std::list<Initializer*> &initializers,
    8789                          const std::list<Designation *> &designators = {}, bool maybeConstructed = false );
     
    103105        virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    104106        virtual void print( std::ostream &os, int indent = 0 ) const;
    105   private:
    106         std::list<Initializer *> initializers;  // order *is* important
    107         std::list<Designation *> designations;  // order/length is consistent with initializers
    108107};
    109108
     
    114113class ConstructorInit : public Initializer {
    115114  public:
     115        Statement * ctor;
     116        Statement * dtor;
     117
    116118        ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init );
    117119        ConstructorInit( const ConstructorInit &other );
     
    131133
    132134  private:
    133         Statement * ctor;
    134         Statement * dtor;
    135135        // C-style initializer made up of SingleInit and ListInit nodes to use as a fallback
    136136        // if an appropriate constructor definition is not found by the resolver
     
    141141std::ostream & operator<<( std::ostream & out, const Designation * des );
    142142
    143 #endif // INITIALIZER_H
    144 
    145143// Local Variables: //
    146144// tab-width: 4 //
  • src/SynTree/Label.h

    r3d4b23fa r0720e049  
    1010// Created On       : Wed Jun 8 12:53:12 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Aug  7 14:44:29 2016
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:52:44 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef LABEL_H
    17 #define LABEL_H
     16#pragma once
    1817
    1918#include <string>
     
    5150static const std::list< Label > noLabels;
    5251
    53 #endif // LABEL_H
    54 
    5552// Local Variables: //
    5653// tab-width: 4 //
  • src/SynTree/Mutator.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun 22 13:43:00 2017
    13 // Update Count     : 24
     12// Last Modified On : Mon Jul 24 16:32:00 2017
     13// Update Count     : 25
    1414//
    1515
     
    235235}
    236236
     237Expression *Mutator::mutate( VirtualCastExpr *castExpr ) {
     238        castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) );
     239        castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) );
     240        castExpr->set_arg( maybeMutate( castExpr->get_arg(), *this ) );
     241        return castExpr;
     242}
     243
    237244Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) {
    238245        memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) );
  • src/SynTree/Mutator.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun  8 15:45:00 2017
    13 // Update Count     : 14
     12// Last Modified On : Mon Jul 24 16:31:00 2017
     13// Update Count     : 16
    1414//
    1515#include <cassert>
     
    1818#include "Common/SemanticError.h"
    1919
    20 #ifndef MUTATOR_H
    21 #define MUTATOR_H
     20#pragma once
    2221
    2322class Mutator {
     
    6059        virtual Expression* mutate( LabelAddressExpr *labAddressExpr );
    6160        virtual Expression* mutate( CastExpr *castExpr );
     61        virtual Expression* mutate( VirtualCastExpr *castExpr );
    6262        virtual Expression* mutate( UntypedMemberExpr *memberExpr );
    6363        virtual Expression* mutate( MemberExpr *memberExpr );
     
    150150}
    151151
    152 #endif // MUTATOR_H
    153 
    154152// Local Variables: //
    155153// tab-width: 4 //
  • src/SynTree/NamedTypeDecl.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 07:49:44 2017
    13 // Update Count     : 13
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  9 13:28:00 2017
     13// Update Count     : 14
    1414//
    1515
     
    3838        if ( get_name() != "" ) {
    3939                os << get_name() << ": ";
     40        } // if
     41        if ( get_linkage() != LinkageSpec::Cforall ) {
     42                os << LinkageSpec::linkageName( get_linkage() ) << " ";
    4043        } // if
    4144        get_storageClasses().print( os );
  • src/SynTree/Statement.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Jun 12 13:35:00 2017
    13 // Update Count     : 67
     12// Last Modified On : Thr Aug  3 14:08:00 2017
     13// Update Count     : 69
    1414//
    1515
    16 #ifndef STATEMENT_H
    17 #define STATEMENT_H
     16#pragma once
    1817
    1918#include "BaseSyntaxNode.h"
     
    2726class Statement : public BaseSyntaxNode {
    2827  public:
     28        std::list<Label> labels;
     29
    2930        Statement( std::list<Label> labels );
    3031        virtual ~Statement();
     
    3738        virtual Statement *acceptMutator( Mutator &m ) = 0;
    3839        virtual void print( std::ostream &os, int indent = 0 ) const;
    39   protected:
    40         std::list<Label> labels;
    4140};
    4241
    4342class CompoundStmt : public Statement {
    4443  public:
     44        std::list<Statement*> kids;
     45
    4546        CompoundStmt( std::list<Label> labels );
    4647        CompoundStmt( const CompoundStmt &other );
     
    5556        virtual CompoundStmt *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    5657        virtual void print( std::ostream &os, int indent = 0 ) const;
    57   private:
    58         std::list<Statement*> kids;
    5958};
    6059
     
    6867        virtual NullStmt *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    6968        virtual void print( std::ostream &os, int indent = 0 ) const;
    70 
    71   private:
    7269};
    7370
    7471class ExprStmt : public Statement {
    7572  public:
     73        Expression *expr;
     74
    7675        ExprStmt( std::list<Label> labels, Expression *expr );
    7776        ExprStmt( const ExprStmt &other );
     
    8584        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    8685        virtual void print( std::ostream &os, int indent = 0 ) const;
    87   private:
    88         Expression *expr;
    8986};
    9087
    9188class AsmStmt : public Statement {
    9289  public:
     90        bool voltile;
     91        ConstantExpr *instruction;
     92        std::list<Expression *> output, input;
     93        std::list<ConstantExpr *> clobber;
     94        std::list<Label> gotolabels;
     95
    9396        AsmStmt( std::list<Label> labels, bool voltile, ConstantExpr *instruction, std::list<Expression *> input, std::list<Expression *> output, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels );
    9497        AsmStmt( const AsmStmt &other );
     
    112115        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    113116        virtual void print( std::ostream &os, int indent = 0 ) const;
    114   private:
    115         bool voltile;
    116         ConstantExpr *instruction;
    117         std::list<Expression *> output, input;
    118         std::list<ConstantExpr *> clobber;
    119         std::list<Label> gotolabels;
    120117};
    121118
    122119class IfStmt : public Statement {
    123120  public:
     121        Expression *condition;
     122        Statement *thenPart;
     123        Statement *elsePart;
     124
    124125        IfStmt( std::list<Label> labels, Expression *condition, Statement *thenPart, Statement *elsePart );
    125126        IfStmt( const IfStmt &other );
     
    137138        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    138139        virtual void print( std::ostream &os, int indent = 0 ) const;
    139   private:
    140         Expression *condition;
    141         Statement *thenPart;
    142         Statement *elsePart;
    143140};
    144141
    145142class SwitchStmt : public Statement {
    146143  public:
     144        Expression * condition;
     145
    147146        SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements );
    148147        SwitchStmt( const SwitchStmt &other );
     
    160159        virtual void print( std::ostream &os, int indent = 0 ) const;
    161160  private:
     161        std::list<Statement *> statements;
     162};
     163
     164class CaseStmt : public Statement {
     165  public:
    162166        Expression * condition;
    163         std::list<Statement *> statements;
    164 };
    165 
    166 class CaseStmt : public Statement {
    167   public:
     167        std::list<Statement *> stmts;
     168
    168169        CaseStmt( std::list<Label> labels, Expression *conditions, std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
    169170        CaseStmt( const CaseStmt &other );
     
    187188        virtual void print( std::ostream &os, int indent = 0 ) const;
    188189  private:
    189         Expression * condition;
    190         std::list<Statement *> stmts;
    191190        bool _isDefault;
    192191};
     
    194193class WhileStmt : public Statement {
    195194  public:
     195        Expression *condition;
     196        Statement *body;
     197        bool isDoWhile;
     198
    196199        WhileStmt( std::list<Label> labels, Expression *condition,
    197200               Statement *body, bool isDoWhile = false );
     
    210213        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    211214        virtual void print( std::ostream &os, int indent = 0 ) const;
    212   private:
     215};
     216
     217class ForStmt : public Statement {
     218  public:
     219        std::list<Statement *> initialization;
    213220        Expression *condition;
     221        Expression *increment;
    214222        Statement *body;
    215         bool isDoWhile;
    216 };
    217 
    218 class ForStmt : public Statement {
    219   public:
     223
    220224        ForStmt( std::list<Label> labels, std::list<Statement *> initialization,
    221225             Expression *condition = 0, Expression *increment = 0, Statement *body = 0 );
     
    236240        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    237241        virtual void print( std::ostream &os, int indent = 0 ) const;
    238   private:
    239         std::list<Statement *> initialization;
    240         Expression *condition;
    241         Expression *increment;
    242         Statement *body;
    243242};
    244243
     
    246245  public:
    247246        enum Type { Goto = 0, Break, Continue };
     247
     248        // originalTarget kept for error messages.
     249        const Label originalTarget;
     250        Label target;
     251        Expression *computedTarget;
     252        Type type;
    248253
    249254        BranchStmt( std::list<Label> labels, Label target, Type ) throw (SemanticError);
     
    266271  private:
    267272        static const char *brType[];
    268         Label originalTarget;  // can give better error messages if we remember the label name that the user entered
    269         Label target;
    270         Expression *computedTarget;
    271         Type type;
    272273};
    273274
    274275class ReturnStmt : public Statement {
    275276  public:
     277        Expression *expr;
     278
    276279        ReturnStmt( std::list<Label> labels, Expression *expr );
    277280        ReturnStmt( const ReturnStmt &other );
     
    285288        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    286289        virtual void print( std::ostream &os, int indent = 0 ) const;
    287   private:
    288         Expression *expr;
    289290};
    290291
     
    292293  public:
    293294        enum Kind { Terminate, Resume };
     295
     296        const Kind kind;
     297        Expression * expr;
     298        Expression * target;
    294299
    295300        ThrowStmt( std::list<Label> labels, Kind kind, Expression * expr, Expression * target = nullptr );
     
    307312        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    308313        virtual void print( std::ostream &os, int indent = 0 ) const;
    309   private:
    310         Kind kind;
    311         Expression * expr;
    312         Expression * target;
    313314};
    314315
    315316class TryStmt : public Statement {
    316317  public:
     318        CompoundStmt *block;
     319        std::list<CatchStmt *> handlers;
     320        FinallyStmt *finallyBlock;
     321
    317322        TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 );
    318323        TryStmt( const TryStmt &other );
     
    330335        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    331336        virtual void print( std::ostream &os, int indent = 0 ) const;
    332 
    333   private:
    334         CompoundStmt *block;
    335         std::list<CatchStmt *> handlers;
    336         FinallyStmt *finallyBlock;
    337337};
    338338
     
    340340  public:
    341341        enum Kind { Terminate, Resume };
     342
     343        const Kind kind;
     344        Declaration *decl;
     345        Expression *cond;
     346        Statement *body;
    342347
    343348        CatchStmt( std::list<Label> labels, Kind kind, Declaration *decl,
     
    358363        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    359364        virtual void print( std::ostream &os, int indent = 0 ) const;
    360 
    361   private:
    362         Kind kind;
    363         Declaration *decl;
    364         Expression *cond;
    365         Statement *body;
    366365};
    367366
    368367class FinallyStmt : public Statement {
    369368  public:
     369        CompoundStmt *block;
     370
    370371        FinallyStmt( std::list<Label> labels, CompoundStmt *block );
    371372        FinallyStmt( const FinallyStmt &other );
     
    379380        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    380381        virtual void print( std::ostream &os, int indent = 0 ) const;
    381   private:
    382         CompoundStmt *block;
    383382};
    384383
     
    387386class DeclStmt : public Statement {
    388387  public:
     388        Declaration *decl;
     389
    389390        DeclStmt( std::list<Label> labels, Declaration *decl );
    390391        DeclStmt( const DeclStmt &other );
     
    398399        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    399400        virtual void print( std::ostream &os, int indent = 0 ) const;
    400   private:
    401         Declaration *decl;
    402401};
    403402
     
    408407class ImplicitCtorDtorStmt : public Statement {
    409408  public:
     409        // Non-owned pointer to the constructor/destructor statement
     410        Statement * callStmt;
     411
    410412        ImplicitCtorDtorStmt( Statement * callStmt );
    411413        ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other );
     
    419421        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    420422        virtual void print( std::ostream &os, int indent = 0 ) const;
    421 
    422   private:
    423         // Non-owned pointer to the constructor/destructor statement
    424         Statement * callStmt;
    425423};
    426424
    427425
    428426std::ostream & operator<<( std::ostream & out, const Statement * statement );
    429 
    430 #endif // STATEMENT_H
    431427
    432428// Local Variables: //
  • src/SynTree/SynTree.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun  8 17:00:00 2017
    13 // Update Count     : 9
     12// Last Modified On : Mon Jul 24 16:54:00 2017
     13// Update Count     : 11
    1414//
    1515
    16 #ifndef SYNTREE_H
    17 #define SYNTREE_H
     16#pragma once
    1817
    1918#include <string>
     
    6766class LabelAddressExpr;
    6867class CastExpr;
     68class VirtualCastExpr;
    6969class MemberExpr;
    7070class UntypedMemberExpr;
     
    135135class Attribute;
    136136
    137 #endif // SYNTREE_H
    138 
    139137// Local Variables: //
    140138// tab-width: 4 //
  • src/SynTree/Type.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 08:42:47 2017
    13 // Update Count     : 28
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  2 11:11:00 2017
     13// Update Count     : 29
    1414//
    1515
     
    8888}
    8989
     90// Empty Variable declarations:
     91const Type::FuncSpecifiers noFuncSpecifiers;
     92const Type::StorageClasses noStorageClasses;
     93const Type::Qualifiers noQualifiers;
     94
    9095std::ostream & operator<<( std::ostream & out, const Type * type ) {
    9196        if ( type ) {
  • src/SynTree/Type.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 23 16:16:36 2017
    13 // Update Count     : 149
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  9 14:25:00 2017
     13// Update Count     : 152
    1414//
    1515
    16 #ifndef TYPE_H
    17 #define TYPE_H
     16#pragma once
    1817
    1918#include "BaseSyntaxNode.h"
     
    128127        }; // Qualifiers
    129128
     129        typedef std::list<TypeDecl *> ForallList;
     130
     131        Qualifiers tq;
     132        ForallList forall;
     133        std::list< Attribute * > attributes;
     134
    130135        Type( const Qualifiers & tq, const std::list< Attribute * > & attributes );
    131136        Type( const Type & other );
     
    146151        void set_atomic( bool newValue ) { tq.is_atomic = newValue; }
    147152
    148         typedef std::list<TypeDecl *> ForallList;
    149153        ForallList& get_forall() { return forall; }
    150154
     
    166170        virtual Type *acceptMutator( Mutator & m ) = 0;
    167171        virtual void print( std::ostream & os, int indent = 0 ) const;
    168   private:
    169         Qualifiers tq;
    170         ForallList forall;
    171         std::list< Attribute * > attributes;
    172 };
    173 
    174 extern Type::Qualifiers emptyQualifiers;                                // no qualifiers on constants
     172};
     173
     174extern const Type::FuncSpecifiers noFuncSpecifiers;
     175extern const Type::StorageClasses noStorageClasses;
     176extern const Type::Qualifiers noQualifiers;                     // no qualifiers on constants
    175177
    176178class VoidType : public Type {
     
    212214                LongDoubleImaginary,
    213215                NUMBER_OF_BASIC_TYPES
    214         };
     216        } kind;
    215217
    216218        static const char *typeNames[];                                         // string names for basic types, MUST MATCH with Kind
     
    227229
    228230        bool isInteger() const;
    229   private:
    230         Kind kind;
    231231};
    232232
    233233class PointerType : public Type {
    234234  public:
     235        Type *base;
     236
     237        // In C99, pointer types can be qualified in many ways e.g., int f( int a[ static 3 ] )
     238        Expression *dimension;
     239        bool isVarLen;
     240        bool isStatic;
     241
    235242        PointerType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    236243        PointerType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     
    253260        virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
    254261        virtual void print( std::ostream & os, int indent = 0 ) const;
    255   private:
     262};
     263
     264class ArrayType : public Type {
     265  public:
    256266        Type *base;
    257 
    258         // In C99, pointer types can be qualified in many ways e.g., int f( int a[ static 3 ] )
    259267        Expression *dimension;
    260268        bool isVarLen;
    261269        bool isStatic;
    262 };
    263 
    264 class ArrayType : public Type {
    265   public:
     270
    266271        ArrayType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    267272        ArrayType( const ArrayType& );
     
    283288        virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
    284289        virtual void print( std::ostream & os, int indent = 0 ) const;
    285   private:
    286         Type *base;
    287         Expression *dimension;
    288         bool isVarLen;
    289         bool isStatic;
    290290};
    291291
    292292class FunctionType : public Type {
    293293  public:
     294        std::list<DeclarationWithType*> returnVals;
     295        std::list<DeclarationWithType*> parameters;
     296
     297        // Does the function accept a variable number of arguments following the arguments specified in the parameters list.
     298        // This could be because of
     299        // - an ellipsis in a prototype declaration
     300        // - an unprototyped declaration
     301        bool isVarArgs;
     302
    294303        FunctionType( const Type::Qualifiers & tq, bool isVarArgs, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    295304        FunctionType( const FunctionType& );
     
    306315        virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
    307316        virtual void print( std::ostream & os, int indent = 0 ) const;
    308   private:
    309         std::list<DeclarationWithType*> returnVals;
    310         std::list<DeclarationWithType*> parameters;
    311 
    312         // Does the function accept a variable number of arguments following the arguments specified in the parameters list.
    313         // This could be because of
    314         // - an ellipsis in a prototype declaration
    315         // - an unprototyped declaration
    316         bool isVarArgs;
    317317};
    318318
    319319class ReferenceToType : public Type {
    320320  public:
     321        std::list< Expression* > parameters;
     322        std::string name;
     323        bool hoistType;
     324
    321325        ReferenceToType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes );
    322326        ReferenceToType( const ReferenceToType & other );
     
    337341  protected:
    338342        virtual std::string typeString() const = 0;
    339         std::list< Expression* > parameters;
    340         std::string name;
    341   private:
    342         bool hoistType;
    343343};
    344344
     
    346346        typedef ReferenceToType Parent;
    347347  public:
     348        // this decl is not "owned" by the struct inst; it is merely a pointer to elsewhere in the tree,
     349        // where the structure used in this type is actually defined
     350        StructDecl *baseStruct;
     351
    348352        StructInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseStruct( 0 ) {}
    349353        StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     
    369373  private:
    370374        virtual std::string typeString() const;
    371 
    372         // this decl is not "owned" by the struct inst; it is merely a pointer to elsewhere in the tree,
    373         // where the structure used in this type is actually defined
    374         StructDecl *baseStruct;
    375375};
    376376
     
    378378        typedef ReferenceToType Parent;
    379379  public:
     380        // this decl is not "owned" by the union inst; it is merely a pointer to elsewhere in the tree,
     381        // where the union used in this type is actually defined
     382        UnionDecl *baseUnion;
     383
    380384        UnionInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseUnion( 0 ) {}
    381385        UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     
    401405  private:
    402406        virtual std::string typeString() const;
    403 
     407};
     408
     409class EnumInstType : public ReferenceToType {
     410        typedef ReferenceToType Parent;
     411  public:
    404412        // this decl is not "owned" by the union inst; it is merely a pointer to elsewhere in the tree,
    405413        // where the union used in this type is actually defined
    406         UnionDecl *baseUnion;
    407 };
    408 
    409 class EnumInstType : public ReferenceToType {
    410         typedef ReferenceToType Parent;
    411   public:
     414        EnumDecl *baseEnum = nullptr;
     415
    412416        EnumInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
    413417        EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     
    424428  private:
    425429        virtual std::string typeString() const;
    426 
    427         // this decl is not "owned" by the union inst; it is merely a pointer to elsewhere in the tree,
    428         // where the union used in this type is actually defined
    429         EnumDecl *baseEnum = nullptr;
    430430};
    431431
     
    433433        typedef ReferenceToType Parent;
    434434  public:
     435        // this member is filled in by the validate pass, which instantiates the members of the correponding
     436        // aggregate with the actual type parameters specified for this use of the context
     437        std::list< Declaration* > members;
     438
    435439        TraitInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
    436440        TraitInstType( const TraitInstType & other );
     
    446450  private:
    447451        virtual std::string typeString() const;
    448 
    449         // this member is filled in by the validate pass, which instantiates the members of the correponding
    450         // aggregate with the actual type parameters specified for this use of the context
    451         std::list< Declaration* > members;
    452452};
    453453
     
    455455        typedef ReferenceToType Parent;
    456456  public:
     457        // this decl is not "owned" by the type inst; it is merely a pointer to elsewhere in the tree,
     458        // where the type used here is actually defined
     459        TypeDecl *baseType;
     460        bool isFtype;
     461
    457462        TypeInstType( const Type::Qualifiers & tq, const std::string & name, TypeDecl *baseType, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    458463        TypeInstType( const Type::Qualifiers & tq, const std::string & name, bool isFtype, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     
    473478  private:
    474479        virtual std::string typeString() const;
    475         // this decl is not "owned" by the type inst; it is merely a pointer to elsewhere in the tree,
    476         // where the type used here is actually defined
    477         TypeDecl *baseType;
    478         bool isFtype;
    479480};
    480481
    481482class TupleType : public Type {
    482483  public:
     484        std::list<Type *> types;
     485        std::list<Declaration *> members;
     486
    483487        TupleType( const Type::Qualifiers & tq, const std::list< Type * > & types, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    484488        TupleType( const TupleType& );
     
    509513        virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
    510514        virtual void print( std::ostream & os, int indent = 0 ) const;
    511   private:
    512         std::list<Type *> types;
    513         std::list<Declaration *> members;
    514515};
    515516
    516517class TypeofType : public Type {
    517518  public:
     519        Expression *expr;
     520
    518521        TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    519522        TypeofType( const TypeofType& );
     
    529532        virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
    530533        virtual void print( std::ostream & os, int indent = 0 ) const;
    531   private:
     534};
     535
     536class AttrType : public Type {
     537  public:
     538        std::string name;
    532539        Expression *expr;
    533 };
    534 
    535 class AttrType : public Type {
    536   public:
     540        Type *type;
     541        bool isType;
     542
    537543        AttrType( const Type::Qualifiers & tq, const std::string & name, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    538544        AttrType( const Type::Qualifiers & tq, const std::string & name, Type *type, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     
    555561        virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
    556562        virtual void print( std::ostream & os, int indent = 0 ) const;
    557   private:
    558         std::string name;
    559         Expression *expr;
    560         Type *type;
    561         bool isType;
    562563};
    563564
     
    601602
    602603std::ostream & operator<<( std::ostream & out, const Type * type );
    603 
    604 #endif // TYPE_H
    605604
    606605// Local Variables: //
  • src/SynTree/TypeDecl.cc

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 07:49:58 2017
    13 // Update Count     : 5
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  9 14:35:00 2017
     13// Update Count     : 6
    1414//
    1515
     
    1818#include "Common/utility.h"
    1919
    20 TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init ) : Parent( name, scs, type ), kind( kind ), init( init ), sized( kind == Any || kind == Ttype ) {
     20TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init ) : Parent( name, scs, type ), init( init ), sized( kind == Any || kind == Ttype ), kind( kind ) {
    2121}
    2222
    23 TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ), init( maybeClone( other.init ) ), sized( other.sized ) {
     23TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), init( maybeClone( other.init ) ), sized( other.sized ), kind( other.kind ) {
    2424}
    2525
  • src/SynTree/TypeExpr.cc

    r3d4b23fa r0720e049  
    2121}
    2222
    23 TypeExpr::TypeExpr( const TypeExpr &other ) : type( maybeClone( other.type ) ) {
     23TypeExpr::TypeExpr( const TypeExpr &other ) : Expression( other ), type( maybeClone( other.type ) ) {
    2424}
    2525
  • src/SynTree/TypeSubstitution.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri Apr 29 15:00:20 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:52:24 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef TYPESUBSTITUTION_H
    17 #define TYPESUBSTITUTION_H
     16#pragma once
    1817
    1918#include <map>
     
    180179std::ostream & operator<<( std::ostream & out, const TypeSubstitution & sub );
    181180
    182 #endif // TYPESUBSTITUTION_H
    183 
    184181// Local Variables: //
    185182// tab-width: 4 //
  • src/SynTree/VarExprReplacer.h

    r3d4b23fa r0720e049  
    99// Author           : Rob Schluntz
    1010// Created On       : Wed Jan 13 16:29:30 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 13 11:27:52 2016
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:53:41 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef VAR_EXPR_REPLACER_H
    17 #define VAR_EXPR_REPLACER_H
     16#pragma once
    1817
    1918#include <map>
     
    3534};
    3635
    37 #endif // VAR_EXPR_REPLACER_H
    38 
    3936// Local Variables: //
    4037// tab-width: 4 //
  • src/SynTree/Visitor.cc

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun 22 13:41:00 2017
    13 // Update Count     : 26
     12// Last Modified On : Mon Jul 24 16:30:00 2017
     13// Update Count     : 27
    1414//
    1515
     
    192192}
    193193
     194void Visitor::visit( VirtualCastExpr *castExpr ) {
     195        maybeAccept( castExpr->get_result(), *this );
     196        maybeAccept( castExpr->get_arg(), *this );
     197}
     198
    194199void Visitor::visit( UntypedMemberExpr *memberExpr ) {
    195200        maybeAccept( memberExpr->get_result(), *this );
  • src/SynTree/Visitor.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Jun 08 15:45:00 2017
    13 // Update Count     : 11
     12// Last Modified On : Mon Jul 24 16:28:00 2017
     13// Update Count     : 13
    1414//
    1515
    16 #ifndef VISITOR_H
    17 #define VISITOR_H
     16#pragma once
    1817
    1918#include "SynTree.h"
     
    6160        virtual void visit( NameExpr *nameExpr );
    6261        virtual void visit( CastExpr *castExpr );
     62        virtual void visit( VirtualCastExpr *castExpr );
    6363        virtual void visit( AddressExpr *addressExpr );
    6464        virtual void visit( LabelAddressExpr *labAddressExpr );
     
    174174}
    175175
    176 #endif // VISITOR_H
    177 
    178176// Local Variables: //
    179177// tab-width: 4 //
  • src/Tuples/Explode.h

    r3d4b23fa r0720e049  
    99// Author           : Rob Schluntz
    1010// Created On       : Wed Nov 9 13:12:24 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Nov 9 13:20:24 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:55:16 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef _EXPLODE_H_
    17 #define _EXPLODE_H_
     16#pragma once
    1817
    1918#include "ResolvExpr/AlternativeFinder.h"
     
    9594} // namespace Tuples
    9695
    97 #endif // _TUPLE_ASSIGNMENT_H_
    98 
    9996// Local Variables: //
    10097// tab-width: 4 //
  • src/Tuples/TupleExpansion.cc

    r3d4b23fa r0720e049  
    6666                };
    6767
    68                 class TupleTypeReplacer : public GenPoly::DeclMutator {
    69                   public:
    70                         typedef GenPoly::DeclMutator Parent;
    71                         using Parent::mutate;
    72 
    73                         virtual Type * mutate( TupleType * tupleType ) override;
    74 
    75                         virtual CompoundStmt * mutate( CompoundStmt * stmt ) override {
    76                                 typeMap.beginScope();
    77                                 stmt = Parent::mutate( stmt );
    78                                 typeMap.endScope();
    79                                 return stmt;
     68                struct TupleTypeReplacer : public WithDeclsToAdd, public WithGuards, public WithTypeSubstitution {
     69                        Type * postmutate( TupleType * tupleType );
     70
     71                        void premutate( CompoundStmt * ) {
     72                                GuardScope( typeMap );
    8073                        }
    8174                  private:
     
    111104                mutateAll( translationUnit, assnExpander );
    112105
    113                 TupleTypeReplacer replacer;
    114                 replacer.mutateDeclarationList( translationUnit );
     106                PassVisitor<TupleTypeReplacer> replacer;
     107                mutateAll( translationUnit, replacer );
    115108
    116109                PassVisitor<TupleIndexExpander> idxExpander;
     
    218211        }
    219212
    220         Type * TupleTypeReplacer::mutate( TupleType * tupleType ) {
    221                 tupleType = safe_dynamic_cast< TupleType * > ( Parent::mutate( tupleType ) );
     213        Type * TupleTypeReplacer::postmutate( TupleType * tupleType ) {
    222214                unsigned tupleSize = tupleType->size();
    223215                if ( ! typeMap.count( tupleSize ) ) {
     
    226218                        decl->set_body( true );
    227219                        for ( size_t i = 0; i < tupleSize; ++i ) {
    228                                 TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", i ), Type::StorageClasses(), nullptr, TypeDecl::Any );
     220                                TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", tupleSize, "_", i ), Type::StorageClasses(), nullptr, TypeDecl::Any );
    229221                                decl->get_members().push_back( new ObjectDecl( toString("field_", i ), Type::StorageClasses(), LinkageSpec::C, nullptr, new TypeInstType( Type::Qualifiers(), tyParam->get_name(), tyParam ), nullptr ) );
    230222                                decl->get_parameters().push_back( tyParam );
     
    235227                        }
    236228                        typeMap[tupleSize] = decl;
    237                         addDeclaration( decl );
     229                        declsToAddBefore.push_back( decl );
    238230                }
    239231                Type::Qualifiers qualifiers = tupleType->get_qualifiers();
     
    241233                StructDecl * decl = typeMap[tupleSize];
    242234                StructInstType * newType = new StructInstType( qualifiers, decl );
    243                 for ( Type * t : *tupleType ) {
     235                for ( auto p : group_iterate( tupleType->get_types(), decl->get_parameters() ) ) {
     236                        Type * t = std::get<0>(p);
     237                        TypeDecl * td = std::get<1>(p);
    244238                        newType->get_parameters().push_back( new TypeExpr( t->clone() ) );
     239                        if ( env ) {
     240                                // add bindings to the type environment.
     241                                // xxx - This may not be sufficient, it may be necessary to rename type variables on StructInstType?
     242                                env->add( td->get_name(), t->clone() );
     243                        }
    245244                }
    246245                delete tupleType;
  • src/Tuples/Tuples.h

    r3d4b23fa r0720e049  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Nov 9 13:17:58 2016
    13 // Update Count     : 15
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:55:00 2017
     13// Update Count     : 16
    1414//
    1515
    16 #ifndef _TUPLES_H_
    17 #define _TUPLES_H_
     16#pragma once
    1817
    1918#include <string>
     
    4948} // namespace Tuples
    5049
    51 #endif // _TUPLE_ASSIGNMENT_H_
    52 
    5350// Local Variables: //
    5451// tab-width: 4 //
  • src/benchmark/create_pthrd.c

    r3d4b23fa r0720e049  
    1414                n = atoi(argv[1]);
    1515        }
    16         printf("%lu\n", n);
     16        printf("create %lu pthreads ... ", n);
    1717
    1818        for (size_t i = 0; i < n; i++) {
    1919                pthread_t thread;
    2020                if (pthread_create(&thread, NULL, foo, NULL) < 0) {
     21                        perror( "failure" );
    2122                        return 1;
    2223                }
    2324
    2425                if (pthread_join( thread, NULL) < 0) {
     26                        perror( "failure" );
    2527                        return 1;
    2628                }
    2729        }
    28         pthread_exit(NULL);
    29         return 0;
     30        printf("finish\n");
    3031}
  • src/include/cassert

    r3d4b23fa r0720e049  
    1010// Created On       : Thu Aug 18 13:19:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 18 13:25:55 2016
    13 // Update Count     : 4
     12// Last Modified On : Tue Aug  1 11:56:01 2017
     13// Update Count     : 16
    1414//
    1515
     
    1818// IWYU pragma: private, include <cassert>
    1919
    20 #include_next <assert.h>
     20#include_next <cassert>
    2121
    22 #define __STRINGIFY__(str) #str
    23 #define __VSTRINGIFY__(str) __STRINGIFY__(str)
    24 #define assertf(expr, fmt, ...) ((expr) ? static_cast<void>(0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
     22#ifdef NDEBUG
    2523
    26 void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn));
     24#define assertf(expr, fmt, ...) (__ASSERT_VOID_ASSERT (0))
     25
     26#else
     27
     28#define assertf(expr, fmt, ...) ((expr) \
     29        ? (__ASSERT_VOID_CAST (0)) \
     30        : __assert_fail_f( #expr, __FILE__, __LINE__, \
     31        __ASSERT_FUNCTION, fmt, ## __VA_ARGS__ ))
     32
     33void __assert_fail_f(   const char *assertion, const char *file,
     34                                                unsigned int line, const char *function,
     35                                                const char *fmt, ...
     36        ) __attribute__((noreturn, format(printf, 5, 6)));
     37
     38#endif
    2739
    2840template<typename T, typename U>
    29 static inline T safe_dynamic_cast(const U& src) {
     41static inline T safe_dynamic_cast( const U & src ) {
    3042        T ret = dynamic_cast<T>(src);
    3143        assert(ret);
  • src/libcfa/Makefile.am

    r3d4b23fa r0720e049  
    1111## Created On       : Sun May 31 08:54:01 2015
    1212## Last Modified By : Andrew Beach
    13 ## Last Modified On : Wed Jun 28 15:36:00 2017
    14 ## Update Count     : 215
     13## Last Modified On : Wed Jul 26 14:15:00 2017
     14## Update Count     : 221
    1515###############################################################################
    1616
     
    3939
    4040AM_CCASFLAGS = @CFA_FLAGS@
    41 CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
     41
     42#CFLAGS for most libcfa src
     43#use -no-include-stdhdr to prevent rebuild cycles
     44#The built sources must not depend on the installed headers
     45CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
    4246CC = ${abs_top_srcdir}/src/driver/cfa
    4347
    44 headers = assert fstream iostream iterator limits math rational stdlib \
     48headers = fstream iostream iterator limits rational stdlib \
    4549          containers/maybe containers/pair containers/result containers/vector
    4650
     
    5155
    5256libobjs = ${headers:=.o}
    53 libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} exception.c
     57libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \
     58         assert.c exception.c virtual.c
    5459
    5560# not all platforms support concurrency, add option do disable it
     
    6873        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
    6974
     75libcfa_a-virtual.o : virtual.c
     76        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
     77
    7078concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
    7179        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
    7280
    7381libcfa_d_a-exception.o : exception.c
     82        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
     83
     84libcfa_d_a-virtual.o : virtual.c
    7485        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
    7586
     
    8495
    8596cfa_includedir = $(CFA_INCDIR)
    86 nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h
     97nobase_cfa_include_HEADERS = ${headers} ${stdhdr} math gmp concurrency/invoke.h
    8798
    8899CLEANFILES = libcfa-prelude.c
  • src/libcfa/Makefile.in

    r3d4b23fa r0720e049  
    149149libcfa_d_a_LIBADD =
    150150am__libcfa_d_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
    151         libhdr/libdebug.c assert.c fstream.c iostream.c iterator.c \
    152         limits.c math.c rational.c stdlib.c containers/maybe.c \
    153         containers/pair.c containers/result.c containers/vector.c \
     151        libhdr/libdebug.c fstream.c iostream.c iterator.c limits.c \
     152        rational.c stdlib.c containers/maybe.c containers/pair.c \
     153        containers/result.c containers/vector.c \
    154154        concurrency/coroutine.c concurrency/thread.c \
    155         concurrency/kernel.c concurrency/monitor.c exception.c \
    156         concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \
    157         concurrency/invoke.c concurrency/preemption.c
     155        concurrency/kernel.c concurrency/monitor.c assert.c \
     156        exception.c virtual.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
     157        concurrency/alarm.c concurrency/invoke.c \
     158        concurrency/preemption.c
    158159am__dirstamp = $(am__leading_dot)dirstamp
    159160@BUILD_CONCURRENCY_TRUE@am__objects_1 = concurrency/libcfa_d_a-coroutine.$(OBJEXT) \
     
    161162@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-kernel.$(OBJEXT) \
    162163@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_d_a-monitor.$(OBJEXT)
    163 am__objects_2 = libcfa_d_a-assert.$(OBJEXT) \
    164         libcfa_d_a-fstream.$(OBJEXT) libcfa_d_a-iostream.$(OBJEXT) \
    165         libcfa_d_a-iterator.$(OBJEXT) libcfa_d_a-limits.$(OBJEXT) \
    166         libcfa_d_a-math.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \
     164am__objects_2 = libcfa_d_a-fstream.$(OBJEXT) \
     165        libcfa_d_a-iostream.$(OBJEXT) libcfa_d_a-iterator.$(OBJEXT) \
     166        libcfa_d_a-limits.$(OBJEXT) libcfa_d_a-rational.$(OBJEXT) \
    167167        libcfa_d_a-stdlib.$(OBJEXT) \
    168168        containers/libcfa_d_a-maybe.$(OBJEXT) \
     
    177177        libcfa_d_a-interpose.$(OBJEXT) \
    178178        libhdr/libcfa_d_a-libdebug.$(OBJEXT) $(am__objects_2) \
    179         libcfa_d_a-exception.$(OBJEXT) $(am__objects_3)
     179        libcfa_d_a-assert.$(OBJEXT) libcfa_d_a-exception.$(OBJEXT) \
     180        libcfa_d_a-virtual.$(OBJEXT) $(am__objects_3)
    180181am_libcfa_d_a_OBJECTS = $(am__objects_4)
    181182libcfa_d_a_OBJECTS = $(am_libcfa_d_a_OBJECTS)
     
    183184libcfa_a_LIBADD =
    184185am__libcfa_a_SOURCES_DIST = libcfa-prelude.c interpose.c \
    185         libhdr/libdebug.c assert.c fstream.c iostream.c iterator.c \
    186         limits.c math.c rational.c stdlib.c containers/maybe.c \
    187         containers/pair.c containers/result.c containers/vector.c \
     186        libhdr/libdebug.c fstream.c iostream.c iterator.c limits.c \
     187        rational.c stdlib.c containers/maybe.c containers/pair.c \
     188        containers/result.c containers/vector.c \
    188189        concurrency/coroutine.c concurrency/thread.c \
    189         concurrency/kernel.c concurrency/monitor.c exception.c \
    190         concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c \
    191         concurrency/invoke.c concurrency/preemption.c
     190        concurrency/kernel.c concurrency/monitor.c assert.c \
     191        exception.c virtual.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
     192        concurrency/alarm.c concurrency/invoke.c \
     193        concurrency/preemption.c
    192194@BUILD_CONCURRENCY_TRUE@am__objects_5 = concurrency/libcfa_a-coroutine.$(OBJEXT) \
    193195@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-thread.$(OBJEXT) \
    194196@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-kernel.$(OBJEXT) \
    195197@BUILD_CONCURRENCY_TRUE@        concurrency/libcfa_a-monitor.$(OBJEXT)
    196 am__objects_6 = libcfa_a-assert.$(OBJEXT) libcfa_a-fstream.$(OBJEXT) \
    197         libcfa_a-iostream.$(OBJEXT) libcfa_a-iterator.$(OBJEXT) \
    198         libcfa_a-limits.$(OBJEXT) libcfa_a-math.$(OBJEXT) \
     198am__objects_6 = libcfa_a-fstream.$(OBJEXT) libcfa_a-iostream.$(OBJEXT) \
     199        libcfa_a-iterator.$(OBJEXT) libcfa_a-limits.$(OBJEXT) \
    199200        libcfa_a-rational.$(OBJEXT) libcfa_a-stdlib.$(OBJEXT) \
    200201        containers/libcfa_a-maybe.$(OBJEXT) \
     
    209210        libcfa_a-interpose.$(OBJEXT) \
    210211        libhdr/libcfa_a-libdebug.$(OBJEXT) $(am__objects_6) \
    211         libcfa_a-exception.$(OBJEXT) $(am__objects_7)
     212        libcfa_a-assert.$(OBJEXT) libcfa_a-exception.$(OBJEXT) \
     213        libcfa_a-virtual.$(OBJEXT) $(am__objects_7)
    212214am_libcfa_a_OBJECTS = $(am__objects_8)
    213215libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
     
    258260    *) (install-info --version) >/dev/null 2>&1;; \
    259261  esac
    260 am__nobase_cfa_include_HEADERS_DIST = assert fstream iostream iterator \
    261         limits math rational stdlib containers/maybe containers/pair \
     262am__nobase_cfa_include_HEADERS_DIST = fstream iostream iterator limits \
     263        rational stdlib containers/maybe containers/pair \
    262264        containers/result containers/vector concurrency/coroutine \
    263265        concurrency/thread concurrency/kernel concurrency/monitor \
    264         ${shell echo stdhdr/*} gmp concurrency/invoke.h
     266        ${shell echo stdhdr/*} math gmp concurrency/invoke.h
    265267HEADERS = $(nobase_cfa_include_HEADERS)
    266268am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
     
    306308CFA_NAME = @CFA_NAME@
    307309CFA_PREFIX = @CFA_PREFIX@
    308 CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
     310
     311#CFLAGS for most libcfa src
     312#use -no-include-stdhdr to prevent rebuild cycles
     313#The built sources must not depend on the installed headers
     314CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
    309315CPP = @CPP@
    310316CPPFLAGS = @CPPFLAGS@
     
    412418EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@
    413419AM_CCASFLAGS = @CFA_FLAGS@
    414 headers = assert fstream iostream iterator limits math rational stdlib \
     420headers = fstream iostream iterator limits rational stdlib \
    415421        containers/maybe containers/pair containers/result \
    416422        containers/vector $(am__append_3)
    417423libobjs = ${headers:=.o}
    418424libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} \
    419         exception.c $(am__append_4)
     425        assert.c exception.c virtual.c $(am__append_4)
    420426libcfa_a_SOURCES = ${libsrc}
    421427libcfa_a_CFLAGS = -nodebug -O2
     
    424430stdhdr = ${shell echo stdhdr/*}
    425431cfa_includedir = $(CFA_INCDIR)
    426 nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h
     432nobase_cfa_include_HEADERS = ${headers} ${stdhdr} math gmp concurrency/invoke.h
    427433CLEANFILES = libcfa-prelude.c
    428434all: all-am
     
    590596@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-libcfa-prelude.Po@am__quote@
    591597@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-limits.Po@am__quote@
    592 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-math.Po@am__quote@
    593598@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-rational.Po@am__quote@
    594599@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-stdlib.Po@am__quote@
     600@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_a-virtual.Po@am__quote@
    595601@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-assert.Po@am__quote@
    596602@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-exception.Po@am__quote@
     
    601607@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-libcfa-prelude.Po@am__quote@
    602608@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-limits.Po@am__quote@
    603 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-math.Po@am__quote@
    604609@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-rational.Po@am__quote@
    605610@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-stdlib.Po@am__quote@
     611@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa_d_a-virtual.Po@am__quote@
    606612@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/CtxSwitch-@MACHINE_TYPE@.Po@am__quote@
    607613@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-alarm.Po@am__quote@
     
    697703@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_d_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
    698704
     705libcfa_d_a-fstream.o: fstream.c
     706@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     707@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
     708@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.o' libtool=no @AMDEPBACKSLASH@
     709@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     710@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     711
     712libcfa_d_a-fstream.obj: fstream.c
     713@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     714@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
     715@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
     716@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     717@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     718
     719libcfa_d_a-iostream.o: iostream.c
     720@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     721@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
     722@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.o' libtool=no @AMDEPBACKSLASH@
     723@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     724@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     725
     726libcfa_d_a-iostream.obj: iostream.c
     727@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     728@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
     729@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
     730@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     731@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     732
     733libcfa_d_a-iterator.o: iterator.c
     734@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     735@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
     736@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.o' libtool=no @AMDEPBACKSLASH@
     737@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     738@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     739
     740libcfa_d_a-iterator.obj: iterator.c
     741@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     742@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
     743@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
     744@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     745@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     746
     747libcfa_d_a-limits.o: limits.c
     748@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-limits.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-limits.Tpo -c -o libcfa_d_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
     749@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-limits.Tpo $(DEPDIR)/libcfa_d_a-limits.Po
     750@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_d_a-limits.o' libtool=no @AMDEPBACKSLASH@
     751@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     752@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
     753
     754libcfa_d_a-limits.obj: limits.c
     755@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-limits.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-limits.Tpo -c -o libcfa_d_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
     756@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-limits.Tpo $(DEPDIR)/libcfa_d_a-limits.Po
     757@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_d_a-limits.obj' libtool=no @AMDEPBACKSLASH@
     758@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     759@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
     760
     761libcfa_d_a-rational.o: rational.c
     762@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     763@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
     764@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.o' libtool=no @AMDEPBACKSLASH@
     765@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     766@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     767
     768libcfa_d_a-rational.obj: rational.c
     769@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     770@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
     771@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.obj' libtool=no @AMDEPBACKSLASH@
     772@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     773@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     774
     775libcfa_d_a-stdlib.o: stdlib.c
     776@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-stdlib.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-stdlib.Tpo -c -o libcfa_d_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
     777@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-stdlib.Tpo $(DEPDIR)/libcfa_d_a-stdlib.Po
     778@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_d_a-stdlib.o' libtool=no @AMDEPBACKSLASH@
     779@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     780@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
     781
     782libcfa_d_a-stdlib.obj: stdlib.c
     783@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-stdlib.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-stdlib.Tpo -c -o libcfa_d_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
     784@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-stdlib.Tpo $(DEPDIR)/libcfa_d_a-stdlib.Po
     785@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_d_a-stdlib.obj' libtool=no @AMDEPBACKSLASH@
     786@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     787@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
     788
     789containers/libcfa_d_a-maybe.o: containers/maybe.c
     790@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-maybe.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo -c -o containers/libcfa_d_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     791@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo containers/$(DEPDIR)/libcfa_d_a-maybe.Po
     792@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_d_a-maybe.o' libtool=no @AMDEPBACKSLASH@
     793@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     794@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     795
     796containers/libcfa_d_a-maybe.obj: containers/maybe.c
     797@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-maybe.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo -c -o containers/libcfa_d_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
     798@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo containers/$(DEPDIR)/libcfa_d_a-maybe.Po
     799@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_d_a-maybe.obj' libtool=no @AMDEPBACKSLASH@
     800@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     801@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
     802
     803containers/libcfa_d_a-pair.o: containers/pair.c
     804@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-pair.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-pair.Tpo -c -o containers/libcfa_d_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
     805@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-pair.Tpo containers/$(DEPDIR)/libcfa_d_a-pair.Po
     806@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_d_a-pair.o' libtool=no @AMDEPBACKSLASH@
     807@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     808@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
     809
     810containers/libcfa_d_a-pair.obj: containers/pair.c
     811@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-pair.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-pair.Tpo -c -o containers/libcfa_d_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
     812@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-pair.Tpo containers/$(DEPDIR)/libcfa_d_a-pair.Po
     813@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_d_a-pair.obj' libtool=no @AMDEPBACKSLASH@
     814@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     815@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
     816
     817containers/libcfa_d_a-result.o: containers/result.c
     818@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-result.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-result.Tpo -c -o containers/libcfa_d_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     819@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-result.Tpo containers/$(DEPDIR)/libcfa_d_a-result.Po
     820@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_d_a-result.o' libtool=no @AMDEPBACKSLASH@
     821@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     822@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     823
     824containers/libcfa_d_a-result.obj: containers/result.c
     825@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-result.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-result.Tpo -c -o containers/libcfa_d_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
     826@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-result.Tpo containers/$(DEPDIR)/libcfa_d_a-result.Po
     827@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_d_a-result.obj' libtool=no @AMDEPBACKSLASH@
     828@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     829@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
     830
     831containers/libcfa_d_a-vector.o: containers/vector.c
     832@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-vector.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-vector.Tpo -c -o containers/libcfa_d_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
     833@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-vector.Tpo containers/$(DEPDIR)/libcfa_d_a-vector.Po
     834@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_d_a-vector.o' libtool=no @AMDEPBACKSLASH@
     835@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     836@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
     837
     838containers/libcfa_d_a-vector.obj: containers/vector.c
     839@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-vector.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-vector.Tpo -c -o containers/libcfa_d_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
     840@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-vector.Tpo containers/$(DEPDIR)/libcfa_d_a-vector.Po
     841@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_d_a-vector.obj' libtool=no @AMDEPBACKSLASH@
     842@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     843@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
     844
     845concurrency/libcfa_d_a-coroutine.o: concurrency/coroutine.c
     846@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-coroutine.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo -c -o concurrency/libcfa_d_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
     847@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Po
     848@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_d_a-coroutine.o' libtool=no @AMDEPBACKSLASH@
     849@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     850@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
     851
     852concurrency/libcfa_d_a-coroutine.obj: concurrency/coroutine.c
     853@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-coroutine.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo -c -o concurrency/libcfa_d_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
     854@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Po
     855@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_d_a-coroutine.obj' libtool=no @AMDEPBACKSLASH@
     856@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     857@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
     858
     859concurrency/libcfa_d_a-thread.o: concurrency/thread.c
     860@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-thread.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo -c -o concurrency/libcfa_d_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
     861@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_d_a-thread.Po
     862@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_d_a-thread.o' libtool=no @AMDEPBACKSLASH@
     863@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     864@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
     865
     866concurrency/libcfa_d_a-thread.obj: concurrency/thread.c
     867@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-thread.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo -c -o concurrency/libcfa_d_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
     868@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_d_a-thread.Po
     869@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_d_a-thread.obj' libtool=no @AMDEPBACKSLASH@
     870@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     871@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
     872
     873concurrency/libcfa_d_a-kernel.o: concurrency/kernel.c
     874@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-kernel.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo -c -o concurrency/libcfa_d_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
     875@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_d_a-kernel.Po
     876@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_d_a-kernel.o' libtool=no @AMDEPBACKSLASH@
     877@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     878@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
     879
     880concurrency/libcfa_d_a-kernel.obj: concurrency/kernel.c
     881@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-kernel.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo -c -o concurrency/libcfa_d_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
     882@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_d_a-kernel.Po
     883@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_d_a-kernel.obj' libtool=no @AMDEPBACKSLASH@
     884@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     885@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
     886
     887concurrency/libcfa_d_a-monitor.o: concurrency/monitor.c
     888@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     889@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
     890@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.o' libtool=no @AMDEPBACKSLASH@
     891@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     892@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     893
     894concurrency/libcfa_d_a-monitor.obj: concurrency/monitor.c
     895@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
     896@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
     897@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
     898@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     899@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
     900
    699901libcfa_d_a-assert.o: assert.c
    700902@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-assert.Tpo -c -o libcfa_d_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
     
    711913@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
    712914
    713 libcfa_d_a-fstream.o: fstream.c
    714 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    715 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
    716 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.o' libtool=no @AMDEPBACKSLASH@
    717 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    718 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    719 
    720 libcfa_d_a-fstream.obj: fstream.c
    721 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-fstream.Tpo -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    722 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-fstream.Tpo $(DEPDIR)/libcfa_d_a-fstream.Po
    723 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_d_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
    724 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    725 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    726 
    727 libcfa_d_a-iostream.o: iostream.c
    728 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    729 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
    730 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.o' libtool=no @AMDEPBACKSLASH@
    731 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    732 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    733 
    734 libcfa_d_a-iostream.obj: iostream.c
    735 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iostream.Tpo -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    736 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iostream.Tpo $(DEPDIR)/libcfa_d_a-iostream.Po
    737 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_d_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
    738 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    739 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    740 
    741 libcfa_d_a-iterator.o: iterator.c
    742 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    743 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
    744 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.o' libtool=no @AMDEPBACKSLASH@
    745 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    746 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    747 
    748 libcfa_d_a-iterator.obj: iterator.c
    749 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-iterator.Tpo -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    750 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-iterator.Tpo $(DEPDIR)/libcfa_d_a-iterator.Po
    751 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_d_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
    752 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    753 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    754 
    755 libcfa_d_a-limits.o: limits.c
    756 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-limits.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-limits.Tpo -c -o libcfa_d_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
    757 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-limits.Tpo $(DEPDIR)/libcfa_d_a-limits.Po
    758 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_d_a-limits.o' libtool=no @AMDEPBACKSLASH@
    759 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    760 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
    761 
    762 libcfa_d_a-limits.obj: limits.c
    763 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-limits.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-limits.Tpo -c -o libcfa_d_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
    764 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-limits.Tpo $(DEPDIR)/libcfa_d_a-limits.Po
    765 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_d_a-limits.obj' libtool=no @AMDEPBACKSLASH@
    766 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    767 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
    768 
    769 libcfa_d_a-math.o: math.c
    770 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    771 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po
    772 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_d_a-math.o' libtool=no @AMDEPBACKSLASH@
    773 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    774 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    775 
    776 libcfa_d_a-math.obj: math.c
    777 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-math.Tpo -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    778 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-math.Tpo $(DEPDIR)/libcfa_d_a-math.Po
    779 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_d_a-math.obj' libtool=no @AMDEPBACKSLASH@
    780 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    781 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    782 
    783 libcfa_d_a-rational.o: rational.c
    784 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    785 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
    786 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.o' libtool=no @AMDEPBACKSLASH@
    787 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    788 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    789 
    790 libcfa_d_a-rational.obj: rational.c
    791 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-rational.Tpo -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    792 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-rational.Tpo $(DEPDIR)/libcfa_d_a-rational.Po
    793 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_d_a-rational.obj' libtool=no @AMDEPBACKSLASH@
    794 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    795 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    796 
    797 libcfa_d_a-stdlib.o: stdlib.c
    798 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-stdlib.o -MD -MP -MF $(DEPDIR)/libcfa_d_a-stdlib.Tpo -c -o libcfa_d_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
    799 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-stdlib.Tpo $(DEPDIR)/libcfa_d_a-stdlib.Po
    800 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_d_a-stdlib.o' libtool=no @AMDEPBACKSLASH@
    801 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    802 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
    803 
    804 libcfa_d_a-stdlib.obj: stdlib.c
    805 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-stdlib.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-stdlib.Tpo -c -o libcfa_d_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
    806 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-stdlib.Tpo $(DEPDIR)/libcfa_d_a-stdlib.Po
    807 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_d_a-stdlib.obj' libtool=no @AMDEPBACKSLASH@
    808 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    809 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
    810 
    811 containers/libcfa_d_a-maybe.o: containers/maybe.c
    812 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-maybe.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo -c -o containers/libcfa_d_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
    813 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo containers/$(DEPDIR)/libcfa_d_a-maybe.Po
    814 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_d_a-maybe.o' libtool=no @AMDEPBACKSLASH@
    815 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    816 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
    817 
    818 containers/libcfa_d_a-maybe.obj: containers/maybe.c
    819 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-maybe.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo -c -o containers/libcfa_d_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
    820 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-maybe.Tpo containers/$(DEPDIR)/libcfa_d_a-maybe.Po
    821 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_d_a-maybe.obj' libtool=no @AMDEPBACKSLASH@
    822 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    823 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
    824 
    825 containers/libcfa_d_a-pair.o: containers/pair.c
    826 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-pair.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-pair.Tpo -c -o containers/libcfa_d_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
    827 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-pair.Tpo containers/$(DEPDIR)/libcfa_d_a-pair.Po
    828 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_d_a-pair.o' libtool=no @AMDEPBACKSLASH@
    829 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    830 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
    831 
    832 containers/libcfa_d_a-pair.obj: containers/pair.c
    833 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-pair.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-pair.Tpo -c -o containers/libcfa_d_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
    834 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-pair.Tpo containers/$(DEPDIR)/libcfa_d_a-pair.Po
    835 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_d_a-pair.obj' libtool=no @AMDEPBACKSLASH@
    836 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    837 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
    838 
    839 containers/libcfa_d_a-result.o: containers/result.c
    840 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-result.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-result.Tpo -c -o containers/libcfa_d_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
    841 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-result.Tpo containers/$(DEPDIR)/libcfa_d_a-result.Po
    842 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_d_a-result.o' libtool=no @AMDEPBACKSLASH@
    843 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    844 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
    845 
    846 containers/libcfa_d_a-result.obj: containers/result.c
    847 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-result.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-result.Tpo -c -o containers/libcfa_d_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
    848 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-result.Tpo containers/$(DEPDIR)/libcfa_d_a-result.Po
    849 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_d_a-result.obj' libtool=no @AMDEPBACKSLASH@
    850 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    851 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
    852 
    853 containers/libcfa_d_a-vector.o: containers/vector.c
    854 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-vector.o -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-vector.Tpo -c -o containers/libcfa_d_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
    855 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-vector.Tpo containers/$(DEPDIR)/libcfa_d_a-vector.Po
    856 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_d_a-vector.o' libtool=no @AMDEPBACKSLASH@
    857 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    858 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
    859 
    860 containers/libcfa_d_a-vector.obj: containers/vector.c
    861 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_d_a-vector.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_d_a-vector.Tpo -c -o containers/libcfa_d_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
    862 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_d_a-vector.Tpo containers/$(DEPDIR)/libcfa_d_a-vector.Po
    863 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_d_a-vector.obj' libtool=no @AMDEPBACKSLASH@
    864 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    865 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_d_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
    866 
    867 concurrency/libcfa_d_a-coroutine.o: concurrency/coroutine.c
    868 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-coroutine.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo -c -o concurrency/libcfa_d_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
    869 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Po
    870 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_d_a-coroutine.o' libtool=no @AMDEPBACKSLASH@
    871 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    872 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
    873 
    874 concurrency/libcfa_d_a-coroutine.obj: concurrency/coroutine.c
    875 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-coroutine.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo -c -o concurrency/libcfa_d_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
    876 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_d_a-coroutine.Po
    877 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_d_a-coroutine.obj' libtool=no @AMDEPBACKSLASH@
    878 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    879 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
    880 
    881 concurrency/libcfa_d_a-thread.o: concurrency/thread.c
    882 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-thread.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo -c -o concurrency/libcfa_d_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
    883 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_d_a-thread.Po
    884 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_d_a-thread.o' libtool=no @AMDEPBACKSLASH@
    885 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    886 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
    887 
    888 concurrency/libcfa_d_a-thread.obj: concurrency/thread.c
    889 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-thread.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo -c -o concurrency/libcfa_d_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
    890 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_d_a-thread.Po
    891 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_d_a-thread.obj' libtool=no @AMDEPBACKSLASH@
    892 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    893 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
    894 
    895 concurrency/libcfa_d_a-kernel.o: concurrency/kernel.c
    896 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-kernel.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo -c -o concurrency/libcfa_d_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
    897 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_d_a-kernel.Po
    898 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_d_a-kernel.o' libtool=no @AMDEPBACKSLASH@
    899 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    900 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
    901 
    902 concurrency/libcfa_d_a-kernel.obj: concurrency/kernel.c
    903 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-kernel.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo -c -o concurrency/libcfa_d_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
    904 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_d_a-kernel.Po
    905 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_d_a-kernel.obj' libtool=no @AMDEPBACKSLASH@
    906 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    907 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
    908 
    909 concurrency/libcfa_d_a-monitor.o: concurrency/monitor.c
    910 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
    911 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
    912 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.o' libtool=no @AMDEPBACKSLASH@
    913 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    914 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
    915 
    916 concurrency/libcfa_d_a-monitor.obj: concurrency/monitor.c
    917 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
    918 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
    919 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
    920 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    921 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
    922 
    923915libcfa_d_a-exception.obj: exception.c
    924916@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-exception.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-exception.Tpo -c -o libcfa_d_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
     
    928920@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
    929921
     922libcfa_d_a-virtual.obj: virtual.c
     923@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT libcfa_d_a-virtual.obj -MD -MP -MF $(DEPDIR)/libcfa_d_a-virtual.Tpo -c -o libcfa_d_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi`
     924@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_d_a-virtual.Tpo $(DEPDIR)/libcfa_d_a-virtual.Po
     925@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='virtual.c' object='libcfa_d_a-virtual.obj' libtool=no @AMDEPBACKSLASH@
     926@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     927@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o libcfa_d_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi`
     928
    930929concurrency/libcfa_d_a-alarm.o: concurrency/alarm.c
    931930@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-alarm.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-alarm.Tpo -c -o concurrency/libcfa_d_a-alarm.o `test -f 'concurrency/alarm.c' || echo '$(srcdir)/'`concurrency/alarm.c
     
    998997@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libhdr/libcfa_a-libdebug.obj `if test -f 'libhdr/libdebug.c'; then $(CYGPATH_W) 'libhdr/libdebug.c'; else $(CYGPATH_W) '$(srcdir)/libhdr/libdebug.c'; fi`
    999998
     999libcfa_a-fstream.o: fstream.c
     1000@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     1001@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
     1002@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.o' libtool=no @AMDEPBACKSLASH@
     1003@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1004@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
     1005
     1006libcfa_a-fstream.obj: fstream.c
     1007@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     1008@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
     1009@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
     1010@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1011@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
     1012
     1013libcfa_a-iostream.o: iostream.c
     1014@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     1015@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
     1016@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.o' libtool=no @AMDEPBACKSLASH@
     1017@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1018@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
     1019
     1020libcfa_a-iostream.obj: iostream.c
     1021@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     1022@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
     1023@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
     1024@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1025@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
     1026
     1027libcfa_a-iterator.o: iterator.c
     1028@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     1029@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
     1030@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.o' libtool=no @AMDEPBACKSLASH@
     1031@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1032@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
     1033
     1034libcfa_a-iterator.obj: iterator.c
     1035@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     1036@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
     1037@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
     1038@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1039@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
     1040
     1041libcfa_a-limits.o: limits.c
     1042@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-limits.o -MD -MP -MF $(DEPDIR)/libcfa_a-limits.Tpo -c -o libcfa_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
     1043@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-limits.Tpo $(DEPDIR)/libcfa_a-limits.Po
     1044@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_a-limits.o' libtool=no @AMDEPBACKSLASH@
     1045@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1046@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
     1047
     1048libcfa_a-limits.obj: limits.c
     1049@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-limits.obj -MD -MP -MF $(DEPDIR)/libcfa_a-limits.Tpo -c -o libcfa_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
     1050@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-limits.Tpo $(DEPDIR)/libcfa_a-limits.Po
     1051@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_a-limits.obj' libtool=no @AMDEPBACKSLASH@
     1052@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1053@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
     1054
     1055libcfa_a-rational.o: rational.c
     1056@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     1057@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
     1058@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.o' libtool=no @AMDEPBACKSLASH@
     1059@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1060@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
     1061
     1062libcfa_a-rational.obj: rational.c
     1063@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     1064@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
     1065@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.obj' libtool=no @AMDEPBACKSLASH@
     1066@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1067@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
     1068
     1069libcfa_a-stdlib.o: stdlib.c
     1070@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-stdlib.o -MD -MP -MF $(DEPDIR)/libcfa_a-stdlib.Tpo -c -o libcfa_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
     1071@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-stdlib.Tpo $(DEPDIR)/libcfa_a-stdlib.Po
     1072@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_a-stdlib.o' libtool=no @AMDEPBACKSLASH@
     1073@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1074@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
     1075
     1076libcfa_a-stdlib.obj: stdlib.c
     1077@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-stdlib.obj -MD -MP -MF $(DEPDIR)/libcfa_a-stdlib.Tpo -c -o libcfa_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
     1078@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-stdlib.Tpo $(DEPDIR)/libcfa_a-stdlib.Po
     1079@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_a-stdlib.obj' libtool=no @AMDEPBACKSLASH@
     1080@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1081@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
     1082
     1083containers/libcfa_a-maybe.o: containers/maybe.c
     1084@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-maybe.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-maybe.Tpo -c -o containers/libcfa_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     1085@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-maybe.Tpo containers/$(DEPDIR)/libcfa_a-maybe.Po
     1086@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_a-maybe.o' libtool=no @AMDEPBACKSLASH@
     1087@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1088@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
     1089
     1090containers/libcfa_a-maybe.obj: containers/maybe.c
     1091@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-maybe.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-maybe.Tpo -c -o containers/libcfa_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
     1092@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-maybe.Tpo containers/$(DEPDIR)/libcfa_a-maybe.Po
     1093@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_a-maybe.obj' libtool=no @AMDEPBACKSLASH@
     1094@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1095@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
     1096
     1097containers/libcfa_a-pair.o: containers/pair.c
     1098@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-pair.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-pair.Tpo -c -o containers/libcfa_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
     1099@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-pair.Tpo containers/$(DEPDIR)/libcfa_a-pair.Po
     1100@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_a-pair.o' libtool=no @AMDEPBACKSLASH@
     1101@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1102@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
     1103
     1104containers/libcfa_a-pair.obj: containers/pair.c
     1105@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-pair.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-pair.Tpo -c -o containers/libcfa_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
     1106@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-pair.Tpo containers/$(DEPDIR)/libcfa_a-pair.Po
     1107@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_a-pair.obj' libtool=no @AMDEPBACKSLASH@
     1108@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1109@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
     1110
     1111containers/libcfa_a-result.o: containers/result.c
     1112@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-result.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-result.Tpo -c -o containers/libcfa_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     1113@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-result.Tpo containers/$(DEPDIR)/libcfa_a-result.Po
     1114@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_a-result.o' libtool=no @AMDEPBACKSLASH@
     1115@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1116@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
     1117
     1118containers/libcfa_a-result.obj: containers/result.c
     1119@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-result.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-result.Tpo -c -o containers/libcfa_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
     1120@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-result.Tpo containers/$(DEPDIR)/libcfa_a-result.Po
     1121@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_a-result.obj' libtool=no @AMDEPBACKSLASH@
     1122@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1123@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
     1124
     1125containers/libcfa_a-vector.o: containers/vector.c
     1126@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-vector.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-vector.Tpo -c -o containers/libcfa_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
     1127@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-vector.Tpo containers/$(DEPDIR)/libcfa_a-vector.Po
     1128@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_a-vector.o' libtool=no @AMDEPBACKSLASH@
     1129@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1130@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
     1131
     1132containers/libcfa_a-vector.obj: containers/vector.c
     1133@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-vector.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-vector.Tpo -c -o containers/libcfa_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
     1134@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-vector.Tpo containers/$(DEPDIR)/libcfa_a-vector.Po
     1135@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_a-vector.obj' libtool=no @AMDEPBACKSLASH@
     1136@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1137@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
     1138
     1139concurrency/libcfa_a-coroutine.o: concurrency/coroutine.c
     1140@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-coroutine.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo -c -o concurrency/libcfa_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
     1141@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_a-coroutine.Po
     1142@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_a-coroutine.o' libtool=no @AMDEPBACKSLASH@
     1143@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1144@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
     1145
     1146concurrency/libcfa_a-coroutine.obj: concurrency/coroutine.c
     1147@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-coroutine.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo -c -o concurrency/libcfa_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
     1148@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_a-coroutine.Po
     1149@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_a-coroutine.obj' libtool=no @AMDEPBACKSLASH@
     1150@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1151@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
     1152
     1153concurrency/libcfa_a-thread.o: concurrency/thread.c
     1154@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-thread.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-thread.Tpo -c -o concurrency/libcfa_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
     1155@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_a-thread.Po
     1156@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_a-thread.o' libtool=no @AMDEPBACKSLASH@
     1157@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1158@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
     1159
     1160concurrency/libcfa_a-thread.obj: concurrency/thread.c
     1161@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-thread.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-thread.Tpo -c -o concurrency/libcfa_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
     1162@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_a-thread.Po
     1163@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_a-thread.obj' libtool=no @AMDEPBACKSLASH@
     1164@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1165@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
     1166
     1167concurrency/libcfa_a-kernel.o: concurrency/kernel.c
     1168@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-kernel.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo -c -o concurrency/libcfa_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
     1169@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_a-kernel.Po
     1170@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_a-kernel.o' libtool=no @AMDEPBACKSLASH@
     1171@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1172@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
     1173
     1174concurrency/libcfa_a-kernel.obj: concurrency/kernel.c
     1175@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-kernel.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo -c -o concurrency/libcfa_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
     1176@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_a-kernel.Po
     1177@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_a-kernel.obj' libtool=no @AMDEPBACKSLASH@
     1178@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1179@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
     1180
     1181concurrency/libcfa_a-monitor.o: concurrency/monitor.c
     1182@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     1183@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
     1184@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.o' libtool=no @AMDEPBACKSLASH@
     1185@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1186@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
     1187
     1188concurrency/libcfa_a-monitor.obj: concurrency/monitor.c
     1189@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
     1190@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
     1191@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
     1192@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1193@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
     1194
    10001195libcfa_a-assert.o: assert.c
    10011196@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-assert.o -MD -MP -MF $(DEPDIR)/libcfa_a-assert.Tpo -c -o libcfa_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c
     
    10121207@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi`
    10131208
    1014 libcfa_a-fstream.o: fstream.c
    1015 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.o -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    1016 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
    1017 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.o' libtool=no @AMDEPBACKSLASH@
    1018 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1019 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.o `test -f 'fstream.c' || echo '$(srcdir)/'`fstream.c
    1020 
    1021 libcfa_a-fstream.obj: fstream.c
    1022 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-fstream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-fstream.Tpo -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    1023 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-fstream.Tpo $(DEPDIR)/libcfa_a-fstream.Po
    1024 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='fstream.c' object='libcfa_a-fstream.obj' libtool=no @AMDEPBACKSLASH@
    1025 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1026 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-fstream.obj `if test -f 'fstream.c'; then $(CYGPATH_W) 'fstream.c'; else $(CYGPATH_W) '$(srcdir)/fstream.c'; fi`
    1027 
    1028 libcfa_a-iostream.o: iostream.c
    1029 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.o -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    1030 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
    1031 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.o' libtool=no @AMDEPBACKSLASH@
    1032 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1033 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.o `test -f 'iostream.c' || echo '$(srcdir)/'`iostream.c
    1034 
    1035 libcfa_a-iostream.obj: iostream.c
    1036 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iostream.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iostream.Tpo -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    1037 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iostream.Tpo $(DEPDIR)/libcfa_a-iostream.Po
    1038 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iostream.c' object='libcfa_a-iostream.obj' libtool=no @AMDEPBACKSLASH@
    1039 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1040 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iostream.obj `if test -f 'iostream.c'; then $(CYGPATH_W) 'iostream.c'; else $(CYGPATH_W) '$(srcdir)/iostream.c'; fi`
    1041 
    1042 libcfa_a-iterator.o: iterator.c
    1043 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.o -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    1044 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
    1045 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.o' libtool=no @AMDEPBACKSLASH@
    1046 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1047 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.o `test -f 'iterator.c' || echo '$(srcdir)/'`iterator.c
    1048 
    1049 libcfa_a-iterator.obj: iterator.c
    1050 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-iterator.obj -MD -MP -MF $(DEPDIR)/libcfa_a-iterator.Tpo -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    1051 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-iterator.Tpo $(DEPDIR)/libcfa_a-iterator.Po
    1052 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='iterator.c' object='libcfa_a-iterator.obj' libtool=no @AMDEPBACKSLASH@
    1053 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1054 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-iterator.obj `if test -f 'iterator.c'; then $(CYGPATH_W) 'iterator.c'; else $(CYGPATH_W) '$(srcdir)/iterator.c'; fi`
    1055 
    1056 libcfa_a-limits.o: limits.c
    1057 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-limits.o -MD -MP -MF $(DEPDIR)/libcfa_a-limits.Tpo -c -o libcfa_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
    1058 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-limits.Tpo $(DEPDIR)/libcfa_a-limits.Po
    1059 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_a-limits.o' libtool=no @AMDEPBACKSLASH@
    1060 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1061 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-limits.o `test -f 'limits.c' || echo '$(srcdir)/'`limits.c
    1062 
    1063 libcfa_a-limits.obj: limits.c
    1064 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-limits.obj -MD -MP -MF $(DEPDIR)/libcfa_a-limits.Tpo -c -o libcfa_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
    1065 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-limits.Tpo $(DEPDIR)/libcfa_a-limits.Po
    1066 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='limits.c' object='libcfa_a-limits.obj' libtool=no @AMDEPBACKSLASH@
    1067 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1068 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-limits.obj `if test -f 'limits.c'; then $(CYGPATH_W) 'limits.c'; else $(CYGPATH_W) '$(srcdir)/limits.c'; fi`
    1069 
    1070 libcfa_a-math.o: math.c
    1071 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.o -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    1072 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po
    1073 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_a-math.o' libtool=no @AMDEPBACKSLASH@
    1074 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1075 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.o `test -f 'math.c' || echo '$(srcdir)/'`math.c
    1076 
    1077 libcfa_a-math.obj: math.c
    1078 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-math.obj -MD -MP -MF $(DEPDIR)/libcfa_a-math.Tpo -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    1079 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-math.Tpo $(DEPDIR)/libcfa_a-math.Po
    1080 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='math.c' object='libcfa_a-math.obj' libtool=no @AMDEPBACKSLASH@
    1081 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1082 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-math.obj `if test -f 'math.c'; then $(CYGPATH_W) 'math.c'; else $(CYGPATH_W) '$(srcdir)/math.c'; fi`
    1083 
    1084 libcfa_a-rational.o: rational.c
    1085 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.o -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    1086 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
    1087 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.o' libtool=no @AMDEPBACKSLASH@
    1088 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1089 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.o `test -f 'rational.c' || echo '$(srcdir)/'`rational.c
    1090 
    1091 libcfa_a-rational.obj: rational.c
    1092 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-rational.obj -MD -MP -MF $(DEPDIR)/libcfa_a-rational.Tpo -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    1093 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-rational.Tpo $(DEPDIR)/libcfa_a-rational.Po
    1094 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='rational.c' object='libcfa_a-rational.obj' libtool=no @AMDEPBACKSLASH@
    1095 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1096 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-rational.obj `if test -f 'rational.c'; then $(CYGPATH_W) 'rational.c'; else $(CYGPATH_W) '$(srcdir)/rational.c'; fi`
    1097 
    1098 libcfa_a-stdlib.o: stdlib.c
    1099 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-stdlib.o -MD -MP -MF $(DEPDIR)/libcfa_a-stdlib.Tpo -c -o libcfa_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
    1100 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-stdlib.Tpo $(DEPDIR)/libcfa_a-stdlib.Po
    1101 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_a-stdlib.o' libtool=no @AMDEPBACKSLASH@
    1102 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1103 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-stdlib.o `test -f 'stdlib.c' || echo '$(srcdir)/'`stdlib.c
    1104 
    1105 libcfa_a-stdlib.obj: stdlib.c
    1106 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-stdlib.obj -MD -MP -MF $(DEPDIR)/libcfa_a-stdlib.Tpo -c -o libcfa_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
    1107 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-stdlib.Tpo $(DEPDIR)/libcfa_a-stdlib.Po
    1108 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='stdlib.c' object='libcfa_a-stdlib.obj' libtool=no @AMDEPBACKSLASH@
    1109 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1110 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-stdlib.obj `if test -f 'stdlib.c'; then $(CYGPATH_W) 'stdlib.c'; else $(CYGPATH_W) '$(srcdir)/stdlib.c'; fi`
    1111 
    1112 containers/libcfa_a-maybe.o: containers/maybe.c
    1113 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-maybe.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-maybe.Tpo -c -o containers/libcfa_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
    1114 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-maybe.Tpo containers/$(DEPDIR)/libcfa_a-maybe.Po
    1115 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_a-maybe.o' libtool=no @AMDEPBACKSLASH@
    1116 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1117 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-maybe.o `test -f 'containers/maybe.c' || echo '$(srcdir)/'`containers/maybe.c
    1118 
    1119 containers/libcfa_a-maybe.obj: containers/maybe.c
    1120 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-maybe.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-maybe.Tpo -c -o containers/libcfa_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
    1121 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-maybe.Tpo containers/$(DEPDIR)/libcfa_a-maybe.Po
    1122 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/maybe.c' object='containers/libcfa_a-maybe.obj' libtool=no @AMDEPBACKSLASH@
    1123 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1124 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-maybe.obj `if test -f 'containers/maybe.c'; then $(CYGPATH_W) 'containers/maybe.c'; else $(CYGPATH_W) '$(srcdir)/containers/maybe.c'; fi`
    1125 
    1126 containers/libcfa_a-pair.o: containers/pair.c
    1127 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-pair.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-pair.Tpo -c -o containers/libcfa_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
    1128 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-pair.Tpo containers/$(DEPDIR)/libcfa_a-pair.Po
    1129 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_a-pair.o' libtool=no @AMDEPBACKSLASH@
    1130 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1131 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-pair.o `test -f 'containers/pair.c' || echo '$(srcdir)/'`containers/pair.c
    1132 
    1133 containers/libcfa_a-pair.obj: containers/pair.c
    1134 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-pair.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-pair.Tpo -c -o containers/libcfa_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
    1135 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-pair.Tpo containers/$(DEPDIR)/libcfa_a-pair.Po
    1136 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/pair.c' object='containers/libcfa_a-pair.obj' libtool=no @AMDEPBACKSLASH@
    1137 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1138 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-pair.obj `if test -f 'containers/pair.c'; then $(CYGPATH_W) 'containers/pair.c'; else $(CYGPATH_W) '$(srcdir)/containers/pair.c'; fi`
    1139 
    1140 containers/libcfa_a-result.o: containers/result.c
    1141 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-result.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-result.Tpo -c -o containers/libcfa_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
    1142 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-result.Tpo containers/$(DEPDIR)/libcfa_a-result.Po
    1143 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_a-result.o' libtool=no @AMDEPBACKSLASH@
    1144 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1145 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-result.o `test -f 'containers/result.c' || echo '$(srcdir)/'`containers/result.c
    1146 
    1147 containers/libcfa_a-result.obj: containers/result.c
    1148 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-result.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-result.Tpo -c -o containers/libcfa_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
    1149 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-result.Tpo containers/$(DEPDIR)/libcfa_a-result.Po
    1150 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/result.c' object='containers/libcfa_a-result.obj' libtool=no @AMDEPBACKSLASH@
    1151 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1152 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-result.obj `if test -f 'containers/result.c'; then $(CYGPATH_W) 'containers/result.c'; else $(CYGPATH_W) '$(srcdir)/containers/result.c'; fi`
    1153 
    1154 containers/libcfa_a-vector.o: containers/vector.c
    1155 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-vector.o -MD -MP -MF containers/$(DEPDIR)/libcfa_a-vector.Tpo -c -o containers/libcfa_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
    1156 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-vector.Tpo containers/$(DEPDIR)/libcfa_a-vector.Po
    1157 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_a-vector.o' libtool=no @AMDEPBACKSLASH@
    1158 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1159 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-vector.o `test -f 'containers/vector.c' || echo '$(srcdir)/'`containers/vector.c
    1160 
    1161 containers/libcfa_a-vector.obj: containers/vector.c
    1162 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT containers/libcfa_a-vector.obj -MD -MP -MF containers/$(DEPDIR)/libcfa_a-vector.Tpo -c -o containers/libcfa_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
    1163 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) containers/$(DEPDIR)/libcfa_a-vector.Tpo containers/$(DEPDIR)/libcfa_a-vector.Po
    1164 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='containers/vector.c' object='containers/libcfa_a-vector.obj' libtool=no @AMDEPBACKSLASH@
    1165 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1166 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o containers/libcfa_a-vector.obj `if test -f 'containers/vector.c'; then $(CYGPATH_W) 'containers/vector.c'; else $(CYGPATH_W) '$(srcdir)/containers/vector.c'; fi`
    1167 
    1168 concurrency/libcfa_a-coroutine.o: concurrency/coroutine.c
    1169 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-coroutine.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo -c -o concurrency/libcfa_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
    1170 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_a-coroutine.Po
    1171 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_a-coroutine.o' libtool=no @AMDEPBACKSLASH@
    1172 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1173 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-coroutine.o `test -f 'concurrency/coroutine.c' || echo '$(srcdir)/'`concurrency/coroutine.c
    1174 
    1175 concurrency/libcfa_a-coroutine.obj: concurrency/coroutine.c
    1176 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-coroutine.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo -c -o concurrency/libcfa_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
    1177 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-coroutine.Tpo concurrency/$(DEPDIR)/libcfa_a-coroutine.Po
    1178 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/coroutine.c' object='concurrency/libcfa_a-coroutine.obj' libtool=no @AMDEPBACKSLASH@
    1179 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1180 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-coroutine.obj `if test -f 'concurrency/coroutine.c'; then $(CYGPATH_W) 'concurrency/coroutine.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/coroutine.c'; fi`
    1181 
    1182 concurrency/libcfa_a-thread.o: concurrency/thread.c
    1183 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-thread.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-thread.Tpo -c -o concurrency/libcfa_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
    1184 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_a-thread.Po
    1185 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_a-thread.o' libtool=no @AMDEPBACKSLASH@
    1186 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1187 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-thread.o `test -f 'concurrency/thread.c' || echo '$(srcdir)/'`concurrency/thread.c
    1188 
    1189 concurrency/libcfa_a-thread.obj: concurrency/thread.c
    1190 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-thread.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-thread.Tpo -c -o concurrency/libcfa_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
    1191 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-thread.Tpo concurrency/$(DEPDIR)/libcfa_a-thread.Po
    1192 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/thread.c' object='concurrency/libcfa_a-thread.obj' libtool=no @AMDEPBACKSLASH@
    1193 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1194 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-thread.obj `if test -f 'concurrency/thread.c'; then $(CYGPATH_W) 'concurrency/thread.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/thread.c'; fi`
    1195 
    1196 concurrency/libcfa_a-kernel.o: concurrency/kernel.c
    1197 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-kernel.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo -c -o concurrency/libcfa_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
    1198 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_a-kernel.Po
    1199 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_a-kernel.o' libtool=no @AMDEPBACKSLASH@
    1200 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1201 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-kernel.o `test -f 'concurrency/kernel.c' || echo '$(srcdir)/'`concurrency/kernel.c
    1202 
    1203 concurrency/libcfa_a-kernel.obj: concurrency/kernel.c
    1204 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-kernel.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo -c -o concurrency/libcfa_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
    1205 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-kernel.Tpo concurrency/$(DEPDIR)/libcfa_a-kernel.Po
    1206 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/kernel.c' object='concurrency/libcfa_a-kernel.obj' libtool=no @AMDEPBACKSLASH@
    1207 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1208 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
    1209 
    1210 concurrency/libcfa_a-monitor.o: concurrency/monitor.c
    1211 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
    1212 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
    1213 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.o' libtool=no @AMDEPBACKSLASH@
    1214 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1215 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
    1216 
    1217 concurrency/libcfa_a-monitor.obj: concurrency/monitor.c
    1218 @am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
    1219 @am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
    1220 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
    1221 @AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    1222 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
    1223 
    12241209libcfa_a-exception.obj: exception.c
    12251210@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-exception.obj -MD -MP -MF $(DEPDIR)/libcfa_a-exception.Tpo -c -o libcfa_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
     
    12281213@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    12291214@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-exception.obj `if test -f 'exception.c'; then $(CYGPATH_W) 'exception.c'; else $(CYGPATH_W) '$(srcdir)/exception.c'; fi`
     1215
     1216libcfa_a-virtual.obj: virtual.c
     1217@am__fastdepCC_TRUE@    $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT libcfa_a-virtual.obj -MD -MP -MF $(DEPDIR)/libcfa_a-virtual.Tpo -c -o libcfa_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi`
     1218@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/libcfa_a-virtual.Tpo $(DEPDIR)/libcfa_a-virtual.Po
     1219@AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='virtual.c' object='libcfa_a-virtual.obj' libtool=no @AMDEPBACKSLASH@
     1220@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     1221@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o libcfa_a-virtual.obj `if test -f 'virtual.c'; then $(CYGPATH_W) 'virtual.c'; else $(CYGPATH_W) '$(srcdir)/virtual.c'; fi`
    12301222
    12311223concurrency/libcfa_a-alarm.o: concurrency/alarm.c
     
    15211513        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
    15221514
     1515libcfa_a-virtual.o : virtual.c
     1516        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
     1517
    15231518concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
    15241519        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
    15251520
    15261521libcfa_d_a-exception.o : exception.c
     1522        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
     1523
     1524libcfa_d_a-virtual.o : virtual.c
    15271525        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
    15281526
  • src/libcfa/assert.c

    r3d4b23fa r0720e049  
    99// Author           : Thierry Delisle
    1010// Created On       : Mon Nov 28 12:27:26 2016
    11 // Last Modified By : Thierry Delisle
    12 // Last Modified On : Mon Nov 28 12:27:26 2016
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 15:10:26 2017
     13// Update Count     : 2
    1414//
    1515
    16 #include "assert"
    17 #include "stdlib"                                                                               // abort
    18 
     16#include <assert.h>
     17#include <stdarg.h>                                                             // varargs
     18#include <stdio.h>                                                              // fprintf
    1919#include "libhdr/libdebug.h"
    2020
    2121extern "C" {
    22         #include <stdarg.h>                                                             // varargs
    23         #include <stdio.h>                                                              // fprintf
    24 
    2522        extern const char * __progname;                                         // global name of running executable (argv[0])
    2623
     
    4744                abort();
    4845        }
    49 
    5046}
    5147
  • src/libcfa/concurrency/CtxSwitch-i386.S

    r3d4b23fa r0720e049  
    1 //                               -*- Mode: Asm -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Tue Dec 6 12:27:26 2016
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : Tue Dec 6 12:27:26 2016
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:29:25 2017
     13// Update Count     : 1
    1514//
    1615// This  library is free  software; you  can redistribute  it and/or  modify it
     
    9998
    10099// Local Variables: //
    101 // compile-command: "make install" //
     100// mode: c //
     101// tab-width: 4 //
    102102// End: //
  • src/libcfa/concurrency/CtxSwitch-x86_64.S

    r3d4b23fa r0720e049  
    1 //                               -*- Mode: Asm -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Mon Nov 28 12:27:26 2016
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : Mon Nov 28 12:27:26 2016
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:28:11 2017
     13// Update Count     : 1
    1514//
    1615// This  library is free  software; you  can redistribute  it and/or  modify it
  • src/libcfa/concurrency/alarm.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Fri Jun 2 11:31:25 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:35:18 2017
     13// Update Count     : 1
    1514//
    1615
     
    3130
    3231//=============================================================================================
     32// time type
     33//=============================================================================================
     34
     35#define one_second         1_000_000_000ul
     36#define one_milisecond         1_000_000ul
     37#define one_microsecond            1_000ul
     38#define one_nanosecond                 1ul
     39
     40__cfa_time_t zero_time = { 0 };
     41
     42void ?{}( __cfa_time_t * this ) { this->val = 0; }
     43void ?{}( __cfa_time_t * this, zero_t zero ) { this->val = 0; }
     44
     45void ?{}( itimerval * this, __cfa_time_t * alarm ) {
     46        this->it_value.tv_sec = alarm->val / one_second;                        // seconds
     47        this->it_value.tv_usec = max( (alarm->val % one_second) / one_microsecond, 1000 ); // microseconds
     48        this->it_interval.tv_sec = 0;
     49        this->it_interval.tv_usec = 0;
     50}
     51
     52
     53void ?{}( __cfa_time_t * this, timespec * curr ) {
     54        uint64_t secs  = curr->tv_sec;
     55        uint64_t nsecs = curr->tv_nsec;
     56        this->val = (secs * one_second) + nsecs;
     57}
     58
     59__cfa_time_t ?=?( __cfa_time_t * this, zero_t rhs ) {
     60        this->val = 0;
     61        return *this;
     62}
     63
     64__cfa_time_t from_s ( uint64_t val ) { __cfa_time_t ret; ret.val = val * 1_000_000_000ul; return ret; }
     65__cfa_time_t from_ms( uint64_t val ) { __cfa_time_t ret; ret.val = val *     1_000_000ul; return ret; }
     66__cfa_time_t from_us( uint64_t val ) { __cfa_time_t ret; ret.val = val *         1_000ul; return ret; }
     67__cfa_time_t from_ns( uint64_t val ) { __cfa_time_t ret; ret.val = val *             1ul; return ret; }
     68
     69//=============================================================================================
    3370// Clock logic
    3471//=============================================================================================
     
    3774        timespec curr;
    3875        clock_gettime( CLOCK_REALTIME, &curr );
    39         __cfa_time_t curr_time = ((__cfa_time_t)curr.tv_sec * TIMEGRAN) + curr.tv_nsec;
    40         // LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO, "Kernel : current time is %lu\n", curr_time );
    41         return curr_time;
     76        return (__cfa_time_t){ &curr };
    4277}
    4378
    4479void __kernel_set_timer( __cfa_time_t alarm ) {
    45         LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO, "Kernel : set timer to %lu\n", (__cfa_time_t)alarm );
    46         itimerval val;
    47         val.it_value.tv_sec = alarm / TIMEGRAN;                 // seconds
    48         val.it_value.tv_usec = (alarm % TIMEGRAN) / ( TIMEGRAN / 1_000_000L ); // microseconds
    49         val.it_interval.tv_sec = 0;
    50         val.it_interval.tv_usec = 0;
     80        itimerval val = { &alarm };
    5181        setitimer( ITIMER_REAL, &val, NULL );
    5282}
     
    5686//=============================================================================================
    5787
    58 void ?{}( alarm_node_t * this, thread_desc * thrd, __cfa_time_t alarm = 0, __cfa_time_t period = 0 ) {
     88void ?{}( alarm_node_t * this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) {
    5989        this->thrd = thrd;
    6090        this->alarm = alarm;
     
    6595}
    6696
    67 void ?{}( alarm_node_t * this, processor   * proc, __cfa_time_t alarm = 0, __cfa_time_t period = 0 ) {
     97void ?{}( alarm_node_t * this, processor   * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) {
    6898        this->proc = proc;
    6999        this->alarm = alarm;
     
    153183
    154184void register_self( alarm_node_t * this ) {
     185        alarm_list_t * alarms = &event_kernel->alarms;
     186
    155187        disable_interrupts();
    156         verify( !systemProcessor->pending_alarm );
    157         lock( &systemProcessor->alarm_lock DEBUG_CTX2 );
     188        lock( &event_kernel->lock DEBUG_CTX2 );
    158189        {
    159                 verify( validate( &systemProcessor->alarms ) );
    160                 bool first = !systemProcessor->alarms.head;
    161 
    162                 insert( &systemProcessor->alarms, this );
    163                 if( systemProcessor->pending_alarm ) {
    164                         tick_preemption();
     190                verify( validate( alarms ) );
     191                bool first = !alarms->head;
     192
     193                insert( alarms, this );
     194                if( first ) {
     195                        __kernel_set_timer( alarms->head->alarm - __kernel_get_time() );
    165196                }
    166                 if( first ) {
    167                         __kernel_set_timer( systemProcessor->alarms.head->alarm - __kernel_get_time() );
    168                 }
    169         }
    170         unlock( &systemProcessor->alarm_lock );
     197        }
     198        unlock( &event_kernel->lock );
    171199        this->set = true;
    172200        enable_interrupts( DEBUG_CTX );
     
    174202
    175203void unregister_self( alarm_node_t * this ) {
    176         // LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO, "Kernel : unregister %p start\n", this );
    177204        disable_interrupts();
    178         lock( &systemProcessor->alarm_lock DEBUG_CTX2 );
     205        lock( &event_kernel->lock DEBUG_CTX2 );
    179206        {
    180                 verify( validate( &systemProcessor->alarms ) );
    181                 remove( &systemProcessor->alarms, this );
    182         }
    183         unlock( &systemProcessor->alarm_lock );
     207                verify( validate( &event_kernel->alarms ) );
     208                remove( &event_kernel->alarms, this );
     209        }
     210        unlock( &event_kernel->lock );
    184211        enable_interrupts( DEBUG_CTX );
    185212        this->set = false;
    186         // LIB_DEBUG_PRINT_BUFFER_LOCAL( STDERR_FILENO, "Kernel : unregister %p end\n", this );
    187 }
     213}
     214
     215// Local Variables: //
     216// mode: c //
     217// tab-width: 4 //
     218// End: //
  • src/libcfa/concurrency/alarm.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Fri Jun 2 11:31:25 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:59:27 2017
     13// Update Count     : 3
    1514//
    1615
    17 #ifndef ALARM_H
    18 #define ALARM_H
     16#pragma once
    1917
    2018#include <stdbool.h>
     19#include <stdint.h>
    2120
    22 #include "assert"
    23 
    24 typedef unsigned long int __cfa_time_t;
     21#include <assert.h>
    2522
    2623struct thread_desc;
    2724struct processor;
    2825
     26struct timespec;
     27struct itimerval;
     28
     29//=============================================================================================
     30// time type
     31//=============================================================================================
     32
     33struct __cfa_time_t {
     34        uint64_t val;
     35};
     36
     37// ctors
     38void ?{}( __cfa_time_t * this );
     39void ?{}( __cfa_time_t * this, zero_t zero );
     40void ?{}( __cfa_time_t * this, timespec * curr );
     41void ?{}( itimerval * this, __cfa_time_t * alarm );
     42
     43__cfa_time_t ?=?( __cfa_time_t * this, zero_t rhs );
     44
     45// logical ops
     46static inline bool ?==?( __cfa_time_t lhs, __cfa_time_t rhs ) { return lhs.val == rhs.val; }
     47static inline bool ?!=?( __cfa_time_t lhs, __cfa_time_t rhs ) { return lhs.val != rhs.val; }
     48static inline bool ?>? ( __cfa_time_t lhs, __cfa_time_t rhs ) { return lhs.val >  rhs.val; }
     49static inline bool ?<? ( __cfa_time_t lhs, __cfa_time_t rhs ) { return lhs.val <  rhs.val; }
     50static inline bool ?>=?( __cfa_time_t lhs, __cfa_time_t rhs ) { return lhs.val >= rhs.val; }
     51static inline bool ?<=?( __cfa_time_t lhs, __cfa_time_t rhs ) { return lhs.val <= rhs.val; }
     52
     53static inline bool ?==?( __cfa_time_t lhs, zero_t rhs ) { return lhs.val == rhs; }
     54static inline bool ?!=?( __cfa_time_t lhs, zero_t rhs ) { return lhs.val != rhs; }
     55static inline bool ?>? ( __cfa_time_t lhs, zero_t rhs ) { return lhs.val >  rhs; }
     56static inline bool ?<? ( __cfa_time_t lhs, zero_t rhs ) { return lhs.val <  rhs; }
     57static inline bool ?>=?( __cfa_time_t lhs, zero_t rhs ) { return lhs.val >= rhs; }
     58static inline bool ?<=?( __cfa_time_t lhs, zero_t rhs ) { return lhs.val <= rhs; }
     59
     60// addition/substract
     61static inline __cfa_time_t ?+?( __cfa_time_t lhs, __cfa_time_t rhs ) {
     62        __cfa_time_t ret;
     63        ret.val = lhs.val + rhs.val;
     64        return ret;
     65}
     66
     67static inline __cfa_time_t ?-?( __cfa_time_t lhs, __cfa_time_t rhs ) {
     68        __cfa_time_t ret;
     69        ret.val = lhs.val - rhs.val;
     70        return ret;
     71}
     72
     73__cfa_time_t from_s ( uint64_t );
     74__cfa_time_t from_ms( uint64_t );
     75__cfa_time_t from_us( uint64_t );
     76__cfa_time_t from_ns( uint64_t );
     77
     78extern __cfa_time_t zero_time;
     79
    2980//=============================================================================================
    3081// Clock logic
    3182//=============================================================================================
    32 
    33 #define TIMEGRAN 1_000_000_000L                         // nanosecond granularity, except for timeval
    3483
    3584__cfa_time_t __kernel_get_time();
     
    56105typedef alarm_node_t ** __alarm_it_t;
    57106
    58 void ?{}( alarm_node_t * this, thread_desc * thrd, __cfa_time_t alarm = 0, __cfa_time_t period = 0 );
    59 void ?{}( alarm_node_t * this, processor   * proc, __cfa_time_t alarm = 0, __cfa_time_t period = 0 );
     107void ?{}( alarm_node_t * this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time );
     108void ?{}( alarm_node_t * this, processor   * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time );
    60109void ^?{}( alarm_node_t * this );
    61110
     
    76125void unregister_self( alarm_node_t * this );
    77126
    78 #endif
    79 
    80127// Local Variables: //
    81 // mode: CFA //
     128// mode: c //
    82129// tab-width: 6 //
    83130// End: //
  • src/libcfa/concurrency/coroutine

    r3d4b23fa r0720e049  
    1010// Author           : Thierry Delisle
    1111// Created On       : Mon Nov 28 12:27:26 2016
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : Mon Nov 28 12:27:26 2016
    14 // Update Count     : 0
     12// Last Modified By : Peter A. Buhr
     13// Last Modified On : Sat Jul 22 09:57:17 2017
     14// Update Count     : 2
    1515//
    1616
    17 #ifndef COROUTINES_H
    18 #define COROUTINES_H
     17#pragma once
    1918
    20 #include "assert"
     19#include <assert.h>
    2120#include "invoke.h"
    2221
     
    6362
    6463// Get current coroutine
    65 extern volatile thread_local coroutine_desc * this_coroutine;
     64extern thread_local coroutine_desc * volatile this_coroutine;
    6665
    6766// Private wrappers for context switch and stack creation
     
    129128}
    130129
    131 #endif //COROUTINES_H
    132 
    133130// Local Variables: //
    134131// mode: c //
  • src/libcfa/concurrency/coroutine.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Mon Nov 28 12:27:26 2016
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : Mon Nov 28 12:27:26 2016
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:34:57 2017
     13// Update Count     : 1
    1514//
    1615
     
    2625}
    2726
    28 #include "kernel"
    29 #include "libhdr.h"
     27#include "kernel_private.h"
    3028
    3129#define __CFA_INVOKE_PRIVATE__
    3230#include "invoke.h"
    3331
    34 extern volatile thread_local processor * this_processor;
    3532
    3633//-----------------------------------------------------------------------------
  • src/libcfa/concurrency/invoke.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: C -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Tue Jan 17 12:27:26 2016
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:28:33 2017
     13// Update Count     : 1
    1514//
    1615
     
    142141#endif
    143142}
     143
     144// Local Variables: //
     145// mode: c //
     146// tab-width: 4 //
     147// End: //
  • src/libcfa/concurrency/invoke.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: C -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Tue Jan 17 12:27:26 2016
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:28:56 2017
     13// Update Count     : 1
    1514//
    1615
     
    130129}
    131130#endif
     131
     132// Local Variables: //
     133// mode: c //
     134// tab-width: 4 //
     135// End: //
  • src/libcfa/concurrency/kernel

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Tue Jan 17 12:27:26 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:58:39 2017
     13// Update Count     : 2
    1514//
    1615
    17 #ifndef KERNEL_H
    18 #define KERNEL_H
     16#pragma once
    1917
    2018#include <stdbool.h>
     
    2826//-----------------------------------------------------------------------------
    2927// Locks
    30 bool try_lock  ( spinlock * DEBUG_CTX_PARAM2 );
    31 void lock      ( spinlock * DEBUG_CTX_PARAM2 );
    32 void lock_yield( spinlock * DEBUG_CTX_PARAM2 );
    33 void unlock    ( spinlock * );
     28void lock      ( spinlock * DEBUG_CTX_PARAM2 );       // Lock the spinlock, spin if already acquired
     29void lock_yield( spinlock * DEBUG_CTX_PARAM2 );       // Lock the spinlock, yield repeatedly if already acquired
     30bool try_lock  ( spinlock * DEBUG_CTX_PARAM2 );       // Lock the spinlock, return false if already acquired
     31void unlock    ( spinlock * );                        // Unlock the spinlock
    3432
    3533struct semaphore {
     
    4846// Cluster
    4947struct cluster {
    50         __thread_queue_t ready_queue;
    51         spinlock lock;
     48        spinlock ready_queue_lock;                      // Ready queue locks
     49        __thread_queue_t ready_queue;                   // Ready queue for threads
     50        unsigned long long int preemption;              // Preemption rate on this cluster
    5251};
    5352
     
    7675static inline void ^?{}(FinishAction * this) {}
    7776
     77// Processor
     78// Wrapper around kernel threads
    7879struct processor {
    79         struct processorCtx_t * runner;
    80         cluster * cltr;
    81         pthread_t kernel_thread;
     80        // Main state
     81        struct processorCtx_t * runner;                 // Coroutine ctx who does keeps the state of the processor
     82        cluster * cltr;                                 // Cluster from which to get threads
     83        pthread_t kernel_thread;                        // Handle to pthreads
    8284
    83         semaphore terminated;
    84         volatile bool is_terminated;
     85        // Termination
     86        volatile bool do_terminate;                     // Set to true to notify the processor should terminate
     87        semaphore terminated;                           // Termination synchronisation
    8588
    86         struct FinishAction finish;
     89        // RunThread data
     90        struct FinishAction finish;                     // Action to do after a thread is ran
    8791
    88         struct alarm_node_t * preemption_alarm;
    89         unsigned int preemption;
     92        // Preemption data
     93        struct alarm_node_t * preemption_alarm;         // Node which is added in the discrete event simulaiton
     94        bool pending_preemption;                        // If true, a preemption was triggered in an unsafe region, the processor must preempt as soon as possible
    9095
    91         bool pending_preemption;
    92 
    93         char * last_enable;
     96#ifdef __CFA_DEBUG__
     97        char * last_enable;                             // Last function to enable preemption on this processor
     98#endif
    9499};
    95100
     
    98103void ^?{}(processor * this);
    99104
    100 #endif //KERNEL_H
    101 
    102105// Local Variables: //
    103 // mode: CFA //
    104 // tab-width: 6 //
     106// mode: c //
     107// tab-width: 4 //
    105108// End: //
  • src/libcfa/concurrency/kernel.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Tue Jan 17 12:27:26 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:33:18 2017
     13// Update Count     : 2
    1514//
    1615
     
    4241//-----------------------------------------------------------------------------
    4342// Kernel storage
    44 #define KERNEL_STORAGE(T,X) static char X##Storage[sizeof(T)]
    45 
    46 KERNEL_STORAGE(processorCtx_t, systemProcessorCtx);
    47 KERNEL_STORAGE(cluster, systemCluster);
    48 KERNEL_STORAGE(system_proc_t, systemProcessor);
    49 KERNEL_STORAGE(thread_desc, mainThread);
     43KERNEL_STORAGE(cluster,           mainCluster);
     44KERNEL_STORAGE(processor,         mainProcessor);
     45KERNEL_STORAGE(processorCtx_t,    mainProcessorCtx);
     46KERNEL_STORAGE(thread_desc,       mainThread);
    5047KERNEL_STORAGE(machine_context_t, mainThreadCtx);
    5148
    52 cluster * systemCluster;
    53 system_proc_t * systemProcessor;
     49cluster *     mainCluster;
     50processor *   mainProcessor;
    5451thread_desc * mainThread;
    5552
     
    5754// Global state
    5855
    59 volatile thread_local processor * this_processor;
    60 volatile thread_local coroutine_desc * this_coroutine;
    61 volatile thread_local thread_desc * this_thread;
     56thread_local coroutine_desc * volatile this_coroutine;
     57thread_local thread_desc *    volatile this_thread;
     58thread_local processor *      volatile this_processor;
     59
    6260volatile thread_local bool preemption_in_progress = 0;
    6361volatile thread_local unsigned short disable_preempt_count = 1;
     
    8583
    8684        this->limit = (void *)(((intptr_t)this->base) - this->size);
    87         this->context = &mainThreadCtxStorage;
     85        this->context = &storage_mainThreadCtx;
    8886        this->top = this->base;
    8987}
     
    125123
    126124void ?{}(processor * this) {
    127         this{ systemCluster };
     125        this{ mainCluster };
    128126}
    129127
     
    131129        this->cltr = cltr;
    132130        (&this->terminated){ 0 };
    133         this->is_terminated = false;
     131        this->do_terminate = false;
    134132        this->preemption_alarm = NULL;
    135         this->preemption = default_preemption();
    136133        this->pending_preemption = false;
    137134
     
    142139        this->cltr = cltr;
    143140        (&this->terminated){ 0 };
    144         this->is_terminated = false;
     141        this->do_terminate = false;
    145142        this->preemption_alarm = NULL;
    146         this->preemption = default_preemption();
    147143        this->pending_preemption = false;
    148144        this->kernel_thread = pthread_self();
    149145
    150146        this->runner = runner;
    151         LIB_DEBUG_PRINT_SAFE("Kernel : constructing system processor context %p\n", runner);
     147        LIB_DEBUG_PRINT_SAFE("Kernel : constructing main processor context %p\n", runner);
    152148        runner{ this };
    153149}
    154150
    155 LIB_DEBUG_DO( bool validate( alarm_list_t * this ); )
    156 
    157 void ?{}(system_proc_t * this, cluster * cltr, processorCtx_t * runner) {
    158         (&this->alarms){};
    159         (&this->alarm_lock){};
    160         this->pending_alarm = false;
    161 
    162         (&this->proc){ cltr, runner };
    163 
    164         verify( validate( &this->alarms ) );
    165 }
    166 
    167151void ^?{}(processor * this) {
    168         if( ! this->is_terminated ) {
     152        if( ! this->do_terminate ) {
    169153                LIB_DEBUG_PRINT_SAFE("Kernel : core %p signaling termination\n", this);
    170                 this->is_terminated = true;
     154                this->do_terminate = true;
    171155                P( &this->terminated );
    172156                pthread_join( this->kernel_thread, NULL );
     
    176160void ?{}(cluster * this) {
    177161        ( &this->ready_queue ){};
    178         ( &this->lock ){};
     162        ( &this->ready_queue_lock ){};
     163
     164        this->preemption = default_preemption();
    179165}
    180166
     
    199185
    200186                thread_desc * readyThread = NULL;
    201                 for( unsigned int spin_count = 0; ! this->is_terminated; spin_count++ )
     187                for( unsigned int spin_count = 0; ! this->do_terminate; spin_count++ )
    202188                {
    203189                        readyThread = nextThread( this->cltr );
     
    343329        verifyf( thrd->next == NULL, "Expected null got %p", thrd->next );
    344330
    345         lock( &systemProcessor->proc.cltr->lock DEBUG_CTX2 );
    346         append( &systemProcessor->proc.cltr->ready_queue, thrd );
    347         unlock( &systemProcessor->proc.cltr->lock );
     331        lock(   &this_processor->cltr->ready_queue_lock DEBUG_CTX2 );
     332        append( &this_processor->cltr->ready_queue, thrd );
     333        unlock( &this_processor->cltr->ready_queue_lock );
    348334
    349335        verify( disable_preempt_count > 0 );
     
    352338thread_desc * nextThread(cluster * this) {
    353339        verify( disable_preempt_count > 0 );
    354         lock( &this->lock DEBUG_CTX2 );
     340        lock( &this->ready_queue_lock DEBUG_CTX2 );
    355341        thread_desc * head = pop_head( &this->ready_queue );
    356         unlock( &this->lock );
     342        unlock( &this->ready_queue_lock );
    357343        verify( disable_preempt_count > 0 );
    358344        return head;
     
    452438        // Start by initializing the main thread
    453439        // SKULLDUGGERY: the mainThread steals the process main thread
    454         // which will then be scheduled by the systemProcessor normally
    455         mainThread = (thread_desc *)&mainThreadStorage;
     440        // which will then be scheduled by the mainProcessor normally
     441        mainThread = (thread_desc *)&storage_mainThread;
    456442        current_stack_info_t info;
    457443        mainThread{ &info };
     
    459445        LIB_DEBUG_PRINT_SAFE("Kernel : Main thread ready\n");
    460446
    461         // Initialize the system cluster
    462         systemCluster = (cluster *)&systemClusterStorage;
    463         systemCluster{};
    464 
    465         LIB_DEBUG_PRINT_SAFE("Kernel : System cluster ready\n");
    466 
    467         // Initialize the system processor and the system processor ctx
     447        // Initialize the main cluster
     448        mainCluster = (cluster *)&storage_mainCluster;
     449        mainCluster{};
     450
     451        LIB_DEBUG_PRINT_SAFE("Kernel : main cluster ready\n");
     452
     453        // Initialize the main processor and the main processor ctx
    468454        // (the coroutine that contains the processing control flow)
    469         systemProcessor = (system_proc_t *)&systemProcessorStorage;
    470         systemProcessor{ systemCluster, (processorCtx_t *)&systemProcessorCtxStorage };
    471 
    472         // Add the main thread to the ready queue
    473         // once resume is called on systemProcessor->runner the mainThread needs to be scheduled like any normal thread
    474         ScheduleThread(mainThread);
     455        mainProcessor = (processor *)&storage_mainProcessor;
     456        mainProcessor{ mainCluster, (processorCtx_t *)&storage_mainProcessorCtx };
    475457
    476458        //initialize the global state variables
    477         this_processor = &systemProcessor->proc;
     459        this_processor = mainProcessor;
    478460        this_thread = mainThread;
    479461        this_coroutine = &mainThread->cor;
    480         disable_preempt_count = 1;
    481462
    482463        // Enable preemption
    483464        kernel_start_preemption();
    484465
    485         // SKULLDUGGERY: Force a context switch to the system processor to set the main thread's context to the current UNIX
     466        // Add the main thread to the ready queue
     467        // once resume is called on mainProcessor->runner the mainThread needs to be scheduled like any normal thread
     468        ScheduleThread(mainThread);
     469
     470        // SKULLDUGGERY: Force a context switch to the main processor to set the main thread's context to the current UNIX
    486471        // context. Hence, the main thread does not begin through CtxInvokeThread, like all other threads. The trick here is that
    487472        // mainThread is on the ready queue when this call is made.
    488         resume( systemProcessor->proc.runner );
     473        resume( mainProcessor->runner );
    489474
    490475
     
    501486        disable_interrupts();
    502487
    503         // SKULLDUGGERY: Notify the systemProcessor it needs to terminates.
     488        // SKULLDUGGERY: Notify the mainProcessor it needs to terminates.
    504489        // When its coroutine terminates, it return control to the mainThread
    505490        // which is currently here
    506         systemProcessor->proc.is_terminated = true;
     491        mainProcessor->do_terminate = true;
    507492        suspend();
    508493
     
    512497        kernel_stop_preemption();
    513498
    514         // Destroy the system processor and its context in reverse order of construction
     499        // Destroy the main processor and its context in reverse order of construction
    515500        // These were manually constructed so we need manually destroy them
    516         ^(systemProcessor->proc.runner){};
    517         ^(systemProcessor){};
     501        ^(mainProcessor->runner){};
     502        ^(mainProcessor){};
    518503
    519504        // Final step, destroy the main thread since it is no longer needed
     
    699684        return top;
    700685}
     686
    701687// Local Variables: //
    702688// mode: c //
  • src/libcfa/concurrency/kernel_private.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Mon Feb 13 12:27:26 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:58:09 2017
     13// Update Count     : 2
    1514//
    1615
    17 #ifndef KERNEL_PRIVATE_H
    18 #define KERNEL_PRIVATE_H
     16#pragma once
    1917
    2018#include "libhdr.h"
     
    3129extern "C" {
    3230        void disable_interrupts();
    33         void enable_interrupts_noRF();
     31        void enable_interrupts_noPoll();
    3432        void enable_interrupts( DEBUG_CTX_PARAM );
    3533}
     
    4543thread_desc * nextThread(cluster * this);
    4644
     45//Block current thread and release/wake-up the following resources
    4746void BlockInternal(void);
    4847void BlockInternal(spinlock * lock);
     
    6564void spin(processor * this, unsigned int * spin_count);
    6665
    67 struct system_proc_t {
    68         processor proc;
    69 
     66struct event_kernel_t {
    7067        alarm_list_t alarms;
    71         spinlock alarm_lock;
    72 
    73         bool pending_alarm;
     68        spinlock lock;
    7469};
    7570
    76 extern cluster * systemCluster;
    77 extern system_proc_t * systemProcessor;
    78 extern volatile thread_local processor * this_processor;
    79 extern volatile thread_local coroutine_desc * this_coroutine;
    80 extern volatile thread_local thread_desc * this_thread;
     71extern event_kernel_t * event_kernel;
     72
     73extern thread_local coroutine_desc * volatile this_coroutine;
     74extern thread_local thread_desc *    volatile this_thread;
     75extern thread_local processor *      volatile this_processor;
     76
    8177extern volatile thread_local bool preemption_in_progress;
    8278extern volatile thread_local unsigned short disable_preempt_count;
     
    9187extern void ThreadCtxSwitch(coroutine_desc * src, coroutine_desc * dst);
    9288
    93 #endif //KERNEL_PRIVATE_H
     89//-----------------------------------------------------------------------------
     90// Utils
     91#define KERNEL_STORAGE(T,X) static char storage_##X[sizeof(T)]
    9492
    9593// Local Variables: //
  • src/libcfa/concurrency/monitor

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Thd Feb 23 12:27:26 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:59:01 2017
     13// Update Count     : 3
    1514//
    1615
    17 #ifndef MONITOR_H
    18 #define MONITOR_H
     16#pragma once
    1917
    2018#include <stddef.h>
    2119
    22 #include "assert"
     20#include <assert.h>
    2321#include "invoke.h"
    2422#include "stdlib"
     
    9997void __accept_internal( unsigned short count, __acceptable_t * acceptables, void (*func)(void) );
    10098
    101 #endif //MONITOR_H
     99// Local Variables: //
     100// mode: c //
     101// tab-width: 4 //
     102// End: //
  • src/libcfa/concurrency/monitor.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Thd Feb 23 12:27:26 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jul 31 14:59:05 2017
     13// Update Count     : 3
    1514//
    1615
     
    485484        if( !this->monitors ) {
    486485                // LIB_DEBUG_PRINT_SAFE("Branding\n");
    487                 assertf( thrd->current_monitors != NULL, "No current monitor to brand condition", thrd->current_monitors );
     486                assertf( thrd->current_monitors != NULL, "No current monitor to brand condition %p", thrd->current_monitors );
    488487                this->monitor_count = thrd->current_monitor_count;
    489488
     
    528527        return head;
    529528}
     529
     530// Local Variables: //
     531// mode: c //
     532// tab-width: 4 //
     533// End: //
  • src/libcfa/concurrency/preemption.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Mon Jun 5 14:20:42 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:36:05 2017
     13// Update Count     : 2
    1514//
    1615
     
    3433#endif
    3534
     35//TODO move to defaults
    3636#define __CFA_DEFAULT_PREEMPTION__ 10000
    3737
     38//TODO move to defaults
    3839__attribute__((weak)) unsigned int default_preemption() {
    3940        return __CFA_DEFAULT_PREEMPTION__;
    4041}
    4142
     43// Short hands for signal context information
    4244#define __CFA_SIGCXT__ ucontext_t *
    4345#define __CFA_SIGPARMS__ __attribute__((unused)) int sig, __attribute__((unused)) siginfo_t *sfp, __attribute__((unused)) __CFA_SIGCXT__ cxt
    4446
     47// FwdDeclarations : timeout handlers
    4548static void preempt( processor   * this );
    4649static void timeout( thread_desc * this );
    4750
     51// FwdDeclarations : Signal handlers
    4852void sigHandler_ctxSwitch( __CFA_SIGPARMS__ );
    49 void sigHandler_alarm    ( __CFA_SIGPARMS__ );
    5053void sigHandler_segv     ( __CFA_SIGPARMS__ );
    5154void sigHandler_abort    ( __CFA_SIGPARMS__ );
    5255
     56// FwdDeclarations : sigaction wrapper
    5357static void __kernel_sigaction( int sig, void (*handler)(__CFA_SIGPARMS__), int flags );
    54 LIB_DEBUG_DO( bool validate( alarm_list_t * this ); )
    55 
     58
     59// FwdDeclarations : alarm thread main
     60void * alarm_loop( __attribute__((unused)) void * args );
     61
     62// Machine specific register name
    5663#ifdef __x86_64__
    5764#define CFA_REG_IP REG_RIP
     
    6067#endif
    6168
     69KERNEL_STORAGE(event_kernel_t, event_kernel);         // private storage for event kernel
     70event_kernel_t * event_kernel;                        // kernel public handle to even kernel
     71static pthread_t alarm_thread;                        // pthread handle to alarm thread
     72
     73void ?{}(event_kernel_t * this) {
     74        (&this->alarms){};
     75        (&this->lock){};
     76}
    6277
    6378//=============================================================================================
     
    6580//=============================================================================================
    6681
     82// Get next expired node
     83static inline alarm_node_t * get_expired( alarm_list_t * alarms, __cfa_time_t currtime ) {
     84        if( !alarms->head ) return NULL;                          // If no alarms return null
     85        if( alarms->head->alarm >= currtime ) return NULL;        // If alarms head not expired return null
     86        return pop(alarms);                                       // Otherwise just pop head
     87}
     88
     89// Tick one frame of the Discrete Event Simulation for alarms
    6790void tick_preemption() {
    68         // LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO, "Ticking preemption\n" );
    69 
    70         alarm_list_t * alarms = &systemProcessor->alarms;
    71         __cfa_time_t currtime = __kernel_get_time();
    72         while( alarms->head && alarms->head->alarm < currtime ) {
    73                 alarm_node_t * node = pop(alarms);
    74                 // LIB_DEBUG_PRINT_BUFFER_LOCAL( STDERR_FILENO, "Ticking %p\n", node );
    75 
     91        alarm_node_t * node = NULL;                     // Used in the while loop but cannot be declared in the while condition
     92        alarm_list_t * alarms = &event_kernel->alarms;  // Local copy for ease of reading
     93        __cfa_time_t currtime = __kernel_get_time();    // Check current time once so we everything "happens at once"
     94
     95        //Loop throught every thing expired
     96        while( node = get_expired( alarms, currtime ) ) {
     97
     98                // Check if this is a kernel
    7699                if( node->kernel_alarm ) {
    77100                        preempt( node->proc );
     
    81104                }
    82105
    83                 verify( validate( alarms ) );
    84 
    85                 if( node->period > 0 ) {
    86                         node->alarm = currtime + node->period;
    87                         insert( alarms, node );
     106                // Check if this is a periodic alarm
     107                __cfa_time_t period = node->period;
     108                if( period > 0 ) {
     109                        node->alarm = currtime + period;    // Alarm is periodic, add currtime to it (used cached current time)
     110                        insert( alarms, node );             // Reinsert the node for the next time it triggers
    88111                }
    89112                else {
    90                         node->set = false;
    91                 }
    92         }
    93 
    94         if( alarms->head ) {
    95                 __kernel_set_timer( alarms->head->alarm - currtime );
    96         }
    97 
    98         verify( validate( alarms ) );
    99         // LIB_DEBUG_PRINT_BUFFER_LOCAL( STDERR_FILENO, "Ticking preemption done\n" );
    100 }
    101 
     113                        node->set = false;                  // Node is one-shot, just mark it as not pending
     114                }
     115        }
     116
     117        // If there are still alarms pending, reset the timer
     118        if( alarms->head ) { __kernel_set_timer( alarms->head->alarm - currtime ); }
     119}
     120
     121// Update the preemption of a processor and notify interested parties
    102122void update_preemption( processor * this, __cfa_time_t duration ) {
    103         LIB_DEBUG_PRINT_BUFFER_DECL( STDERR_FILENO, "Processor : %p updating preemption to %lu\n", this, duration );
    104 
    105123        alarm_node_t * alarm = this->preemption_alarm;
    106         duration *= 1000;
    107124
    108125        // Alarms need to be enabled
     
    134151
    135152extern "C" {
     153        // Disable interrupts by incrementing the counter
    136154        void disable_interrupts() {
    137155                __attribute__((unused)) unsigned short new_val = __atomic_add_fetch_2( &disable_preempt_count, 1, __ATOMIC_SEQ_CST );
    138                 verify( new_val < (unsigned short)65_000 );
    139                 verify( new_val != (unsigned short) 0 );
    140         }
    141 
    142         void enable_interrupts_noRF() {
    143                 __attribute__((unused)) unsigned short prev = __atomic_fetch_add_2( &disable_preempt_count, -1, __ATOMIC_SEQ_CST );
    144                 verify( prev != (unsigned short) 0 );
    145         }
    146 
     156                verify( new_val < 65_000u );              // If this triggers someone is disabling interrupts without enabling them
     157        }
     158
     159        // Enable interrupts by decrementing the counter
     160        // If counter reaches 0, execute any pending CtxSwitch
    147161        void enable_interrupts( DEBUG_CTX_PARAM ) {
    148                 processor * proc   = this_processor;
    149                 thread_desc * thrd = this_thread;
     162                processor * proc   = this_processor;      // Cache the processor now since interrupts can start happening after the atomic add
     163                thread_desc * thrd = this_thread;         // Cache the thread now since interrupts can start happening after the atomic add
     164
    150165                unsigned short prev = __atomic_fetch_add_2( &disable_preempt_count, -1, __ATOMIC_SEQ_CST );
    151                 verify( prev != (unsigned short) 0 );
     166                verify( prev != 0u );                     // If this triggers someone is enabled already enabled interruptsverify( prev != 0u );
     167
     168                // Check if we need to prempt the thread because an interrupt was missed
    152169                if( prev == 1 && proc->pending_preemption ) {
    153170                        proc->pending_preemption = false;
     
    155172                }
    156173
     174                // For debugging purposes : keep track of the last person to enable the interrupts
    157175                LIB_DEBUG_DO( proc->last_enable = caller; )
    158176        }
    159 }
    160 
     177
     178        // Disable interrupts by incrementint the counter
     179        // Don't execute any pending CtxSwitch even if counter reaches 0
     180        void enable_interrupts_noPoll() {
     181                __attribute__((unused)) unsigned short prev = __atomic_fetch_add_2( &disable_preempt_count, -1, __ATOMIC_SEQ_CST );
     182                verify( prev != 0u );                     // If this triggers someone is enabled already enabled interrupts
     183        }
     184}
     185
     186// sigprocmask wrapper : unblock a single signal
    161187static inline void signal_unblock( int sig ) {
    162188        sigset_t mask;
     
    169195}
    170196
     197// sigprocmask wrapper : block a single signal
    171198static inline void signal_block( int sig ) {
    172199        sigset_t mask;
     
    179206}
    180207
    181 static inline bool preemption_ready() {
    182         return disable_preempt_count == 0 && !preemption_in_progress;
    183 }
    184 
    185 static inline void defer_ctxSwitch() {
    186         this_processor->pending_preemption = true;
    187 }
    188 
    189 static inline void defer_alarm() {
    190         systemProcessor->pending_alarm = true;
    191 }
    192 
     208// kill wrapper : signal a processor
    193209static void preempt( processor * this ) {
    194210        pthread_kill( this->kernel_thread, SIGUSR1 );
    195211}
    196212
     213// reserved for future use
    197214static void timeout( thread_desc * this ) {
    198215        //TODO : implement waking threads
    199216}
    200217
     218
     219// Check if a CtxSwitch signal handler shoud defer
     220// If true  : preemption is safe
     221// If false : preemption is unsafe and marked as pending
     222static inline bool preemption_ready() {
     223        bool ready = disable_preempt_count == 0 && !preemption_in_progress; // Check if preemption is safe
     224        this_processor->pending_preemption = !ready;                        // Adjust the pending flag accordingly
     225        return ready;
     226}
     227
    201228//=============================================================================================
    202229// Kernel Signal Startup/Shutdown logic
    203230//=============================================================================================
    204231
    205 static pthread_t alarm_thread;
    206 void * alarm_loop( __attribute__((unused)) void * args );
    207 
     232// Startup routine to activate preemption
     233// Called from kernel_startup
    208234void kernel_start_preemption() {
    209235        LIB_DEBUG_PRINT_SAFE("Kernel : Starting preemption\n");
    210         __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO );
    211         // __kernel_sigaction( SIGSEGV, sigHandler_segv     , SA_SIGINFO );
    212         // __kernel_sigaction( SIGBUS , sigHandler_segv     , SA_SIGINFO );
     236
     237        // Start with preemption disabled until ready
     238        disable_preempt_count = 1;
     239
     240        // Initialize the event kernel
     241        event_kernel = (event_kernel_t *)&storage_event_kernel;
     242        event_kernel{};
     243
     244        // Setup proper signal handlers
     245        __kernel_sigaction( SIGUSR1, sigHandler_ctxSwitch, SA_SIGINFO );         // CtxSwitch handler
     246        // __kernel_sigaction( SIGSEGV, sigHandler_segv     , SA_SIGINFO );      // Failure handler
     247        // __kernel_sigaction( SIGBUS , sigHandler_segv     , SA_SIGINFO );      // Failure handler
    213248
    214249        signal_block( SIGALRM );
     
    217252}
    218253
     254// Shutdown routine to deactivate preemption
     255// Called from kernel_shutdown
    219256void kernel_stop_preemption() {
    220257        LIB_DEBUG_PRINT_SAFE("Kernel : Preemption stopping\n");
    221258
     259        // Block all signals since we are already shutting down
    222260        sigset_t mask;
    223261        sigfillset( &mask );
    224262        sigprocmask( SIG_BLOCK, &mask, NULL );
    225263
     264        // Notify the alarm thread of the shutdown
    226265        sigval val = { 1 };
    227266        pthread_sigqueue( alarm_thread, SIGALRM, val );
     267
     268        // Wait for the preemption thread to finish
    228269        pthread_join( alarm_thread, NULL );
     270
     271        // Preemption is now fully stopped
     272
    229273        LIB_DEBUG_PRINT_SAFE("Kernel : Preemption stopped\n");
    230274}
    231275
     276// Raii ctor/dtor for the preemption_scope
     277// Used by thread to control when they want to receive preemption signals
    232278void ?{}( preemption_scope * this, processor * proc ) {
    233         (&this->alarm){ proc };
     279        (&this->alarm){ proc, zero_time, zero_time };
    234280        this->proc = proc;
    235281        this->proc->preemption_alarm = &this->alarm;
    236         update_preemption( this->proc, this->proc->preemption );
     282
     283        update_preemption( this->proc, from_us(this->proc->cltr->preemption) );
    237284}
    238285
     
    240287        disable_interrupts();
    241288
    242         update_preemption( this->proc, 0 );
     289        update_preemption( this->proc, zero_time );
    243290}
    244291
     
    247294//=============================================================================================
    248295
     296// Context switch signal handler
     297// Receives SIGUSR1 signal and causes the current thread to yield
    249298void sigHandler_ctxSwitch( __CFA_SIGPARMS__ ) {
    250299        LIB_DEBUG_DO( last_interrupt = (void *)(cxt->uc_mcontext.gregs[CFA_REG_IP]); )
    251         if( preemption_ready() ) {
    252                 preemption_in_progress = true;
    253                 signal_unblock( SIGUSR1 );
    254                 this_processor->pending_preemption = false;
    255                 preemption_in_progress = false;
    256                 BlockInternal( (thread_desc*)this_thread );
    257         }
    258         else {
    259                 defer_ctxSwitch();
    260         }
    261 }
    262 
     300
     301        // Check if it is safe to preempt here
     302        if( !preemption_ready() ) { return; }
     303
     304        preemption_in_progress = true;                      // Sync flag : prevent recursive calls to the signal handler
     305        signal_unblock( SIGUSR1 );                          // We are about to CtxSwitch out of the signal handler, let other handlers in
     306        preemption_in_progress = false;                     // Clear the in progress flag
     307
     308        // Preemption can occur here
     309
     310        BlockInternal( (thread_desc*)this_thread );         // Do the actual CtxSwitch
     311}
     312
     313// Main of the alarm thread
     314// Waits on SIGALRM and send SIGUSR1 to whom ever needs it
    263315void * alarm_loop( __attribute__((unused)) void * args ) {
     316        // Block sigalrms to control when they arrive
    264317        sigset_t mask;
    265318        sigemptyset( &mask );
     
    270323        }
    271324
     325        // Main loop
    272326        while( true ) {
     327                // Wait for a sigalrm
    273328                siginfo_t info;
    274329                int sig = sigwaitinfo( &mask, &info );
    275                 if( sig < 0 ) {
    276                         abortf( "internal error, sigwait" );
    277                 }
    278                 else if( sig == SIGALRM )
     330
     331                // If another signal arrived something went wrong
     332                assertf(sig == SIGALRM, "Kernel Internal Error, sigwait: Unexpected signal %d (%d : %d)\n", sig, info.si_code, info.si_value.sival_int);
     333
     334                LIB_DEBUG_PRINT_SAFE("Kernel : Caught alarm from %d with %d\n", info.si_code, info.si_value.sival_int );
     335                // Switch on the code (a.k.a. the sender) to
     336                switch( info.si_code )
    279337                {
    280                         LIB_DEBUG_PRINT_SAFE("Kernel : Caught signal %d (%d)\n", sig, info.si_value.sival_int );
    281                         if( info.si_value.sival_int == 0 )
    282                         {
    283                                 LIB_DEBUG_PRINT_SAFE("Kernel : Preemption thread tick\n");
    284                                 lock( &systemProcessor->alarm_lock DEBUG_CTX2 );
    285                                 tick_preemption();
    286                                 unlock( &systemProcessor->alarm_lock );
    287                         }
    288                         else if( info.si_value.sival_int == 1 )
    289                         {
    290                                 break;
    291                         }
    292                 }
    293                 else
    294                 {
    295                         LIB_DEBUG_PRINT_SAFE("Kernel : Unexpected signal %d (%d)\n", sig, info.si_value.sival_int);
    296                 }
    297         }
    298 
     338                // Timers can apparently be marked as sent for the kernel
     339                // In either case, tick preemption
     340                case SI_TIMER:
     341                case SI_KERNEL:
     342                        LIB_DEBUG_PRINT_SAFE("Kernel : Preemption thread tick\n");
     343                        lock( &event_kernel->lock DEBUG_CTX2 );
     344                        tick_preemption();
     345                        unlock( &event_kernel->lock );
     346                        break;
     347                // Signal was not sent by the kernel but by an other thread
     348                case SI_QUEUE:
     349                        // For now, other thread only signal the alarm thread to shut it down
     350                        // If this needs to change use info.si_value and handle the case here
     351                        goto EXIT;
     352                }
     353        }
     354
     355EXIT:
    299356        LIB_DEBUG_PRINT_SAFE("Kernel : Preemption thread stopping\n");
    300357        return NULL;
    301358}
    302359
     360// Sigaction wrapper : register an signal handler
    303361static void __kernel_sigaction( int sig, void (*handler)(__CFA_SIGPARMS__), int flags ) {
    304362        struct sigaction act;
     
    316374}
    317375
    318 typedef void (*sa_handler_t)(int);
    319 
     376// Sigaction wrapper : restore default handler
    320377static void __kernel_sigdefault( int sig ) {
    321378        struct sigaction act;
    322379
    323         // act.sa_handler = SIG_DFL;
     380        act.sa_handler = SIG_DFL;
    324381        act.sa_flags = 0;
    325382        sigemptyset( &act.sa_mask );
     
    429486//      raise( SIGABRT );
    430487// }
     488
     489// Local Variables: //
     490// mode: c //
     491// tab-width: 4 //
     492// End: //
  • src/libcfa/concurrency/preemption.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Mon Jun 5 14:20:42 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:34:25 2017
     13// Update Count     : 1
    1514//
    1615
    17 #ifndef PREEMPTION_H
    18 #define PREEMPTION_H
     16#pragma once
    1917
    2018#include "alarm.h"
     
    3533void ^?{}( preemption_scope * this );
    3634
    37 #endif //PREEMPTION_H
     35// Local Variables: //
     36// mode: c //
     37// tab-width: 4 //
     38// End: //
  • src/libcfa/concurrency/thread

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Tue Jan 17 12:27:26 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:59:40 2017
     13// Update Count     : 3
    1514//
    1615
    17 #ifndef THREADS_H
    18 #define THREADS_H
     16#pragma once
    1917
    20 #include "assert"
     18#include <assert.h>
    2119#include "invoke.h"
    2220
     
    5452}
    5553
    56 extern volatile thread_local thread_desc * this_thread;
     54extern thread_local thread_desc * volatile this_thread;
    5755
    5856forall( dtype T | is_thread(T) )
     
    8482void yield( unsigned times );
    8583
    86 #endif //THREADS_H
    87 
    8884// Local Variables: //
    8985// mode: c //
  • src/libcfa/concurrency/thread.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Tue Jan 17 12:27:26 2017
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : --
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:34:46 2017
     13// Update Count     : 1
    1514//
    1615
     
    8786
    8887void yield( void ) {
    89         BlockInternal( (thread_desc *)this_thread );
     88        BlockInternal( this_thread );
    9089}
    9190
  • src/libcfa/containers/maybe

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Wed May 24 14:43:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jun 16 15:42:00 2017
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:00:52 2017
     13// Update Count     : 4
    1414//
    1515
    16 
    17 #ifndef MAYBE_H
    18 #define MAYBE_H
     16#pragma once
    1917
    2018#include <stdbool.h>
     
    6664void set_none(maybe(T) * this);
    6765
    68 #endif // MAYBE_H
     66// Local Variables: //
     67// mode: c //
     68// tab-width: 4 //
     69// End: //
  • src/libcfa/containers/maybe.c

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Wed May 24 15:40:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr May 25 15:24:00 2017
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 15:23:50 2017
     13// Update Count     : 2
    1414//
    1515
    1616#include <containers/maybe>
    17 #include <assert>
     17#include <assert.h>
    1818
    1919
  • src/libcfa/containers/pair

    r3d4b23fa r0720e049  
    99// Author           : Aaron Moss
    1010// Created On       : Wed Apr 12 15:32:00 2017
    11 // Last Modified By : Aaron Moss
    12 // Last Modified On : Wed Apr 12 15:32:00 2017
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:59:53 2017
     13// Update Count     : 2
    1414//
    1515
    16 #ifndef PAIR_H
    17 #define PAIR_H
     16#pragma once
    1817
    1918forall(otype R, otype S) struct pair {
     
    4443int ?>=?(pair(R, S) p, pair(R, S) q);
    4544
    46 #endif // PAIR_H
    47 
    4845// Local Variables: //
    4946// mode: c //
  • src/libcfa/containers/result

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Wed May 24 14:45:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jun 16 15:41:00 2017
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:00:44 2017
     13// Update Count     : 3
    1414//
    1515
    16 
    17 #ifndef RESULT_H
    18 #define RESULT_H
     16#pragma once
    1917
    2018#include <stdbool.h>
     
    7876void set_error(result(T, E) * this, E error);
    7977
    80 #endif // RESULT_H
     78// Local Variables: //
     79// mode: c //
     80// tab-width: 4 //
     81// End: //
  • src/libcfa/containers/result.c

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Wed May 24 15:40:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr May 25 15:27:00 2017
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 15:23:58 2017
     13// Update Count     : 2
    1414//
    1515
    1616#include <containers/result>
    17 #include <assert>
     17#include <assert.h>
    1818
    1919
  • src/libcfa/containers/vector

    r3d4b23fa r0720e049  
    1010// Created On       : Tue Jul  5 18:00:07 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul  5 18:01:35 2016
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 10:01:18 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef VECTOR_H
    17 #define VECTOR_H
     16#pragma once
    1817
    1918extern "C" {
     
    166165// }
    167166
    168 #endif // VECTOR_H
    169 
    170167// Local Variables: //
    171168// mode: c //
  • src/libcfa/exception.c

    r3d4b23fa r0720e049  
    1010// Created On       : Mon Jun 26 15:13:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tus Jul 11 16:36:00 2017
    13 // Update Count     : 1
     12// Last Modified On : Fri Aug  4 15:20:00 2017
     13// Update Count     : 6
    1414//
     15
     16#include <stddef.h> // for size_t
    1517
    1618#include "exception.h"
     
    2224#include <unwind.h>
    2325
     26// FIX ME: temporary hack to keep ARM build working
     27#ifndef _URC_FATAL_PHASE1_ERROR
     28#define _URC_FATAL_PHASE1_ERROR 2
     29#endif // ! _URC_FATAL_PHASE1_ERROR
     30#ifndef _URC_FATAL_PHASE2_ERROR
     31#define _URC_FATAL_PHASE2_ERROR 2
     32#endif // ! _URC_FATAL_PHASE2_ERROR
     33
    2434#include "lsda.h"
    2535
     36
     37// Base exception vtable is abstract, you should not have base exceptions.
     38struct __cfaehm__base_exception_t_vtable
     39                ___cfaehm__base_exception_t_vtable_instance = {
     40        .parent = NULL,
     41        .size = 0,
     42        .copy = NULL,
     43        .free = NULL,
     44        .msg = NULL
     45};
     46
     47
    2648// Temperary global exception context. Does not work with concurency.
    27 struct shared_stack_t {
     49struct exception_context_t {
    2850    struct __cfaehm__try_resume_node * top_resume;
    2951    struct __cfaehm__try_resume_node * current_resume;
    3052
    31     exception current_exception;
     53    exception * current_exception;
    3254    int current_handler_index;
    3355} shared_stack = {NULL, NULL, 0, 0};
    3456
    35 
    36 
    37 // This macro should be the only thing that needs to change across machines.
    38 // Used in the personality function, way down in termination.
     57// Get the current exception context.
     58// There can be a single global until multithreading occurs, then each stack
     59// needs its own. It will have to be updated to handle that.
     60struct exception_context_t * this_exception_context() {
     61        return &shared_stack;
     62}
     63//#define SAVE_EXCEPTION_CONTEXT(to_name)
     64//struct exception_context_t * to_name = this_exception_context();
     65//exception * this_exception() {
     66//    return this_exception_context()->current_exception;
     67//}
     68
     69
     70// This macro should be the only thing that needs to change across machines.  Used in the personality function, way down
     71// in termination.
    3972// struct _Unwind_Context * -> _Unwind_Reason_Code(*)(exception *)
    4073#define MATCHER_FROM_CONTEXT(ptr_to_context) \
     
    4780
    4881        // DEBUG
    49         printf("Throwing resumption exception %d\n", *except);
     82        printf("Throwing resumption exception\n");
    5083
    5184        struct __cfaehm__try_resume_node * original_head = shared_stack.current_resume;
     
    6194        }
    6295
    63         printf("Unhandled exception %d\n", *except);
     96        printf("Unhandled exception\n");
    6497        shared_stack.current_resume = original_head;
    6598
     
    69102}
    70103
    71 /* Do we control where exceptions get thrown even with concurency?
    72  * If not these are not quite thread safe, the cleanup hook has to be added
    73  * after the node is built but before it is made the top node.
    74  */
     104// Do we control where exceptions get thrown even with concurency?  If not these are not quite thread safe, the cleanup
     105// hook has to be added after the node is built but before it is made the top node.
     106
    75107void __cfaehm__try_resume_setup(struct __cfaehm__try_resume_node * node,
    76108                        int (*handler)(exception * except)) {
     
    87119// TERMINATION ===============================================================
    88120
    89 // Requires -fexceptions to work.
    90 
    91 // Global which defines the current exception
    92 // Currently an int just to make matching easier
    93 //int this_exception; (became shared_stack.current_exception)
     121// MEMORY MANAGEMENT (still for integers)
     122// May have to move to cfa for constructors and destructors (references).
     123
     124struct __cfaehm__node {
     125        struct __cfaehm__node * next;
     126};
     127
     128#define NODE_TO_EXCEPT(node) ((exception *)(1 + (node)))
     129#define EXCEPT_TO_NODE(except) ((struct __cfaehm__node *)(except) - 1)
     130
     131// Creates a copy of the indicated exception and sets current_exception to it.
     132static void __cfaehm__allocate_exception( exception * except ) {
     133        struct exception_context_t * context = this_exception_context();
     134
     135        // Allocate memory for the exception.
     136        struct __cfaehm__node * store = malloc(
     137                sizeof( struct __cfaehm__node ) + except->virtual_table->size );
     138
     139        if ( ! store ) {
     140                // Failure: cannot allocate exception. Terminate thread.
     141                abort(); // <- Although I think it might be the process.
     142        }
     143
     144        // Add the node to the list:
     145        store->next = EXCEPT_TO_NODE(context->current_exception);
     146        context->current_exception = NODE_TO_EXCEPT(store);
     147
     148        // Copy the exception to storage.
     149        except->virtual_table->copy( context->current_exception, except );
     150}
     151
     152// Delete the provided exception, unsetting current_exception if relivant.
     153static void __cfaehm__delete_exception( exception * except ) {
     154        struct exception_context_t * context = this_exception_context();
     155
     156        // DEBUG
     157        printf( "Deleting Exception\n");
     158
     159        // Remove the exception from the list.
     160        struct __cfaehm__node * to_free = EXCEPT_TO_NODE(except);
     161        struct __cfaehm__node * node;
     162
     163        if ( context->current_exception == except ) {
     164                node = to_free->next;
     165                context->current_exception = (node) ? NODE_TO_EXCEPT(node) : 0;
     166        } else {
     167                node = EXCEPT_TO_NODE(context->current_exception);
     168                // It may always be in the first or second position.
     169                while( to_free != node->next ) {
     170                        node = node->next;
     171                }
     172                node->next = to_free->next;
     173        }
     174
     175        // Free the old exception node.
     176        except->virtual_table->free( except );
     177        free( to_free );
     178}
     179
     180// If this isn't a rethrow (*except==0), delete the provided exception.
     181void __cfaehm__cleanup_terminate( void * except ) {
     182        if ( *(void**)except ) __cfaehm__delete_exception( *(exception**)except );
     183}
     184
    94185
    95186// We need a piece of storage to raise the exception
     
    111202}
    112203
    113 void __cfaehm__throw_terminate( exception * val ) {
    114         // Store the current exception
    115         shared_stack.current_exception = *val;
    116 
    117         // DEBUG
    118         printf("Throwing termination exception %d\n", *val);
     204// The exception that is being thrown must already be stored.
     205__attribute__((noreturn)) void __cfaehm__begin_unwind(void) {
     206        if ( ! this_exception_context()->current_exception ) {
     207                printf("UNWIND ERROR missing exception in begin unwind\n");
     208                abort();
     209        }
     210
    119211
    120212        // Call stdlibc to raise the exception
    121213        _Unwind_Reason_Code ret = _Unwind_RaiseException( &this_exception_storage );
    122214
    123         // If we reach here it means something happened
    124         // For resumption to work we need to find a way to return back to here
    125         // Most of them will probably boil down to setting a global flag and making the phase 1 either stop or fail.
    126         // Causing an error on purpose may help avoiding unnecessary work but it might have some weird side effects.
    127         // If we just pretend no handler was found that would work but may be expensive for no reason since we will always
    128         // search the whole stack
     215        // If we reach here it means something happened.  For resumption to work we need to find a way to return back to
     216        // here.  Most of them will probably boil down to setting a global flag and making the phase 1 either stop or
     217        // fail.  Causing an error on purpose may help avoiding unnecessary work but it might have some weird side
     218        // effects.  If we just pretend no handler was found that would work but may be expensive for no reason since we
     219        // will always search the whole stack.
    129220
    130221        if( ret == _URC_END_OF_STACK ) {
    131                 // No proper handler was found
    132                 // This can be handled in several way
    133                 // C++ calls std::terminate
    134                 // Here we force unwind the stack, basically raising a cancellation
     222                // No proper handler was found.  This can be handled in several way.  C++ calls std::terminate Here we
     223                // force unwind the stack, basically raising a cancellation.
    135224                printf("Uncaught exception %p\n", &this_exception_storage);
    136225
     
    140229        }
    141230
    142         // We did not simply reach the end of the stack without finding a handler,
    143         // Something wen't wrong
     231        // We did not simply reach the end of the stack without finding a handler.  Something wen't wrong
    144232        printf("UNWIND ERROR %d after raise exception\n", ret);
    145233        abort();
    146234}
    147235
    148 // Nesting this the other way would probably be faster.
     236void __cfaehm__throw_terminate( exception * val ) {
     237        // DEBUG
     238        printf("Throwing termination exception\n");
     239
     240        __cfaehm__allocate_exception( val );
     241        __cfaehm__begin_unwind();
     242}
     243
    149244void __cfaehm__rethrow_terminate(void) {
    150245        // DEBUG
    151246        printf("Rethrowing termination exception\n");
    152247
    153         __cfaehm__throw_terminate(&shared_stack.current_exception);
    154 }
    155 
    156 // This is our personality routine
    157 // For every stack frame anotated with ".cfi_personality 0x3,__gcfa_personality_v0"
    158 // This function will be called twice when unwinding
    159 // Once in the search phased and once in the cleanup phase
     248        __cfaehm__begin_unwind();
     249}
     250
     251// This is our personality routine.  For every stack frame anotated with ".cfi_personality 0x3,__gcfa_personality_v0".
     252// This function will be called twice when unwinding.  Once in the search phased and once in the cleanup phase.
    160253_Unwind_Reason_Code __gcfa_personality_v0 (
    161254                int version, _Unwind_Action actions, unsigned long long exceptionClass,
     
    263356                                        _Unwind_Reason_Code (*matcher)(exception *) =
    264357                                                MATCHER_FROM_CONTEXT(context);
    265                                         int index = matcher(&shared_stack.current_exception);
     358                                        int index = matcher(shared_stack.current_exception);
    266359                                        _Unwind_Reason_Code ret = (0 == index)
    267360                                                ? _URC_CONTINUE_UNWIND : _URC_HANDLER_FOUND;
     
    293386                                // I assume this sets the instruction pointer to the adress of the landing pad
    294387                                // It doesn't actually set it, it only state the value that needs to be set once we return _URC_INSTALL_CONTEXT
    295                                 _Unwind_SetIP( context, lsd_info.LPStart + callsite_landing_pad );
     388                                _Unwind_SetIP( context, ((lsd_info.LPStart) + (callsite_landing_pad)) );
    296389
    297390                                // DEBUG
     
    317410}
    318411
    319 // Try statements are hoisted out see comments for details
    320 // With this could probably be unique and simply linked from
    321 // libcfa but there is one problem left, see the exception table
    322 // for details
     412// Try statements are hoisted out see comments for details.  With this could probably be unique and simply linked from
     413// libcfa but there is one problem left, see the exception table for details
    323414__attribute__((noinline))
    324415void __cfaehm__try_terminate(void (*try_block)(),
     
    328419        //! printf("%p %p %p %p\n", &try_block, &catch_block, &match_block, &xy);
    329420
    330         // Setup statments
    331         // These 2 statments won't actually result in any code,
    332         // they only setup global tables.
    333         // However, they clobber gcc cancellation support from gcc.
    334         // We can replace the personality routine but replacing the exception
    335         // table gcc generates is not really doable, it generates labels based
    336         // on how the assembly works.
     421        // Setup statments: These 2 statments won't actually result in any code, they only setup global tables.
     422        // However, they clobber gcc cancellation support from gcc.  We can replace the personality routine but
     423        // replacing the exception table gcc generates is not really doable, it generates labels based on how the
     424        // assembly works.
     425
    337426        // Setup the personality routine
    338427        asm volatile (".cfi_personality 0x3,__gcfa_personality_v0");
     
    340429        asm volatile (".cfi_lsda 0x3, .LLSDACFA2");
    341430
    342         // Label which defines the start of the area for which the handler is setup
     431        // Label which defines the start of the area for which the handler is setup.
    343432        asm volatile (".TRYSTART:");
    344433
     
    354443        // Exceptionnal path
    355444        CATCH : __attribute__(( unused ));
    356         // Label which defines the end of the area for which the handler is setup
     445        // Label which defines the end of the area for which the handler is setup.
    357446        asm volatile (".TRYEND:");
    358         // Label which defines the start of the exception landing pad
    359         // basically what will be called when the exception is caught
    360         // Note, if multiple handlers are given, the multiplexing should be done
    361         // by the generated code, not the exception runtime
     447        // Label which defines the start of the exception landing pad.  Basically what is called when the exception is
     448        // caught.  Note, if multiple handlers are given, the multiplexing should be done by the generated code, not the
     449        // exception runtime.
    362450        asm volatile (".CATCH:");
    363451
    364452        // Exception handler
    365         catch_block(shared_stack.current_handler_index,
    366                     &shared_stack.current_exception);
    367 }
    368 
    369 // Exception table data we need to generate
    370 // While this is almost generic, the custom data refers to
    371 // foo_try_match try match, which is no way generic
    372 // Some more works need to be done if we want to have a single
    373 // call to the try routine
     453        catch_block( shared_stack.current_handler_index,
     454                     shared_stack.current_exception );
     455}
     456
     457// Exception table data we need to generate.  While this is almost generic, the custom data refers to foo_try_match try
     458// match, which is no way generic.  Some more works need to be done if we want to have a single call to the try routine.
     459
     460#if defined( __x86_64__ ) || defined( __i386__ )
    374461asm (
    375462        //HEADER
     
    394481//      "       .section        .note.GNU-stack,\"x\",@progbits\n"
    395482);
     483#endif // __x86_64__ || __i386__
  • src/libcfa/exception.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon Jun 26 15:11:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tus Jul 11 16:31:00 2017
    13 // Update Count     : 2
     12// Last Modified On : Fri Aug  4 15:20:00 2017
     13// Update Count     : 5
    1414//
    1515
    16 #ifndef EXCEPTION_H
    17 #define EXCEPTION_H
     16#pragma once
    1817
    19 
    20 // Later to be a special structure type.
    21 typedef int exception;
    2218
    2319#ifdef __CFORALL__
    2420extern "C" {
    2521#endif
     22
     23struct __cfaehm__base_exception_t;
     24typedef struct __cfaehm__base_exception_t exception;
     25struct __cfaehm__base_exception_t_vtable {
     26        const struct __cfaehm__base_exception_t_vtable * parent;
     27        size_t size;
     28        void (*copy)(struct __cfaehm__base_exception_t *this,
     29                     struct __cfaehm__base_exception_t * other);
     30        void (*free)(struct __cfaehm__base_exception_t *this);
     31        const char (*msg)(struct __cfaehm__base_exception_t *this);
     32};
     33struct __cfaehm__base_exception_t {
     34        struct __cfaehm__base_exception_t_vtable const * virtual_table;
     35};
     36extern struct __cfaehm__base_exception_t_vtable
     37        ___cfaehm__base_exception_t_vtable_instance;
     38
    2639
    2740// Used in throw statement translation.
     
    3649    int (*match_block)(exception * except));
    3750
     51// Clean-up the exception in catch blocks.
     52void __cfaehm__cleanup_terminate(void * except);
     53
    3854// Data structure creates a list of resume handlers.
    3955struct __cfaehm__try_resume_node {
     
    4258};
    4359
     60// These act as constructor and destructor for the resume node.
    4461void __cfaehm__try_resume_setup(
    4562    struct __cfaehm__try_resume_node * node,
     
    4966
    5067// Check for a standard way to call fake deconstructors.
    51 struct __cfaehm__cleanup_hook {
    52 };
     68struct __cfaehm__cleanup_hook {};
    5369
    5470#ifdef __CFORALL__
    5571}
    5672#endif
    57 
    58 #endif //EXCEPTION_H
  • src/libcfa/fstream.c

    r3d4b23fa r0720e049  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul  6 18:38:25 2017
    13 // Update Count     : 251
     12// Last Modified On : Thu Jul 20 15:20:49 2017
     13// Update Count     : 252
    1414//
    1515
    1616#include "fstream"
    1717
    18 extern "C" {
    1918#include <stdio.h>                                                                              // vfprintf, vfscanf
    2019#include <stdlib.h>                                                                             // exit
     
    2423#include <float.h>                                                                              // DBL_DIG, LDBL_DIG
    2524#include <complex.h>                                                                    // creal, cimag
    26 }
    27 #include "assert"
     25#include <assert.h>
    2826
    2927#define IO_MSG "I/O error: "
  • src/libcfa/interpose.c

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Wed Mar 29 16:10:31 2017
    12 // Last Modified By :
    13 // Last Modified On :
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:27:33 2017
     13// Update Count     : 1
    1514//
    1615
     
    141140        }
    142141}
     142
     143// Local Variables: //
     144// mode: c //
     145// tab-width: 4 //
     146// End: //
  • src/libcfa/interpose.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Wed Mar 29 15:56:41 2017
    12 // Last Modified By :
    13 // Last Modified On :
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 22:33:02 2017
     13// Update Count     : 2
    1514//
    1615
    17 #ifndef INTERPOSE_H
    18 #define INTERPOSE_H
     16#pragma once
    1917
    2018void * interpose_symbol( const char* symbol, , const char *version );
     
    2321extern __typeof__( exit ) libc_abort __attribute__(( noreturn ));
    2422
    25 #endif //INTERPOSE_H
     23// Local Variables: //
     24// mode: c //
     25// tab-width: 4 //
     26// End: //
  • src/libcfa/iostream

    r3d4b23fa r0720e049  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul  7 08:35:59 2017
    13 // Update Count     : 118
     12// Last Modified On : Wed Aug  9 16:42:47 2017
     13// Update Count     : 131
    1414//
    1515
     
    4646}; // ostream
    4747
    48 trait writeable( otype T ) {
    49         forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
     48// trait writeable( otype T ) {
     49//      forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
     50// }; // writeable
     51
     52trait writeable( otype T, dtype ostype | ostream( ostype ) ) {
     53        ostype * ?|?( ostype *, T );
    5054}; // writeable
    5155
     
    7781
    7882// tuples
    79 forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } ) ostype * ?|?( ostype * os, T arg, Params rest );
     83forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype * ?|?( ostype *, Params ); } )
     84ostype * ?|?( ostype * os, T arg, Params rest );
    8085
    8186// manipulators
     
    9095
    9196// writes the range [begin, end) to the given stream
    92 forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
    93 void write( iterator_type begin, iterator_type end, os_type *os );
     97forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
     98void write( iterator_type begin, iterator_type end, ostype * os );
    9499
    95 forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
    96 void write_reverse( iterator_type begin, iterator_type end, os_type *os );
     100forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
     101void write_reverse( iterator_type begin, iterator_type end, ostype * os );
    97102
    98103//---------------------------------------
  • src/libcfa/iostream.c

    r3d4b23fa r0720e049  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul  6 18:14:17 2017
    13 // Update Count     : 396
     12// Last Modified On : Wed Aug  9 16:46:51 2017
     13// Update Count     : 401
    1414//
    1515
     
    125125forall( dtype ostype | ostream( ostype ) )
    126126ostype * ?|?( ostype * os, float _Complex fc ) {
    127         os | crealf( fc );
    128         _Bool temp = sepDisable( os );                                          // disable separators within complex value
    129         if ( cimagf( fc ) >= 0 ) os | '+';                                      // negative value prints '-'
    130         os | cimagf( fc ) | 'i';
    131         sepReset( os, temp );                                                           // reset separator
     127        if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
     128        fmt( os, "%g%+gi", crealf( fc ), cimagf( fc ) );
    132129        return os;
    133130} // ?|?
     
    135132forall( dtype ostype | ostream( ostype ) )
    136133ostype * ?|?( ostype * os, double _Complex dc ) {
    137         os | creal( dc );
    138         _Bool temp = sepDisable( os );                                          // disable separators within complex value
    139         if ( cimag( dc ) >= 0 ) os | '+';                                       // negative value prints '-'
    140         os | cimag( dc ) | 'i';
    141         sepReset( os, temp );                                                           // reset separator
     134        if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
     135        fmt( os, "%.*lg%+.*lgi", DBL_DIG, creal( dc ), DBL_DIG, cimag( dc ) );
    142136        return os;
    143137} // ?|?
     
    145139forall( dtype ostype | ostream( ostype ) )
    146140ostype * ?|?( ostype * os, long double _Complex ldc ) {
    147         os | creall( ldc );
    148         _Bool temp = sepDisable( os );                                          // disable separators within complex value
    149         if ( cimagl( ldc ) >= 0 ) os | '+';                                     // negative value prints '-'
    150         os | cimagl( ldc ) | 'i';
    151         sepReset( os, temp );                                                           // reset separator
     141        if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
     142        fmt( os, "%.*Lg%+.*Lgi", LDBL_DIG, creall( ldc ), LDBL_DIG, cimagl( ldc ) );
    152143        return os;
    153144} // ?|?
     
    202193
    203194// tuples
    204 forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } )
     195forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype * ?|?( ostype *, Params ); } )
    205196ostype * ?|?( ostype * os, T arg, Params rest ) {
    206197        os | arg;                                                                                       // print first argument
     
    265256//---------------------------------------
    266257
    267 forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
    268 void write( iteratortype begin, iteratortype end, ostype * os ) {
    269         void print( elttype i ) { os | i; }
     258forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
     259void write( iterator_type begin, iterator_type end, ostype * os ) {
     260        void print( elt_type i ) { os | i; }
    270261        for_each( begin, end, print );
    271262} // ?|?
    272263
    273 forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
    274 void write_reverse( iteratortype begin, iteratortype end, ostype * os ) {
    275         void print( elttype i ) { os | i; }
     264forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
     265void write_reverse( iterator_type begin, iterator_type end, ostype * os ) {
     266        void print( elt_type i ) { os | i; }
    276267        for_each_reverse( begin, end, print );
    277268} // ?|?
  • src/libcfa/libhdr.h

    r3d4b23fa r0720e049  
    99// Author           : Thierry Delisle
    1010// Created On       : Mon Nov 28 12:27:26 2016
    11 // Last Modified By : Thierry Delisle
    12 // Last Modified On : Mon Nov 28 12:27:26 2016
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:56:32 2017
     13// Update Count     : 1
    1414//
    1515
    16 #ifndef __LIB_HDR_H__
    17 #define __LIB_HDR_H__
     16#pragma once
    1817
    1918#include "libalign.h"
     
    2120#include "libtools.h"
    2221
    23 #endif //__LIB_HDR_H__
    24 
    2522// Local Variables: //
    2623// mode: c //
  • src/libcfa/libhdr/libalign.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: C++ -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Mon Nov 28 12:27:26 2016
    12 // Last Modified By : Thierry Delisle
    13 // Last Modified On : Mon Nov 28 12:27:26 2016
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jul 21 23:05:35 2017
     13// Update Count     : 2
    1514//
    1615// This  library is free  software; you  can redistribute  it and/or  modify it
     
    2827//
    2928
     29#pragma once
    3030
    31 #ifndef __LIB_ALIGN_H__
    32 #define __LIB_ALIGN_H__
    33 
    34 #include "assert"
     31#include <assert.h>
    3532#include <stdbool.h>
    3633
     
    6158} // uCeiling
    6259
    63 
    64 #endif // __LIB_ALIGN_H__
    65 
    66 
    6760// Local Variables: //
    6861// compile-command: "make install" //
  • src/libcfa/libhdr/libdebug.h

    r3d4b23fa r0720e049  
    99// Author           : Thierry Delisle
    1010// Created On       : Mon Nov 28 12:27:26 2016
    11 // Last Modified By : Thierry Delisle
    12 // Last Modified On : Mon Nov 28 12:27:26 2016
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:02:24 2017
     13// Update Count     : 1
    1414//
    1515
    16 #ifndef __LIB_DEBUG_H__
    17 #define __LIB_DEBUG_H__
     16#pragma once
    1817
    1918#ifdef __CFA_DEBUG__
     
    7877#endif
    7978
    80 #endif //__LIB_DEBUG_H__
    81 
    8279// Local Variables: //
    8380// mode: c //
  • src/libcfa/libhdr/libtools.h

    r3d4b23fa r0720e049  
    99// Author           : Thierry Delisle
    1010// Created On       : Mon Nov 28 12:27:26 2016
    11 // Last Modified By : Thierry Delisle
    12 // Last Modified On : Mon Nov 28 12:27:26 2016
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:02:10 2017
     13// Update Count     : 1
    1414//
    1515
    16 #ifndef __LIB_TOOLS_H__
    17 #define __LIB_TOOLS_H__
     16#pragma once
    1817
    1918// void abortf( const char *fmt, ... ) {
     
    3029#endif
    3130
    32 #endif //__LIB_TOOLS_H__
    33 
    3431// Local Variables: //
    3532// mode: c //
  • src/libcfa/math

    r3d4b23fa r0720e049  
    1010// Created On       : Mon Apr 18 23:37:04 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul  7 09:34:15 2017
    13 // Update Count     : 61
     12// Last Modified On : Mon Aug  7 07:51:15 2017
     13// Update Count     : 108
    1414//
    1515
    1616#pragma once
    1717
    18 extern "C" {
    19 #include <math.h>                                                                               // fpclassify, isfinite, isnormal, isnan, isinf
    20 } // extern "C"
    21 
    22 float ?%?( float, float );
    23 float fmod( float, float );
    24 double ?%?( double, double );
     18#include <math.h>
     19#include <complex.h>
     20
     21//---------------------- General ----------------------
     22
     23static inline float ?%?( float x, float y ) { return fmodf( x, y ); }
     24static inline float fmod( float x, float y ) { return fmodf( x, y ); }
     25static inline double ?%?( double x, double y ) { return fmod( x, y ); }
    2526// extern "C" { double fmod( double, double ); }
    26 long double ?%?( long double, long double );
    27 long double fmod( long double, long double );
    28 
    29 float remainder( float, float );
     27static inline long double ?%?( long double x, long double y ) { return fmodl( x, y ); }
     28static inline long double fmod( long double x, long double y ) { return fmodl( x, y ); }
     29
     30static inline float remainder( float x, float y ) { return remainderf( x, y ); }
    3031// extern "C" { double remainder( double, double ); }
    31 long double remainder( long double, long double );
    32 
    33 [ int, float ] remquo( float, float );
    34 float remquo( float, float, int * );
    35 [ int, double ] remquo( double, double );
    36 // extern "C" { double remquo( double, double, int * ); }
    37 [ int, long double ] remquo( long double, long double );
    38 long double remquo( long double, long double, int * );
    39 
    40 [ int, float ] div( float, float );                                             // alternative name for remquo
    41 float div( float, float, int * );
    42 [ int, double ] div( double, double );
    43 // extern "C" { double div( double, double, int * ); }
    44 [ int, long double ] div( long double, long double );
    45 long double div( long double, long double, int * );
    46 
    47 float fma( float, float, float );
     32static inline long double remainder( long double x, long double y ) { return remainderl( x, y ); }
     33
     34static inline float remquo( float x, float y, int * quo ) { return remquof( x, y, quo ); }
     35// extern "C" { double remquo( double x, double y, int * quo ); }
     36static inline long double remquo( long double x, long double y, int * quo ) { return remquol( x, y, quo ); }
     37static inline [ int, float ] remquo( float x, float y ) { int quo; x = remquof( x, y, &quo ); return [ quo, x ]; }
     38static inline [ int, double ] remquo( double x, double y ) { int quo; x = remquo( x, y, &quo ); return [ quo, x ]; }
     39static inline [ int, long double ] remquo( long double x, long double y ) { int quo; x = remquol( x, y, &quo ); return [ quo, x ]; }
     40
     41static inline [ float, float ] div( float x, float y ) { y = modff( x / y, &x ); return [ x, y ]; }
     42static inline [ double, double ] div( double x, double y ) { y = modf( x / y, &x ); return [ x, y ]; }
     43static inline [ long double, long double ] div( long double x, long double y ) { y = modfl( x / y, &x ); return [ x, y ]; }
     44
     45static inline float fma( float x, float y, float z ) { return fmaf( x, y, z ); }
    4846// extern "C" { double fma( double, double, double ); }
    49 long double fma( long double, long double, long double );
    50 
    51 float fdim( float, float );
     47static inline long double fma( long double x, long double y, long double z ) { return fmal( x, y, z ); }
     48
     49static inline float fdim( float x, float y ) { return fdimf( x, y ); }
    5250// extern "C" { double fdim( double, double ); }
    53 long double fdim( long double, long double );
    54 
    55 float nan( const char * );
     51static inline long double fdim( long double x, long double y ) { return fdiml( x, y ); }
     52
     53static inline float nan( const char * tag ) { return nanf( tag ); }
    5654// extern "C" { double nan( const char * ); }
    57 long double nan( const char * );
     55static inline long double nan( const char * tag ) { return nanl( tag ); }
    5856
    5957//---------------------- Exponential ----------------------
    6058
    61 float exp( float );
     59static inline float exp( float x ) { return expf( x ); }
    6260// extern "C" { double exp( double ); }
    63 long double exp( long double );
    64 float _Complex exp( float _Complex );
    65 double _Complex exp( double _Complex );
    66 long double _Complex exp( long double _Complex );
    67 
    68 float exp2( float );
     61static inline long double exp( long double x ) { return expl( x ); }
     62static inline float _Complex exp( float _Complex x ) { return cexpf( x ); }
     63static inline double _Complex exp( double _Complex x ) { return cexp( x ); }
     64static inline long double _Complex exp( long double _Complex x ) { return cexpl( x ); }
     65
     66static inline float exp2( float x ) { return exp2f( x ); }
    6967// extern "C" { double exp2( double ); }
    70 long double exp2( long double );
    71 // float _Complex exp2( float _Complex );
    72 // double _Complex exp2( double _Complex );
    73 // long double _Complex exp2( long double _Complex );
    74 
    75 float expm1( float );
     68static inline long double exp2( long double x ) { return exp2l( x ); }
     69//static inline float _Complex exp2( float _Complex x ) { return cexp2f( x ); }
     70//static inline double _Complex exp2( double _Complex x ) { return cexp2( x ); }
     71//static inline long double _Complex exp2( long double _Complex x ) { return cexp2l( x ); }
     72
     73static inline float expm1( float x ) { return expm1f( x ); }
    7674// extern "C" { double expm1( double ); }
    77 long double expm1( long double );
    78 
    79 float log( float );
     75static inline long double expm1( long double x ) { return expm1l( x ); }
     76
     77static inline float pow( float x, float y ) { return powf( x, y ); }
     78// extern "C" { double pow( double, double ); }
     79static inline long double pow( long double x, long double y ) { return powl( x, y ); }
     80static inline float _Complex pow( float _Complex x, float _Complex y ) { return cpowf( x, y ); }
     81static inline double _Complex pow( double _Complex x, double _Complex y ) { return cpow( x, y ); }
     82static inline long double _Complex pow( long double _Complex x, long double _Complex y ) { return cpowl( x, y ); }
     83
     84//---------------------- Logarithm ----------------------
     85
     86static inline float log( float x ) { return logf( x ); }
    8087// extern "C" { double log( double ); }
    81 long double log( long double );
    82 float _Complex log( float _Complex );
    83 double _Complex log( double _Complex );
    84 long double _Complex log( long double _Complex );
    85 
    86 float log2( float );
     88static inline long double log( long double x ) { return logl( x ); }
     89static inline float _Complex log( float _Complex x ) { return clogf( x ); }
     90static inline double _Complex log( double _Complex x ) { return clog( x ); }
     91static inline long double _Complex log( long double _Complex x ) { return clogl( x ); }
     92
     93static inline float log2( float x ) { return log2f( x ); }
    8794// extern "C" { double log2( double ); }
    88 long double log2( long double );
    89 // float _Complex log2( float _Complex );
    90 // double _Complex log2( double _Complex );
    91 // long double _Complex log2( long double _Complex );
    92 
    93 float log10( float );
     95static inline long double log2( long double x ) { return log2l( x ); }
     96// static inline float _Complex log2( float _Complex x ) { return clog2f( x ); }
     97// static inline double _Complex log2( double _Complex x ) { return clog2( x ); }
     98// static inline long double _Complex log2( long double _Complex x ) { return clog2l( x ); }
     99
     100static inline float log10( float x ) { return log10f( x ); }
    94101// extern "C" { double log10( double ); }
    95 long double log10( long double );
    96 // float _Complex log10( float _Complex );
    97 // double _Complex log10( double _Complex );
    98 // long double _Complex log10( long double _Complex );
    99 
    100 float log1p( float );
     102static inline long double log10( long double x ) { return log10l( x ); }
     103// static inline float _Complex log10( float _Complex x ) { return clog10f( x ); }
     104// static inline double _Complex log10( double _Complex x ) { return clog10( x ); }
     105// static inline long double _Complex log10( long double _Complex x ) { return clog10l( x ); }
     106
     107static inline float log1p( float x ) { return log1pf( x ); }
    101108// extern "C" { double log1p( double ); }
    102 long double log1p( long double );
    103 
    104 int ilogb( float );
     109static inline long double log1p( long double x ) { return log1pl( x ); }
     110
     111static inline int ilogb( float x ) { return ilogbf( x ); }
    105112// extern "C" { int ilogb( double ); }
    106 int ilogb( long double );
    107 
    108 float logb( float );
     113static inline int ilogb( long double x ) { return ilogbl( x ); }
     114
     115static inline float logb( float x ) { return logbf( x ); }
    109116// extern "C" { double logb( double ); }
    110 long double logb( long double );
    111 
    112 //---------------------- Power ----------------------
    113 
    114 float sqrt( float );
     117static inline long double logb( long double x ) { return logbl( x ); }
     118
     119static inline float sqrt( float x ) { return sqrtf( x ); }
    115120// extern "C" { double sqrt( double ); }
    116 long double sqrt( long double );
    117 float _Complex sqrt( float _Complex );
    118 double _Complex sqrt( double _Complex );
    119 long double _Complex sqrt( long double _Complex );
    120 
    121 float cbrt( float );
     121static inline long double sqrt( long double x ) { return sqrtl( x ); }
     122static inline float _Complex sqrt( float _Complex x ) { return csqrtf( x ); }
     123static inline double _Complex sqrt( double _Complex x ) { return csqrt( x ); }
     124static inline long double _Complex sqrt( long double _Complex x ) { return csqrtl( x ); }
     125
     126static inline float cbrt( float x ) { return cbrtf( x ); }
    122127// extern "C" { double cbrt( double ); }
    123 long double cbrt( long double );
    124 
    125 float hypot( float, float );
     128static inline long double cbrt( long double x ) { return cbrtl( x ); }
     129
     130static inline float hypot( float x, float y ) { return hypotf( x, y ); }
    126131// extern "C" { double hypot( double, double ); }
    127 long double hypot( long double, long double );
    128 
    129 float pow( float, float );
    130 // extern "C" { double pow( double, double ); }
    131 long double pow( long double, long double );
    132 float _Complex pow( float _Complex, float _Complex );
    133 double _Complex pow( double _Complex, double _Complex );
    134 long double _Complex pow( long double _Complex, long double _Complex );
     132static inline long double hypot( long double x, long double y ) { return hypotl( x, y ); }
    135133
    136134//---------------------- Trigonometric ----------------------
    137135
    138 float sin( float );
     136static inline float sin( float x ) { return sinf( x ); }
    139137// extern "C" { double sin( double ); }
    140 long double sin( long double );
    141 float _Complex sin( float _Complex );
    142 double _Complex sin( double _Complex );
    143 long double _Complex sin( long double _Complex );
    144 
    145 float cos( float );
     138static inline long double sin( long double x ) { return sinl( x ); }
     139static inline float _Complex sin( float _Complex x ) { return csinf( x ); }
     140static inline double _Complex sin( double _Complex x ) { return csin( x ); }
     141static inline long double _Complex sin( long double _Complex x ) { return csinl( x ); }
     142
     143static inline float cos( float x ) { return cosf( x ); }
    146144// extern "C" { double cos( double ); }
    147 long double cos( long double );
    148 float _Complex cos( float _Complex );
    149 double _Complex cos( double _Complex );
    150 long double _Complex cos( long double _Complex );
    151 
    152 float tan( float );
     145static inline long double cos( long double x ) { return cosl( x ); }
     146static inline float _Complex cos( float _Complex x ) { return ccosf( x ); }
     147static inline double _Complex cos( double _Complex x ) { return ccos( x ); }
     148static inline long double _Complex cos( long double _Complex x ) { return ccosl( x ); }
     149
     150static inline float tan( float x ) { return tanf( x ); }
    153151// extern "C" { double tan( double ); }
    154 long double tan( long double );
    155 float _Complex tan( float _Complex );
    156 double _Complex tan( double _Complex );
    157 long double _Complex tan( long double _Complex );
    158 
    159 float asin( float );
     152static inline long double tan( long double x ) { return tanl( x ); }
     153static inline float _Complex tan( float _Complex x ) { return ctanf( x ); }
     154static inline double _Complex tan( double _Complex x ) { return ctan( x ); }
     155static inline long double _Complex tan( long double _Complex x ) { return ctanl( x ); }
     156
     157static inline float asin( float x ) { return asinf( x ); }
    160158// extern "C" { double asin( double ); }
    161 long double asin( long double );
    162 float _Complex asin( float _Complex );
    163 double _Complex asin( double _Complex );
    164 long double _Complex asin( long double _Complex );
    165 
    166 float acos( float );
     159static inline long double asin( long double x ) { return asinl( x ); }
     160static inline float _Complex asin( float _Complex x ) { return casinf( x ); }
     161static inline double _Complex asin( double _Complex x ) { return casin( x ); }
     162static inline long double _Complex asin( long double _Complex x ) { return casinl( x ); }
     163
     164static inline float acos( float x ) { return acosf( x ); }
    167165// extern "C" { double acos( double ); }
    168 long double acos( long double );
    169 float _Complex acos( float _Complex );
    170 double _Complex acos( double _Complex );
    171 long double _Complex acos( long double _Complex );
    172 
    173 float atan( float );
     166static inline long double acos( long double x ) { return acosl( x ); }
     167static inline float _Complex acos( float _Complex x ) { return cacosf( x ); }
     168static inline double _Complex acos( double _Complex x ) { return cacos( x ); }
     169static inline long double _Complex acos( long double _Complex x ) { return cacosl( x ); }
     170
     171static inline float atan( float x ) { return atanf( x ); }
    174172// extern "C" { double atan( double ); }
    175 long double atan( long double );
    176 float _Complex atan( float _Complex );
    177 double _Complex atan( double _Complex );
    178 long double _Complex atan( long double _Complex );
    179 
    180 float atan2( float, float );
     173static inline long double atan( long double x ) { return atanl( x ); }
     174static inline float _Complex atan( float _Complex x ) { return catanf( x ); }
     175static inline double _Complex atan( double _Complex x ) { return catan( x ); }
     176static inline long double _Complex atan( long double _Complex x ) { return catanl( x ); }
     177
     178static inline float atan2( float x, float y ) { return atan2f( x, y ); }
    181179// extern "C" { double atan2( double, double ); }
    182 long double atan2( long double, long double );
    183 
    184 float atan( float, float );                                                             // alternative name for atan2
    185 double atan( double, double );
    186 long double atan( long double, long double );
     180static inline long double atan2( long double x, long double y ) { return atan2l( x, y ); }
     181
     182// alternative name for atan2
     183static inline float atan( float x, float y ) { return atan2f( x, y ); }
     184static inline double atan( double x, double y ) { return atan2( x, y ); }
     185static inline long double atan( long double x, long double y ) { return atan2l( x, y ); }
    187186
    188187//---------------------- Hyperbolic ----------------------
    189188
    190 float sinh( float );
     189static inline float sinh( float x ) { return sinhf( x ); }
    191190// extern "C" { double sinh( double ); }
    192 long double sinh( long double );
    193 float _Complex sinh( float _Complex );
    194 double _Complex sinh( double _Complex );
    195 long double _Complex sinh( long double _Complex );
    196 
    197 float cosh( float );
     191static inline long double sinh( long double x ) { return sinhl( x ); }
     192static inline float _Complex sinh( float _Complex x ) { return csinhf( x ); }
     193static inline double _Complex sinh( double _Complex x ) { return csinh( x ); }
     194static inline long double _Complex sinh( long double _Complex x ) { return csinhl( x ); }
     195
     196static inline float cosh( float x ) { return coshf( x ); }
    198197// extern "C" { double cosh( double ); }
    199 long double cosh( long double );
    200 float _Complex cosh( float _Complex );
    201 double _Complex cosh( double _Complex );
    202 long double _Complex cosh( long double _Complex );
    203 
    204 float tanh( float );
     198static inline long double cosh( long double x ) { return coshl( x ); }
     199static inline float _Complex cosh( float _Complex x ) { return ccoshf( x ); }
     200static inline double _Complex cosh( double _Complex x ) { return ccosh( x ); }
     201static inline long double _Complex cosh( long double _Complex x ) { return ccoshl( x ); }
     202
     203static inline float tanh( float x ) { return tanhf( x ); }
    205204// extern "C" { double tanh( double ); }
    206 long double tanh( long double );
    207 float _Complex tanh( float _Complex );
    208 double _Complex tanh( double _Complex );
    209 long double _Complex tanh( long double _Complex );
    210 
    211 float asinh( float );
     205static inline long double tanh( long double x ) { return tanhl( x ); }
     206static inline float _Complex tanh( float _Complex x ) { return ctanhf( x ); }
     207static inline double _Complex tanh( double _Complex x ) { return ctanh( x ); }
     208static inline long double _Complex tanh( long double _Complex x ) { return ctanhl( x ); }
     209
     210static inline float asinh( float x ) { return asinhf( x ); }
    212211// extern "C" { double asinh( double ); }
    213 long double asinh( long double );
    214 float _Complex asinh( float _Complex );
    215 double _Complex asinh( double _Complex );
    216 long double _Complex asinh( long double _Complex );
    217 
    218 float acosh( float );
     212static inline long double asinh( long double x ) { return asinhl( x ); }
     213static inline float _Complex asinh( float _Complex x ) { return casinhf( x ); }
     214static inline double _Complex asinh( double _Complex x ) { return casinh( x ); }
     215static inline long double _Complex asinh( long double _Complex x ) { return casinhl( x ); }
     216
     217static inline float acosh( float x ) { return acoshf( x ); }
    219218// extern "C" { double acosh( double ); }
    220 long double acosh( long double );
    221 float _Complex acosh( float _Complex );
    222 double _Complex acosh( double _Complex );
    223 long double _Complex acosh( long double _Complex );
    224 
    225 float atanh( float );
     219static inline long double acosh( long double x ) { return acoshl( x ); }
     220static inline float _Complex acosh( float _Complex x ) { return cacoshf( x ); }
     221static inline double _Complex acosh( double _Complex x ) { return cacosh( x ); }
     222static inline long double _Complex acosh( long double _Complex x ) { return cacoshl( x ); }
     223
     224static inline float atanh( float x ) { return atanhf( x ); }
    226225// extern "C" { double atanh( double ); }
    227 long double atanh( long double );
    228 float _Complex atanh( float _Complex );
    229 double _Complex atanh( double _Complex );
    230 long double _Complex atanh( long double _Complex );
     226static inline long double atanh( long double x ) { return atanhl( x ); }
     227static inline float _Complex atanh( float _Complex x ) { return catanhf( x ); }
     228static inline double _Complex atanh( double _Complex x ) { return catanh( x ); }
     229static inline long double _Complex atanh( long double _Complex x ) { return catanhl( x ); }
    231230
    232231//---------------------- Error / Gamma ----------------------
    233232
    234 float erf( float );
     233static inline float erf( float x ) { return erff( x ); }
    235234// extern "C" { double erf( double ); }
    236 long double erf( long double );
     235static inline long double erf( long double x ) { return erfl( x ); }
    237236// float _Complex erf( float _Complex );
    238237// double _Complex erf( double _Complex );
    239238// long double _Complex erf( long double _Complex );
    240239
    241 float erfc( float );
     240static inline float erfc( float x ) { return erfcf( x ); }
    242241// extern "C" { double erfc( double ); }
    243 long double erfc( long double );
     242static inline long double erfc( long double x ) { return erfcl( x ); }
    244243// float _Complex erfc( float _Complex );
    245244// double _Complex erfc( double _Complex );
    246245// long double _Complex erfc( long double _Complex );
    247246
    248 float lgamma( float );
     247static inline float lgamma( float x ) { return lgammaf( x ); }
    249248// extern "C" { double lgamma( double ); }
    250 long double lgamma( long double );
    251 float lgamma( float, int * );
    252 double lgamma( double, int * );
    253 long double lgamma( long double, int * );
    254 
    255 float tgamma( float );
     249static inline long double lgamma( long double x ) { return lgammal( x ); }
     250static inline float lgamma( float x, int * sign ) { return lgammaf_r( x, sign ); }
     251static inline double lgamma( double x, int * sign ) { return lgamma_r( x, sign ); }
     252static inline long double lgamma( long double x, int * sign ) { return lgammal_r( x, sign ); }
     253
     254static inline float tgamma( float x ) { return tgammaf( x ); }
    256255// extern "C" { double tgamma( double ); }
    257 long double tgamma( long double );
     256static inline long double tgamma( long double x ) { return tgammal( x ); }
    258257
    259258//---------------------- Nearest Integer ----------------------
    260259
    261 float floor( float );
     260static inline float floor( float x ) { return floorf( x ); }
    262261// extern "C" { double floor( double ); }
    263 long double floor( long double );
    264 
    265 float ceil( float );
     262static inline long double floor( long double x ) { return floorl( x ); }
     263
     264static inline float ceil( float x ) { return ceilf( x ); }
    266265// extern "C" { double ceil( double ); }
    267 long double ceil( long double );
    268 
    269 float trunc( float );
     266static inline long double ceil( long double x ) { return ceill( x ); }
     267
     268static inline float trunc( float x ) { return truncf( x ); }
    270269// extern "C" { double trunc( double ); }
    271 long double trunc( long double );
    272 
    273 float rint( float );
    274 long double rint( long double );
    275 long int rint( float );
    276 long int rint( double );
    277 long int rint( long double );
    278 long long int rint( float );
    279 long long int rint( double );
    280 long long int rint( long double );
    281 
    282 long int lrint( float );
     270static inline long double trunc( long double x ) { return truncl( x ); }
     271
     272static inline float rint( float x ) { return rintf( x ); }
     273// extern "C" { double rint( double x ); }
     274static inline long double rint( long double x ) { return rintl( x ); }
     275static inline long int rint( float x ) { return lrintf( x ); }
     276static inline long int rint( double x ) { return lrint( x ); }
     277static inline long int rint( long double x ) { return lrintl( x ); }
     278static inline long long int rint( float x ) { return llrintf( x ); }
     279static inline long long int rint( double x ) { return llrint( x ); }
     280static inline long long int rint( long double x ) { return llrintl( x ); }
     281
     282static inline long int lrint( float x ) { return lrintf( x ); }
    283283// extern "C" { long int lrint( double ); }
    284 long int lrint( long double );
    285 long long int llrint( float );
     284static inline long int lrint( long double x ) { return lrintl( x ); }
     285static inline long long int llrint( float x ) { return llrintf( x ); }
    286286// extern "C" { long long int llrint( double ); }
    287 long long int llrint( long double );
    288 
    289 float nearbyint( float );
     287static inline long long int llrint( long double x ) { return llrintl( x ); }
     288
     289static inline float nearbyint( float x ) { return nearbyintf( x ); }
    290290// extern "C" { double nearbyint( double ); }
    291 long double nearbyint( long double );
    292 
    293 float round( float );
    294 long double round( long double );
    295 long int round( float );
    296 long int round( double );
    297 long int round( long double );
    298 long long int round( float );
    299 long long int round( double );
    300 long long int round( long double );
    301 
    302 long int lround( float );
     291static inline long double nearbyint( long double x ) { return nearbyintl( x ); }
     292
     293static inline float round( float x ) { return roundf( x ); }
     294// extern "C" { double round( double x ); }
     295static inline long double round( long double x ) { return roundl( x ); }
     296static inline long int round( float x ) { return lroundf( x ); }
     297static inline long int round( double x ) { return lround( x ); }
     298static inline long int round( long double x ) { return lroundl( x ); }
     299static inline long long int round( float x ) { return llroundf( x ); }
     300static inline long long int round( double x ) { return llround( x ); }
     301static inline long long int round( long double x ) { return llroundl( x ); }
     302
     303static inline long int lround( float x ) { return lroundf( x ); }
    303304// extern "C" { long int lround( double ); }
    304 long int lround( long double );
    305 long long int llround( float );
     305static inline long int lround( long double x ) { return lroundl( x ); }
     306static inline long long int llround( float x ) { return llroundf( x ); }
    306307// extern "C" { long long int llround( double ); }
    307 long long int llround( long double );
     308static inline long long int llround( long double x ) { return llroundl( x ); }
    308309
    309310//---------------------- Manipulation ----------------------
    310311
    311 float copysign( float, float );
     312static inline float copysign( float x, float y ) { return copysignf( x, y ); }
    312313// extern "C" { double copysign( double, double ); }
    313 long double copysign( long double, long double );
    314 
    315 float frexp( float, int * );
     314static inline long double copysign( long double x, long double y ) { return copysignl( x, y ); }
     315
     316static inline float frexp( float x, int * ip ) { return frexpf( x, ip ); }
    316317// extern "C" { double frexp( double, int * ); }
    317 long double frexp( long double, int * );
    318 
    319 float ldexp( float, int );
     318static inline long double frexp( long double x, int * ip ) { return frexpl( x, ip ); }
     319
     320static inline float ldexp( float x, int exp2 ) { return ldexpf( x, exp2 ); }
    320321// extern "C" { double ldexp( double, int ); }
    321 long double ldexp( long double, int );
    322 
    323 [ float, float ] modf( float );
    324 float modf( float, float * );
    325 [ double, double ] modf( double );
     322static inline long double ldexp( long double x, int exp2 ) { return ldexpl( x, exp2 ); }
     323
     324static inline [ float, float ] modf( float x ) { float i; x = modff( x, &i ); return [ i, x ]; }
     325static inline float modf( float x, float * i ) { return modff( x, i ); }
     326static inline [ double, double ] modf( double x ) { double i; x = modf( x, &i ); return [ i, x ]; }
    326327// extern "C" { double modf( double, double * ); }
    327 [ long double, long double ] modf( long double );
    328 long double modf( long double, long double * );
    329 
    330 float nextafter( float, float );
     328static inline [ long double, long double ] modf( long double x ) { long double i; x = modfl( x, &i ); return [ i, x ]; }
     329static inline long double modf( long double x, long double * i ) { return modfl( x, i ); }
     330
     331static inline float nextafter( float x, float y ) { return nextafterf( x, y ); }
    331332// extern "C" { double nextafter( double, double ); }
    332 long double nextafter( long double, long double );
    333 
    334 float nexttoward( float, long double );
     333static inline long double nextafter( long double x, long double y ) { return nextafterl( x, y ); }
     334
     335static inline float nexttoward( float x, long double y ) { return nexttowardf( x, y ); }
    335336// extern "C" { double nexttoward( double, long double ); }
    336 long double nexttoward( long double, long double );
    337 
    338 float scalbn( float, int );
     337static inline long double nexttoward( long double x, long double y ) { return nexttowardl( x, y ); }
     338
     339static inline float scalbn( float x, int exp ) { return scalbnf( x, exp ); }
    339340// extern "C" { double scalbn( double, int ); }
    340 long double scalbn( long double, int );
    341 
    342 float scalbln( float, long int );
     341static inline long double scalbn( long double x, int exp ) { return scalbnl( x, exp ); }
     342static inline float scalbn( float x, long int exp ) { return scalblnf( x, exp ); }
     343static inline double scalbn( double x, long int exp ) { return scalbln( x, exp ); }
     344static inline long double scalbn( long double x, long int exp ) { return scalblnl( x, exp ); }
     345
     346static inline float scalbln( float x, long int exp ) { return scalblnf( x, exp ); }
    343347// extern "C" { double scalbln( double, long int ); }
    344 long double scalbln( long double, long int );
     348static inline long double scalbln( long double x, long int exp ) { return scalblnl( x, exp ); }
    345349
    346350// Local Variables: //
  • src/libcfa/startup.h

    r3d4b23fa r0720e049  
    1 //                              -*- Mode: CFA -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    109// Author           : Thierry Delisle
    1110// Created On       : Wed Mar 29 15:56:41 2017
    12 // Last Modified By :
    13 // Last Modified On :
    14 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 21:37:11 2017
     13// Update Count     : 2
    1514//
    1615
    17 #ifndef STARTUP_H
    18 #define STARTUP_H
     16#pragma once
    1917
    2018#if GCC_VERSION > 50000
     
    3432#endif
    3533
    36 #endif //STARTUP_H
     34// Local Variables: //
     35// mode: c //
     36// tab-width: 4 //
     37// End: //
  • src/libcfa/stdhdr/assert.h

    r3d4b23fa r0720e049  
    1010// Created On       : Mon Jul  4 23:25:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul  5 20:34:23 2016
    13 // Update Count     : 8
     12// Last Modified On : Mon Jul 31 23:09:32 2017
     13// Update Count     : 13
    1414//
    1515
     
    1818#endif //__CFORALL__
    1919
    20 // has internal check for multiple expansion
    2120#include_next <assert.h>
     21
     22#ifdef NDEBUG
     23        #define assertf( expr, fmt, ... ) ((void)0)
     24#else
     25        #define __STRINGIFY__(str) #str
     26        #define __VSTRINGIFY__(str) __STRINGIFY__(str)
     27        #define assertf( expr, fmt, ... ) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
     28
     29        void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn, format( printf, 5, 6) ));
     30#endif
    2231
    2332#ifdef __CFORALL__
  • src/libcfa/stdhdr/gmp.h

    r3d4b23fa r0720e049  
    1 //                               -*- Mode: C -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     
    1110// Created On       : Sun May 14 23:46:01 2017
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Sun May 14 23:46:34 2017
    14 // Update Count     : 1
     12// Last Modified On : Thu Jul 20 18:10:52 2017
     13// Update Count     : 4
    1514//
    1615
  • src/libcfa/stdlib

    r3d4b23fa r0720e049  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul  7 09:34:49 2017
    13 // Update Count     : 219
     12// Last Modified On : Mon Aug  7 11:19:07 2017
     13// Update Count     : 223
    1414//
    1515
     
    1818//---------------------------------------
    1919
    20 extern "C" {
    2120#ifndef EXIT_FAILURE
    2221#define EXIT_FAILURE    1                                                               // failing exit status
    2322#define EXIT_SUCCESS    0                                                               // successful exit status
    2423#endif // ! EXIT_FAILURE
    25 } // extern "C"
    2624
    2725//---------------------------------------
     
    185183//---------------------------------------
    186184
     185[ int, int ] div( int num, int denom );
     186[ long int, long int ] div( long int num, long int denom );
     187[ long long int, long long int ] div( long long int num, long long int denom );
    187188forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
    188 [ T, T ] div( T t1, T t2 );
     189[ T, T ] div( T num, T demon );
    189190
    190191//---------------------------------------
  • src/libcfa/stdlib.c

    r3d4b23fa r0720e049  
    1010// Created On       : Thu Jan 28 17:10:29 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun  1 21:52:57 2017
    13 // Update Count     : 280
     12// Last Modified On : Tue Aug  8 17:31:13 2017
     13// Update Count     : 291
    1414//
    1515
     
    1818//---------------------------------------
    1919
    20 extern "C" {
    2120#define _XOPEN_SOURCE 600                                                               // posix_memalign, *rand48
    2221#include <stdlib.h>                                                                             // malloc, free, calloc, realloc, memalign, posix_memalign, bsearch
     
    2524#include <math.h>                                                                               // fabsf, fabs, fabsl
    2625#include <complex.h>                                                                    // _Complex_I
    27 } // extern "C"
    2826
    2927// resize, non-array types
     
    257255//---------------------------------------
    258256
     257[ int, int ] div( int num, int denom ) { div_t qr = div( num, denom ); return [ qr.quot, qr.rem ]; }
     258[ long int, long int ] div( long int num, long int denom ) { ldiv_t qr = ldiv( num, denom ); return [ qr.quot, qr.rem ]; }
     259[ long long int, long long int ] div( long long int num, long long int denom ) { lldiv_t qr = lldiv( num, denom ); return [ qr.quot, qr.rem ]; }
    259260forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
    260 [ T, T ] div( T t1, T t2 ) { return [ t1 / t2, t1 % t2 ]; }
     261[ T, T ] div( T num, T denom ) { return [ num / denom, num % denom ]; }
    261262
    262263//---------------------------------------
  • src/main.cc

    r3d4b23fa r0720e049  
    1111// Created On       : Fri May 15 23:12:02 2015
    1212// Last Modified By : Andrew Beach
    13 // Last Modified On : Fri Jul  7 11:13:00 2017
    14 // Update Count     : 442
     13// Last Modified On : Wed Jul 26 14:38:00 2017
     14// Update Count     : 443
    1515//
    1616
     
    5858#include "SynTree/Visitor.h"                // for acceptAll
    5959#include "Tuples/Tuples.h"                  // for expandMemberTuples, expan...
     60#include "Virtual/ExpandCasts.h"            // for expandCasts
    6061
    6162using namespace std;
     
    313314                }
    314315
     316                OPTPRINT( "virtual expandCasts" ) // Must come after translateEHM
     317                Virtual::expandCasts( translationUnit );
     318
    315319                OPTPRINT("instantiateGenerics")
    316320                GenPoly::instantiateGeneric( translationUnit );
  • src/prelude/builtins.c

    r3d4b23fa r0720e049  
     1//
     2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
     3//
     4// The contents of this file are covered under the licence agreement in the
     5// file "LICENCE" distributed with Cforall.
     6//
     7// builtins.c --
     8//
     9// Author           : Peter A. Buhr
     10// Created On       : Fri Jul 21 16:21:03 2017
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Tus Jul 25 15:33:00 2017
     13// Update Count     : 14
     14//
     15
     16// exception implementation
     17
    118typedef unsigned long long __cfaabi_exception_type_t;
    219
     20#include "../libcfa/virtual.h"
    321#include "../libcfa/exception.h"
     22
     23// exponentiation operator implementation
     24
     25extern "C" {
     26        float powf( float x, float y );
     27        double pow( double x, double y );
     28        long double powl( long double x, long double y );
     29        float _Complex cpowf( float _Complex x, _Complex float z );
     30        double _Complex cpow( double _Complex x, _Complex double z );
     31        long double _Complex cpowl( long double _Complex x, _Complex long double z );
     32} // extern "C"
     33
     34static inline float ?\?( float x, float y ) { return powf( x, y ); }
     35static inline double ?\?( double x, double y ) { return pow( x, y ); }
     36static inline long double ?\?( long double x, long double y ) { return powl( x, y ); }
     37static inline float _Complex ?\?( float _Complex x, _Complex float y ) { return cpowf(x, y ); }
     38static inline double _Complex ?\?( double _Complex x, _Complex double y ) { return cpow( x, y ); }
     39static inline long double _Complex ?\?( long double _Complex x, _Complex long double y ) { return cpowl( x, y ); }
     40
     41static inline long int ?\?( long int ep, unsigned long int y ) { // disallow negative exponent
     42        if ( y == 0 ) return 1;                                                         // base case
     43    if ( ep == 2 ) return ep << (y - 1);                                // special case, positive shifting only
     44    typeof( ep ) op = 1;                                                                // accumulate odd product
     45    for ( ; y > 1; y >>= 1 ) {                                                  // squaring exponentiation, O(log2 y)
     46                if ( (y & 1) == 1 ) op *= ep;                                   // odd ?
     47                ep *= ep;
     48        } // for
     49    return ep * op;
     50} // ?\?
     51
     52// FIX ME, cannot resolve the "T op = 1".
     53
     54// static inline forall( otype T | { void ?{}( T * this, one_t ); T ?*?( T, T ); } )
     55// T ?\?( T ep, unsigned long int y ) {
     56//     if ( y == 0 ) return 1;
     57//     T op = 1;
     58//     for ( ; y > 1; y >>= 1 ) {                                                       // squaring exponentiation, O(log2 y)
     59//              if ( (y & 1) == 1 ) op = op * ep;                               // odd ?
     60//              ep = ep * ep;
     61//     } // for
     62//     return ep * op;
     63// } // ?\?
     64
     65// unsigned computation may be faster and larger
     66static inline unsigned long int ?\?( unsigned long int ep, unsigned long int y ) { // disallow negative exponent
     67        if ( y == 0 ) return 1;                                                         // base case
     68    if ( ep == 2 ) return ep << (y - 1);                                // special case, positive shifting only
     69    typeof( ep ) op = 1;                                                                // accumulate odd product
     70    for ( ; y > 1; y >>= 1 ) {                                                  // squaring exponentiation, O(log2 y)
     71                if ( (y & 1) == 1 ) op *= ep;                                   // odd ?
     72                ep *= ep;
     73        } // for
     74    return ep * op;
     75} // ?\?
     76
     77static inline double ?\?( long int x, signed long int y ) {     // allow negative exponent
     78    if ( y >=  0 ) return (double)(x \ (unsigned long int)y);
     79    else return 1.0 / x \ (unsigned int)(-y);
     80} // ?\?
     81
     82static inline forall( otype T | { void ?{}( T * this, one_t ); T ?*?( T, T ); double ?/?( double, T ); } )
     83double ?\?( T x, signed long int y ) {
     84    if ( y >=  0 ) return (double)(x \ (unsigned long int)y);
     85    else return 1.0 / x \ (unsigned long int)(-y);
     86} // ?\?
     87
     88static inline long int ?\=?( long int * x, unsigned long int y ) { *x = *x \ y; return *x; }
     89static inline unsigned long int ?\=?( unsigned long int * x, unsigned long int y ) { *x = *x \ y; return *x; }
     90static inline int ?\=?( int * x, unsigned long int y ) { *x = *x \ y; return *x; }
     91static inline unsigned int ?\=?( unsigned int * x, unsigned long int y ) { *x = *x \ y; return *x; }
     92
     93// Local Variables: //
     94// mode: c //
     95// tab-width: 4 //
     96// End: //
  • src/tests/.expect/32/math.txt

    r3d4b23fa r0720e049  
    22remainder:-1 -1 -1
    33remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
    4 div:7 0.0999999 7 0.1 7 0.0999999999999999999
     4div:7, 0.2 7, 0.2 7, 0.2
    55fma:-2 -2 -2
    66fdim:2 2 2
     
    99exp2:2 2 2
    1010expm1:1.71828 1.71828182845905 1.71828182845904524
     11pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
     1216 256
     13912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i
    1114log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
    1215log2:3 3 3
     
    1821cbrt:3 3 3
    1922hypot:1.41421 1.4142135623731 1.41421356237309505
    20 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
    2123sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
    2224cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
     
    5355frexp:0.5 3 0.5 3 0.5 3
    5456ldexp:8 8 8
    55 modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
     57modf:2 0.3 2 0.3 2 0.3
     58modf:2, 0.3 2, 0.3 2, 0.3
     59nextafter:2 2 2
    5660nexttoward:2 2 2
    5761scalbn:16 16 16
  • src/tests/.expect/64/math.txt

    r3d4b23fa r0720e049  
    22remainder:-1 -1 -1
    33remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
    4 div:7 0.0999999 7 0.1 7 0.0999999999999999999
     4div:7, 0.2 7, 0.2 7, 0.2
    55fma:-2 -2 -2
    66fdim:2 2 2
     
    99exp2:2 2 2
    1010expm1:1.71828 1.71828182845905 1.71828182845904524
     11pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614627i
     1216 256
     13912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i
    1114log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i
    1215log2:3 3 3
     
    1821cbrt:3 3 3
    1922hypot:1.41421 1.4142135623731 1.41421356237309505
    20 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i
    2123sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i
    2224cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i
     
    5355frexp:0.5 3 0.5 3 0.5 3
    5456ldexp:8 8 8
    55 modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
     57modf:2 0.3 2 0.3 2 0.3
     58modf:2, 0.3 2, 0.3 2, 0.3
     59nextafter:2 2 2
    5660nexttoward:2 2 2
    5761scalbn:16 16 16
  • src/tests/alloc.c

    r3d4b23fa r0720e049  
    1010// Created On       : Wed Feb  3 07:56:22 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun  2 15:13:03 2017
    13 // Update Count     : 316
     12// Last Modified On : Thu Jul 20 16:01:10 2017
     13// Update Count     : 318
    1414//
    1515
    16 #include <assert>
    17 extern "C" {
     16#include <assert.h>
    1817#include <malloc.h>                                                                             // malloc_usable_size
    1918#include <stdint.h>                                                                             // uintptr_t
    2019#include <stdlib.h>                                                                             // posix_memalign
    21 } // extern
    2220#include <fstream>
    2321#include <stdlib>                                                                               // access C malloc, realloc
  • src/tests/attributes.c

    r3d4b23fa r0720e049  
    1 //                               -*- Mode: C -*-
    21//
    32// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
     
    1110// Created On       : Mon Feb  6 16:07:02 2017
    1211// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Mon Feb  6 16:08:21 2017
    14 // Update Count     : 2
     12// Last Modified On : Fri Jul 21 23:05:52 2017
     13// Update Count     : 3
    1514//
    1615
  • src/tests/avltree/avl-private.h

    r3d4b23fa r0720e049  
    1 #ifndef AVL_PRIVATE_H
     1#pragma once
    22#include "avl.h"
    33
     
    1414forall(otype K | Comparable(K), otype V)
    1515int height(tree(K, V) * t);
    16 
    17 #endif
  • src/tests/avltree/avl.h

    r3d4b23fa r0720e049  
    1 #ifndef AVL_TREE_H
    2 #define AVL_TREE_H
     1#pragma once
    32
    43extern "C" {
     
    104103//     printTree(t, 0);
    105104// }
    106 
    107 
    108 #endif
  • src/tests/designations.c

    r3d4b23fa r0720e049  
    99// Author           : Rob Schluntz
    1010// Created On       : Thu Jun 29 15:26:36 2017
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Jun 29 15:27:05 2017
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 27 11:46:35 2017
     13// Update Count     : 3
    1414//
    1515
     
    8989};
    9090
     91struct Fred {
     92    double i[3];
     93    int j;
     94    struct Mary {
     95        struct Jane {
     96            double j;
     97        } j;
     98        double i;
     99    } m;
     100};
     101struct Fred s1 @= { .m.j : 3 };
     102struct Fred s2 @= { .i : { [2] : 2 } };
     103
    91104int main() {
    92105        // simple designation case - starting from beginning of structure, leaves ptr default-initialized (zero)
     
    199212        };
    200213#endif
    201 
     214        // array designation
     215        int i[2] = { [1] : 3 };
    202216        // allowed to have 'too many' initialized lists - essentially they are ignored.
    203217        int i1 = { 3 };
     
    240254        const char * str0 = "hello";
    241255        char str1[] = "hello";
     256        const char c1[] = "abc";
     257        const char c2[] = { 'a', 'b', 'c' };
     258        const char c3[][2] = { { 'a', 'b' }, { 'c', 'd'}, { 'c', 'd'} };
    242259}
    243260
  • src/tests/except-0.c

    r3d4b23fa r0720e049  
    66#include <stdbool.h>
    77
     8// Local type to mark exits from scopes. (see ERROR)
    89struct signal_exit {
    910        const char * area;
     
    1920}
    2021
    21 void terminate(int except_value) {
     22
     23// Local Exception Types and manual vtable types.
     24//#define TRIVIAL_EXCEPTION(name) //TRIVAL_EXCEPTION(yin)
     25struct yin;
     26struct yin_vtable {
     27        struct exception_t_vtable const * parent;
     28        size_t size;
     29    void (*copy)(yin *this, yin * other);
     30    void (*free)(yin *this);
     31    const char (*msg)(yin *this);
     32};
     33struct yin {
     34        struct yin_vtable const * parent;
     35};
     36void yin_msg(yin) {
     37        return "in";
     38}
     39yin_vtable _yin_vtable_instance = {
     40        &_exception_t_vtable_instance, sizeof(yin), ?{}, ^?{}, yin_msg
     41}
     42
     43
     44void terminate(exception * except_value) {
    2245        signal_exit a = {"terminate function"};
    2346        throw except_value;
     
    2548}
    2649
    27 void resume(int except_value) {
     50void resume(exception * except_value) {
    2851        signal_exit a = {"resume function"};
    2952        throwResume except_value;
  • src/tests/gmp.c

    r3d4b23fa r0720e049  
    1010// Created On       : Tue Apr 19 08:55:51 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 24 22:05:38 2017
    13 // Update Count     : 540
     12// Last Modified On : Thu Jul 13 16:35:01 2017
     13// Update Count     : 541
    1414//
    1515
     
    9595// Local Variables: //
    9696// tab-width: 4 //
    97 // compile-command: "cfa gmp.c -l gmp" //
     97// compile-command: "cfa gmp.c -lgmp" //
    9898// End: //
  • src/tests/math.c

    r3d4b23fa r0720e049  
    1010// Created On       : Fri Apr 22 14:59:21 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 24 13:04:33 2017
    13 // Update Count     : 71
     12// Last Modified On : Wed Aug  9 07:20:49 2017
     13// Update Count     : 77
    1414//
    1515
     
    3131        l = remquo( 3.6L, 0.5L, &quot );
    3232        sout | quot | l | endl;
    33         f = div( 3.6F, 0.5F, &quot );
    34         sout | "div:" | quot | f;
    35         d = div( 3.6D, 0.5F, &quot );
    36         sout | quot | d;
    37         l = div( 3.6L, 0.5L, &quot );
    38         sout | quot | l | endl;
     33        sout | "div:" | div( 3.6F, 0.5F ) | div( 3.6D, 0.5D ) | div( 3.6L, 0.5L ) | endl;
    3934        sout | "fma:" | fma( 3.0F, -1.0F, 1.0F ) | fma( 3.0D, -1.0D, 1.0D ) | fma( 3.0L, -1.0L, , 1.0L ) | endl;
    4035        sout | "fdim:" | fdim( 1.0F, -1.0F ) | fdim( 1.0D, -1.0D ) | fdim( 1.0L, -1.0L ) | endl;
     
    4641        sout | "exp2:" | exp2( 1.0F ) | exp2( 1.0D ) | exp2( 1.0L ) | endl;
    4742        sout | "expm1:" | expm1( 1.0F ) | expm1( 1.0D ) | expm1( 1.0L ) | endl;
     43        sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.0DL+1.0LI, 1.0DL+1.0LI ) | endl;
     44
     45        int b = 4;
     46        unsigned int e = 2;
     47    b \= e;
     48    sout | b | b \ e | endl;
     49    sout | 'a' \ 3u | 2 \ 8u | 4 \ 3u | -4 \ 3u | 4 \ -3 | -4 \ -3 | 4.0 \ 2.1 | (1.0f+2.0fi) \ (3.0f+2.0fi) | endl;
     50
     51        //---------------------- Logarithm ----------------------
     52
    4853        sout | "log:" | log( 1.0F ) | log( 1.0D ) | log( 1.0L ) | log( 1.0F+1.0FI ) | log( 1.0D+1.0DI ) | log( 1.0DL+1.0LI ) | endl;
    4954        sout | "log2:" | log2( 8.0F ) | log2( 8.0D ) | log2( 8.0L ) | endl;
     
    5358        sout | "logb:" | logb( 8.0F ) | logb( 8.0D ) | logb( 8.0L ) | endl;
    5459
    55         //---------------------- Power ----------------------
    56 
    5760        sout | "sqrt:" | sqrt( 1.0F ) | sqrt( 1.0D ) | sqrt( 1.0L ) | sqrt( 1.0F+1.0FI ) | sqrt( 1.0D+1.0DI ) | sqrt( 1.0DL+1.0LI ) | endl;
    5861        sout | "cbrt:" | cbrt( 27.0F ) | cbrt( 27.0D ) | cbrt( 27.0L ) | endl;
    5962        sout | "hypot:" | hypot( 1.0F, -1.0F ) | hypot( 1.0D, -1.0D ) | hypot( 1.0L, -1.0L ) | endl;
    60         sout | "pow:" | pow( 1.0F, 1.0F ) | pow( 1.0D, 1.0D ) | pow( 1.0L, 1.0L ) | pow( 1.0F+1.0FI, 1.0F+1.0FI ) | pow( 1.0D+1.0DI, 1.0D+1.0DI ) | pow( 1.0DL+1.0LI, 1.0DL+1.0LI ) | endl;
    6163
    6264        //---------------------- Trigonometric ----------------------
     
    130132        sout | di | d;
    131133        l = modf( 2.3L, &ldi );
    132         sout | ldi | l;
     134        sout | ldi | l | endl;
     135        sout | "modf:" | modf( 2.3F ) | modf( 2.3D ) | modf( 2.3L ) | endl;
    133136        sout | "nextafter:" | nextafter( 2.0F, 3.0F ) | nextafter( 2.0D, 3.0D ) | nextafter( 2.0L, 3.0L ) | endl;
    134137        sout | "nexttoward:" | nexttoward( 2.0F, 3.0F ) | nexttoward( 2.0D, 3.0D ) | nexttoward( 2.0L, 3.0L ) | endl;
  • src/tests/maybe.c

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Thr May 25 16:02:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri May 16 15:43:00 2017
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 15:24:07 2017
     13// Update Count     : 1
    1414//
    1515
    16 #include <assert>
     16#include <assert.h>
    1717#include <containers/maybe>
    1818
  • src/tests/preempt_longrun/Makefile.am

    r3d4b23fa r0720e049  
    2525CC = @CFA_BINDIR@/@CFA_NAME@
    2626
    27 TESTS = barge block create disjoint enter enter3 processor stack wait yield
     27TESTS = block create disjoint enter enter3 processor stack wait yield
    2828
    2929.INTERMEDIATE: ${TESTS}
    3030
    3131all-local: ${TESTS:=.run}
     32
     33clean-local:
     34        rm -f ${TESTS}
    3235
    3336% : %.c ${CC}
  • src/tests/preempt_longrun/Makefile.in

    r3d4b23fa r0720e049  
    453453REPEAT = ${abs_top_srcdir}/tools/repeat -s
    454454BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -debug -O2 -DPREEMPTION_RATE=${preempt}
    455 TESTS = barge block create disjoint enter enter3 processor stack wait yield
     455TESTS = block create disjoint enter enter3 processor stack wait yield
    456456all: all-am
    457457
     
    635635                TEST_LOGS="$$log_list"; \
    636636        exit $$?
    637 barge.log: barge
    638         @p='barge'; \
    639         b='barge'; \
    640         $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
    641         --log-file $$b.log --trs-file $$b.trs \
    642         $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
    643         "$$tst" $(AM_TESTS_FD_REDIRECT)
    644637block.log: block
    645638        @p='block'; \
     
    790783clean: clean-am
    791784
    792 clean-am: clean-generic mostlyclean-am
     785clean-am: clean-generic clean-local mostlyclean-am
    793786
    794787distclean: distclean-am
     
    857850
    858851.PHONY: all all-am all-local check check-TESTS check-am clean \
    859         clean-generic cscopelist-am ctags-am distclean \
     852        clean-generic clean-local cscopelist-am ctags-am distclean \
    860853        distclean-generic distdir dvi dvi-am html html-am info info-am \
    861854        install install-am install-data install-data-am install-dvi \
     
    875868all-local: ${TESTS:=.run}
    876869
     870clean-local:
     871        rm -f ${TESTS}
     872
    877873% : %.c ${CC}
    878874        ${AM_V_GEN}${CC} ${CFLAGS} ${<} -o ${@}
  • src/tests/preempt_longrun/create.c

    r3d4b23fa r0720e049  
    11#include <kernel>
    22#include <thread>
     3
     4static const unsigned long N = 2_000ul;
    35
    46#ifndef PREEMPTION_RATE
     
    1618int main(int argc, char* argv[]) {
    1719        processor p;
    18         for(int i = 0; i < 10_000ul; i++) {
     20        for(int i = 0; i < N; i++) {
    1921                worker_t w[7];
    2022        }
  • src/tests/preempt_longrun/enter.c

    r3d4b23fa r0720e049  
    33#include <thread>
    44
    5 #undef N
    65static const unsigned long N  = 70_000ul;
    76
  • src/tests/preempt_longrun/enter3.c

    r3d4b23fa r0720e049  
    33#include <thread>
    44
    5 #undef N
    65static const unsigned long N  = 50_000ul;
    76
  • src/tests/preempt_longrun/processor.c

    r3d4b23fa r0720e049  
    11#include <kernel>
    22#include <thread>
     3
     4static const unsigned long N = 5_000ul;
    35
    46#ifndef PREEMPTION_RATE
     
    1517
    1618int main(int argc, char* argv[]) {
    17         for(int i = 0; i < 10_000ul; i++) {
     19        for(int i = 0; i < N; i++) {
    1820                processor p;
    1921        }
  • src/tests/preempt_longrun/yield.c

    r3d4b23fa r0720e049  
    11#include <kernel>
    22#include <thread>
     3
     4static const unsigned long N = 325_000ul;
    35
    46#ifndef PREEMPTION_RATE
     
    1315
    1416void main(worker_t * this) {
    15         for(int i = 0; i < 325_000ul; i++) {
     17        for(int i = 0; i < N; i++) {
    1618                yield();
    1719        }
  • src/tests/result.c

    r3d4b23fa r0720e049  
    99// Author           : Andrew Beach
    1010// Created On       : Thr May 25 16:50:00 2017
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jun 16 15:42:00 2017
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 20 15:24:12 2017
     13// Update Count     : 1
    1414//
    1515
    16 #include <assert>
     16#include <assert.h>
    1717#include <containers/result>
    1818
  • src/tests/sched-int-barge.c

    r3d4b23fa r0720e049  
    55#include <thread>
    66
     7static const unsigned long N = 50_000ul;
     8
     9#ifndef PREEMPTION_RATE
     10#define PREEMPTION_RATE 10_000ul
     11#endif
     12
     13unsigned int default_preemption() {
     14        return 0;
     15}
    716enum state_t { WAIT, SIGNAL, BARGE };
    817
     
    1019
    1120monitor global_data_t {
    12         bool done;
     21        volatile bool done;
    1322        int counter;
    1423        state_t state;
     
    5160                c->do_wait2 = ((unsigned)rand48()) % (c->do_signal);
    5261
    53                 // if(c->do_wait1 == c->do_wait2) sout | "Same" | endl;
     62                if(c->do_wait1 == c->do_wait2) sout | "Same" | endl;
    5463        }
    5564
     
    7382        }
    7483
    75         if( c->counter >= 100_000 ) c->done = true;
     84        if( c->counter >= N ) c->done = true;
    7685        return !c->done;
    7786}
     
    8998}
    9099
     100static thread_desc * volatile the_threads;
     101
    91102int main(int argc, char* argv[]) {
    92         rand48seed(0);
    93         processor p;
    94         {
    95                 Threads t[17];
    96         }
     103        rand48seed(0);
     104        processor p;
     105        {
     106                Threads t[17];
     107                the_threads = (thread_desc*)t;
     108        }
    97109}
  • src/tests/sched-int-block.c

    r3d4b23fa r0720e049  
    55#include <thread>
    66
    7 #ifndef N
    8 #define N 10_000
     7#include <time.h>
     8
     9static const unsigned long N = 5_000ul;
     10
     11#ifndef PREEMPTION_RATE
     12#define PREEMPTION_RATE 10_000ul
    913#endif
     14
     15unsigned int default_preemption() {
     16        return PREEMPTION_RATE;
     17}
    1018
    1119enum state_t { WAITED, SIGNAL, BARGE };
     
    101109
    102110int main(int argc, char* argv[]) {
    103         rand48seed(0);
     111        rand48seed( time( NULL ) );
    104112        done = false;
    105113        processor p;
  • src/tests/sched-int-disjoint.c

    r3d4b23fa r0720e049  
    44#include <thread>
    55
    6 #ifndef N
    7 #define N 10_000
     6static const unsigned long N = 10_000ul;
     7
     8#ifndef PREEMPTION_RATE
     9#define PREEMPTION_RATE 10_000ul
    810#endif
     11
     12unsigned int default_preemption() {
     13        return PREEMPTION_RATE;
     14}
    915
    1016enum state_t { WAIT, SIGNAL, BARGE };
  • src/tests/sched-int-wait.c

    r3d4b23fa r0720e049  
    55#include <thread>
    66
    7 #ifndef N
    8 #define N 10_000
     7static const unsigned long N = 10_000ul;
     8
     9#ifndef PREEMPTION_RATE
     10#define PREEMPTION_RATE 10_000ul
    911#endif
     12
     13unsigned int default_preemption() {
     14        return PREEMPTION_RATE;
     15}
    1016
    1117monitor global_t {};
     
    114120int main(int argc, char* argv[]) {
    115121        waiter_left = 4;
    116         processor p;
     122        processor p[2];
    117123        sout | "Starting" | endl;
    118124        {
  • src/tests/test.py

    r3d4b23fa r0720e049  
    221221                if   retcode == TestResult.SUCCESS:     result_txt = "Done"
    222222                elif retcode == TestResult.TIMEOUT:     result_txt = "TIMEOUT"
    223                 else :                                          result_txt = "ERROR"
     223                else :                                          result_txt = "ERROR code %d" % retcode
    224224        else :
    225225                if   retcode == TestResult.SUCCESS:     result_txt = "PASSED"
    226226                elif retcode == TestResult.TIMEOUT:     result_txt = "TIMEOUT"
    227                 else :                                          result_txt = "FAILED"
     227                else :                                          result_txt = "FAILED with code %d" % retcode
    228228
    229229        #print result with error if needed
  • src/tests/vector/array.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Apr 27 17:26:04 2016
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:04:20 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef ARRAY_H
    17 #define ARRAY_H
     16#pragma once
    1817
    1918//#include <iterator>
     
    4544elt_type * end( array_type * array );
    4645
    47 #endif // ARRAY_H
    48 
    4946// Local Variables: //
    5047// tab-width: 4 //
  • src/tests/vector/vector_int.h

    r3d4b23fa r0720e049  
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Apr 27 17:26:59 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 10:04:02 2017
     13// Update Count     : 4
    1414//
    1515
    16 #ifndef VECTOR_INT_H
    17 #define VECTOR_INT_H
     16#pragma once
    1817
    1918// A flexible array, similar to a C++ vector, that holds integers and can be resized dynamically
     
    2625
    2726void ?{}( vector_int * );                                                               // allocate vector with default capacity
    28 void ?{}( vector_int *, int reserve );          // allocate vector with specified capacity
    29 void ?{}( vector_int * vec, vector_int other ); // copy constructor
     27void ?{}( vector_int *, int reserve );                                  // allocate vector with specified capacity
     28void ?{}( vector_int * vec, vector_int other );                 // copy constructor
    3029void ^?{}( vector_int * );                                                              // deallocate vector's storage
    3130
     
    3635
    3736lvalue int ?[?]( vector_int * vec, int index );                 // access to arbitrary element (does not resize)
    38 int last( vector_int * vec );                                                           // return last element
    39 
    40 #endif // VECTOR_INT_H
     37int last( vector_int * vec );                                                   // return last element
    4138
    4239// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.